Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
authorBen Skeggs <skeggsb@gmail.com>
Fri, 29 Feb 2008 02:24:31 +0000 (13:24 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 29 Feb 2008 02:24:31 +0000 (13:24 +1100)
199 files changed:
.gitattributes [new file with mode: 0755]
SConstruct
common.py [new file with mode: 0644]
docs/README.WIN32
doxygen/Makefile
doxygen/doxy.bat
include/GL/mglmesa.h
progs/demos/geartrain.dat
progs/ggi/sphere.asc
progs/ggi/torus.asc
progs/tests/Makefile
progs/tests/calibrate_rast.c [new file with mode: 0644]
src/gallium/auxiliary/cso_cache/cso_cache.h
src/gallium/auxiliary/draw/Makefile
src/gallium/auxiliary/draw/SConscript
src/gallium/auxiliary/draw/draw_aaline.c
src/gallium/auxiliary/draw/draw_aapoint.c
src/gallium/auxiliary/draw/draw_clip.c
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/draw/draw_flatshade.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_pstipple.c
src/gallium/auxiliary/draw/draw_twoside.c
src/gallium/auxiliary/draw/draw_validate.c
src/gallium/auxiliary/draw/draw_vertex_fetch.c
src/gallium/auxiliary/draw/draw_vertex_shader.c
src/gallium/auxiliary/draw/draw_vs_exec.c
src/gallium/auxiliary/draw/draw_vs_sse.c
src/gallium/auxiliary/draw/draw_wide_line.c [new file with mode: 0644]
src/gallium/auxiliary/draw/draw_wide_point.c [new file with mode: 0644]
src/gallium/auxiliary/draw/draw_wide_prims.c
src/gallium/auxiliary/gallivm/gallivm.h
src/gallium/auxiliary/gallivm/gallivm_p.h
src/gallium/auxiliary/pipebuffer/pb_buffer.h
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
src/gallium/auxiliary/tgsi/exec/tgsi_sse2.c
src/gallium/auxiliary/tgsi/exec/tgsi_sse2.h
src/gallium/auxiliary/tgsi/util/tgsi_build.h
src/gallium/auxiliary/tgsi/util/tgsi_dump.c
src/gallium/auxiliary/tgsi/util/tgsi_dump.h
src/gallium/auxiliary/tgsi/util/tgsi_parse.h
src/gallium/auxiliary/tgsi/util/tgsi_scan.c
src/gallium/auxiliary/tgsi/util/tgsi_scan.h
src/gallium/auxiliary/tgsi/util/tgsi_util.h
src/gallium/drivers/cell/ppu/Makefile
src/gallium/drivers/cell/ppu/cell_context.c
src/gallium/drivers/cell/ppu/cell_context.h
src/gallium/drivers/cell/ppu/cell_pipe_state.c
src/gallium/drivers/cell/ppu/cell_screen.c [new file with mode: 0644]
src/gallium/drivers/cell/ppu/cell_screen.h [new file with mode: 0644]
src/gallium/drivers/cell/ppu/cell_spu.c
src/gallium/drivers/cell/ppu/cell_texture.c
src/gallium/drivers/cell/ppu/cell_texture.h
src/gallium/drivers/cell/spu/spu_main.c
src/gallium/drivers/cell/spu/spu_main.h
src/gallium/drivers/cell/spu/spu_texture.c
src/gallium/drivers/failover/fo_context.c
src/gallium/drivers/i915simple/Makefile
src/gallium/drivers/i915simple/SConscript
src/gallium/drivers/i915simple/i915_context.c
src/gallium/drivers/i915simple/i915_context.h
src/gallium/drivers/i915simple/i915_fpc.h
src/gallium/drivers/i915simple/i915_fpc_translate.c
src/gallium/drivers/i915simple/i915_screen.c [new file with mode: 0644]
src/gallium/drivers/i915simple/i915_screen.h [new file with mode: 0644]
src/gallium/drivers/i915simple/i915_state.c
src/gallium/drivers/i915simple/i915_state_derived.c
src/gallium/drivers/i915simple/i915_strings.c [deleted file]
src/gallium/drivers/i915simple/i915_texture.c
src/gallium/drivers/i915simple/i915_texture.h
src/gallium/drivers/i915simple/i915_winsys.h
src/gallium/drivers/i965simple/Makefile
src/gallium/drivers/i965simple/SConscript
src/gallium/drivers/i965simple/brw_context.c
src/gallium/drivers/i965simple/brw_context.h
src/gallium/drivers/i965simple/brw_draw_upload.c
src/gallium/drivers/i965simple/brw_screen.c [new file with mode: 0644]
src/gallium/drivers/i965simple/brw_screen.h [new file with mode: 0644]
src/gallium/drivers/i965simple/brw_sf.c
src/gallium/drivers/i965simple/brw_shader_info.c
src/gallium/drivers/i965simple/brw_state.c
src/gallium/drivers/i965simple/brw_state.h
src/gallium/drivers/i965simple/brw_strings.c [deleted file]
src/gallium/drivers/i965simple/brw_surface.c
src/gallium/drivers/i965simple/brw_tex_layout.c
src/gallium/drivers/i965simple/brw_tex_layout.h
src/gallium/drivers/i965simple/brw_vs.c
src/gallium/drivers/i965simple/brw_vs.h
src/gallium/drivers/i965simple/brw_vs_emit.c
src/gallium/drivers/i965simple/brw_winsys.h
src/gallium/drivers/i965simple/brw_wm.c
src/gallium/drivers/i965simple/brw_wm_decl.c
src/gallium/drivers/i965simple/brw_wm_state.c
src/gallium/drivers/softpipe/Makefile
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_fs_llvm.c
src/gallium/drivers/softpipe/sp_prim_setup.c
src/gallium/drivers/softpipe/sp_quad.c
src/gallium/drivers/softpipe/sp_quad_fs.c
src/gallium/drivers/softpipe/sp_screen.c [new file with mode: 0644]
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/softpipe/sp_state_derived.c
src/gallium/drivers/softpipe/sp_state_fs.c
src/gallium/drivers/softpipe/sp_state_sampler.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/softpipe/sp_texture.h
src/gallium/drivers/softpipe/sp_tile_cache.c
src/gallium/drivers/softpipe/sp_winsys.h
src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_format.h
src/gallium/include/pipe/p_inlines.h
src/gallium/include/pipe/p_screen.h [new file with mode: 0644]
src/gallium/include/pipe/p_shader_tokens.h
src/gallium/include/pipe/p_state.h
src/gallium/winsys/dri/intel/intel_context.h
src/gallium/winsys/dri/intel/intel_winsys_i915.c
src/gallium/winsys/dri/intel/intel_winsys_softpipe.c
src/gallium/winsys/xlib/xm_winsys.c
src/gallium/winsys/xlib/xm_winsys_aub.c
src/glu/mesa/Makefile.m32
src/glut/glx/fxglut.def
src/glut/os2/Makefile
src/glut/os2/glutOverlay.cpp
src/glut/os2/glut_8x13.cpp
src/glut/os2/glut_9x15.cpp
src/glut/os2/glut_bitmap.cpp
src/glut/os2/glut_cmap.cpp
src/glut/os2/glut_cursor.cpp
src/glut/os2/glut_event.cpp
src/glut/os2/glut_ext.cpp
src/glut/os2/glut_fullscrn.cpp
src/glut/os2/glut_get.cpp
src/glut/os2/glut_hel10.cpp
src/glut/os2/glut_hel12.cpp
src/glut/os2/glut_hel18.cpp
src/glut/os2/glut_init.cpp
src/glut/os2/glut_input.cpp
src/glut/os2/glut_key.cpp
src/glut/os2/glut_keyctrl.cpp
src/glut/os2/glut_keyup.cpp
src/glut/os2/glut_mesa.cpp
src/glut/os2/glut_modifier.cpp
src/glut/os2/glut_roman.cpp
src/glut/os2/glut_shapes.cpp
src/glut/os2/glut_stroke.cpp
src/glut/os2/glut_swap.cpp
src/glut/os2/glut_teapot.cpp
src/glut/os2/glut_tr24.cpp
src/glut/os2/glut_util.cpp
src/glut/os2/glut_vidresize.cpp
src/glut/os2/glut_warp.cpp
src/glut/os2/glutbitmap.h
src/glut/os2/glutstroke.h
src/glut/os2/layerutil.h
src/glut/os2/libGlut.DEF
src/mesa/SConscript
src/mesa/drivers/allegro/amesa.c
src/mesa/drivers/allegro/direct.h
src/mesa/drivers/allegro/generic.h
src/mesa/drivers/d3d/D3DCAPS.CPP
src/mesa/drivers/d3d/D3DHAL.H
src/mesa/drivers/d3d/D3DInit.cpp
src/mesa/drivers/d3d/D3DMESA.H
src/mesa/drivers/d3d/D3DRaster.cpp
src/mesa/drivers/d3d/D3DTEXT.CPP
src/mesa/drivers/d3d/D3DTextureMgr.cpp
src/mesa/drivers/d3d/D3DTextureMgr.h
src/mesa/drivers/d3d/D3DUTILS.CPP
src/mesa/drivers/d3d/DDrawPROCS.c
src/mesa/drivers/d3d/DEBUG.C
src/mesa/drivers/d3d/DEBUG.H
src/mesa/drivers/d3d/DbgEnv.bat
src/mesa/drivers/d3d/MAKEFILE
src/mesa/drivers/d3d/OPENGL32.DEF
src/mesa/drivers/d3d/WGL.C
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h
src/mesa/shader/arbprogparse.c
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_atom_shader.h
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_program.h
src/mesa/state_tracker/st_cb_rasterpos.c
src/mesa/state_tracker/st_cb_strings.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_extensions.c
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_framebuffer.c
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_mesa_to_tgsi.h
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/st_program.h
src/mesa/state_tracker/st_texture.c
winddk.py

diff --git a/.gitattributes b/.gitattributes
new file mode 100755 (executable)
index 0000000..23c6280
--- /dev/null
@@ -0,0 +1,4 @@
+*.dsp -crlf
+*.dsw -crlf
+*.sln -crlf
+*.vcproj -crlf
index e4926f29b61af2e3c67c2b784dba6997d875976c..8013e7c3b2ee06f77db761164d86e7020b9293e7 100644 (file)
@@ -1,13 +1,5 @@
 #######################################################################
 # Top-level SConstruct
-
-import os
-import os.path
-import sys
-
-
-#######################################################################
-# Configuration options
 #
 # For example, invoke scons as 
 #
@@ -28,19 +20,21 @@ import sys
 # to get the full list of options. See scons manpage for more info.
 #  
 
-platform_map = {
-       'linux2': 'linux',
-       'win32': 'winddk',
-}
+import os
+import os.path
+import sys
+
+import common
 
-default_platform = platform_map.get(sys.platform, sys.platform)
+#######################################################################
+# Configuration options
 
-if default_platform in ('linux', 'freebsd', 'darwin'):
+if common.default_platform in ('linux', 'freebsd', 'darwin'):
        default_statetrackers = 'mesa'
        default_drivers = 'softpipe,failover,i915simple,i965simple'
        default_winsys = 'xlib'
        default_dri = 'yes'
-elif default_platform in ('winddk',):
+elif common.default_platform in ('winddk',):
        default_statetrackers = 'none'
        default_drivers = 'softpipe,i915simple'
        default_winsys = 'none'
@@ -50,36 +44,13 @@ else:
        default_winsys = 'all'
        default_dri = 'no'
 
-
-# TODO: auto-detect defaults
-opts = Options('config.py')
-opts.Add(BoolOption('debug', 'build debug version', False))
-opts.Add(EnumOption('machine', 'use machine-specific assembly code', 'x86',
-                     allowed_values=('generic', 'x86', 'x86-64')))
-opts.Add(EnumOption('platform', 'target platform', default_platform,
-                     allowed_values=('linux', 'cell', 'winddk')))
+opts = common.Options()
 opts.Add(ListOption('statetrackers', 'state_trackers to build', default_statetrackers,
-                     [
-                       'mesa', 
-                     ],
-                     ))
+                     ['mesa']))
 opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers,
-                     [
-                       'softpipe', 
-                       'failover', 
-                       'i915simple', 
-                       'i965simple', 
-                       'cell',
-                     ],
-                     ))
+                     ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell']))
 opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
-                     [
-                       'xlib', 
-                       'intel',
-                     ],
-                     ))
-opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
-opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
+                     ['xlib', 'intel'])) 
 
 env = Environment(
        options = opts, 
@@ -151,17 +122,17 @@ if msvc:
                cflags = [
                        '/Od', # disable optimizations
                        '/Oy-', # disable frame pointer omission
-                       '/Zi', # enable enable debugging information
                ]
        else:
                cflags = [
                        '/Ox', # maximum optimizations
                        '/Os', # favor code space
-                       '/Zi', # enable enable debugging information
                ]
        env.Append(CFLAGS = cflags)
        env.Append(CXXFLAGS = cflags)
-
+       # Put debugging information in a separate .pdb file for each object file as
+       # descrived in the scons manpage
+       env['CCPDBFLAGS'] = '/Zi /Fd${TARGET}.pdb'
 
 # Defines
 if debug:
@@ -249,64 +220,20 @@ if platform not in ('winddk',):
                'Xfixes',
        ])
 
-Export('env')
-
-
-#######################################################################
-# Convenience Library Builder
-# based on the stock StaticLibrary and SharedLibrary builders
-
-def createConvenienceLibBuilder(env):
-    """This is a utility function that creates the ConvenienceLibrary
-    Builder in an Environment if it is not there already.
-
-    If it is already there, we return the existing one.
-    """
-
-    try:
-        convenience_lib = env['BUILDERS']['ConvenienceLibrary']
-    except KeyError:
-        action_list = [ Action("$ARCOM", "$ARCOMSTR") ]
-        if env.Detect('ranlib'):
-            ranlib_action = Action("$RANLIBCOM", "$RANLIBCOMSTR")
-            action_list.append(ranlib_action)
-
-        convenience_lib = Builder(action = action_list,
-                                  emitter = '$LIBEMITTER',
-                                  prefix = '$LIBPREFIX',
-                                  suffix = '$LIBSUFFIX',
-                                  src_suffix = '$SHOBJSUFFIX',
-                                  src_builder = 'SharedObject')
-        env['BUILDERS']['ConvenienceLibrary'] = convenience_lib
-        env['BUILDERS']['Library'] = convenience_lib
+# Convenience library support
+common.createConvenienceLibBuilder(env)
 
-    return convenience_lib
-
-createConvenienceLibBuilder(env)
+Export('env')
 
 
 #######################################################################
 # Invoke SConscripts
 
-# Put build output in a separate dir, which depends on the current configuration
-# See also http://www.scons.org/wiki/AdvancedBuildExample
-build_topdir = 'build'
-build_subdir = platform
-if dri:
-       build_subdir += "-dri"
-if llvm:
-       build_subdir += "-llvm"
-if x86:
-       build_subdir += "-x86"
-if debug:
-       build_subdir += "-debug"
-build_dir = os.path.join(build_topdir, build_subdir)
-
 # TODO: Build several variants at the same time?
 # http://www.scons.org/wiki/SimultaneousVariantBuilds
 
 SConscript(
        'src/SConscript',
-       build_dir = build_dir,
+       build_dir = common.make_build_dir(env),
        duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
 )
diff --git a/common.py b/common.py
new file mode 100644 (file)
index 0000000..b65ed7e
--- /dev/null
+++ b/common.py
@@ -0,0 +1,116 @@
+#######################################################################
+# Common SCons code
+
+import os
+import os.path
+import sys
+import platform as _platform
+
+
+#######################################################################
+# Defaults
+
+_platform_map = {
+       'linux2': 'linux',
+       'win32': 'winddk',
+}
+
+default_platform = sys.platform
+default_platform = _platform_map.get(default_platform, default_platform)
+
+_machine_map = {
+       'x86': 'x86',
+       'i386': 'x86',
+       'i486': 'x86',
+       'i586': 'x86',
+       'i686': 'x86',
+       'x86_64': 'x86_64',
+}
+if 'PROCESSOR_ARCHITECTURE' in os.environ:
+       default_machine = os.environ['PROCESSOR_ARCHITECTURE']
+else:
+       default_machine = _platform.machine()
+default_machine = _machine_map.get(default_machine, 'generic')
+
+if default_platform in ('linux', 'freebsd', 'darwin'):
+       default_dri = 'yes'
+elif default_platform in ('winddk',):
+       default_dri = 'no'
+else:
+       default_dri = 'no'
+
+
+#######################################################################
+# Common options
+
+def Options():
+       from SCons.Options import Options
+       from SCons.Options.BoolOption import BoolOption
+       from SCons.Options.EnumOption import EnumOption
+       opts = Options('config.py')
+       opts.Add(BoolOption('debug', 'build debug version', 'no'))
+       opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
+                                                                                        allowed_values=('generic', 'x86', 'x86_64')))
+       opts.Add(EnumOption('platform', 'target platform', default_platform,
+                                                                                        allowed_values=('linux', 'cell', 'winddk')))
+       opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
+       opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
+       return opts
+
+
+#######################################################################
+# Convenience Library Builder
+# based on the stock StaticLibrary and SharedLibrary builders
+
+import SCons.Action
+import SCons.Builder
+
+def createConvenienceLibBuilder(env):
+    """This is a utility function that creates the ConvenienceLibrary
+    Builder in an Environment if it is not there already.
+
+    If it is already there, we return the existing one.
+    """
+
+    try:
+        convenience_lib = env['BUILDERS']['ConvenienceLibrary']
+    except KeyError:
+        action_list = [ SCons.Action.Action("$ARCOM", "$ARCOMSTR") ]
+        if env.Detect('ranlib'):
+            ranlib_action = SCons.Action.Action("$RANLIBCOM", "$RANLIBCOMSTR")
+            action_list.append(ranlib_action)
+
+        convenience_lib = SCons.Builder.Builder(action = action_list,
+                                  emitter = '$LIBEMITTER',
+                                  prefix = '$LIBPREFIX',
+                                  suffix = '$LIBSUFFIX',
+                                  src_suffix = '$SHOBJSUFFIX',
+                                  src_builder = 'SharedObject')
+        env['BUILDERS']['ConvenienceLibrary'] = convenience_lib
+        env['BUILDERS']['Library'] = convenience_lib
+
+    return convenience_lib
+
+
+#######################################################################
+# Build
+
+def make_build_dir(env):
+       # Put build output in a separate dir, which depends on the current configuration
+       # See also http://www.scons.org/wiki/AdvancedBuildExample
+       build_topdir = 'build'
+       build_subdir = env['platform']
+       if env['dri']:
+               build_subdir += "-dri"
+       if env['llvm']:
+               build_subdir += "-llvm"
+       if env['machine'] != 'generic':
+               build_subdir += '-' + env['machine']
+       if env['debug']:
+               build_subdir += "-debug"
+       build_dir = os.path.join(build_topdir, build_subdir)
+       # Place the .sconsign file on the builddir too, to avoid issues with different scons
+       # versions building the same source file
+       env.SConsignFile(os.path.join(build_dir, '.sconsign'))
+       return build_dir
+
index ce595076bd5c912f449c9dfb5b3fbff76e97a533..97e1ffb7a754d7a40fbdca5a01a188193cc41c85 100644 (file)
-File: docs/README.WIN32\r
-\r
-Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net\r
-\r
-Quick Start\r
------ -----\r
-\r
-Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same\r
-directory.  The libs and demos build separately, so if you do not care\r
-about the demos or GLUT, you only need to unzip MesaLib.  If you unzip\r
-more than one ZIP file, they all need to be unzipped into the same\r
-directory.  Don't worry, you will not overwrite anything.\r
-\r
-The Windows build system uses Microsoft Visual Studio.  Project files\r
-for a specific version of Visual Studio are in their own directory in\r
-the top-level "windows" directory.  For example, Visual Studio 8 files\r
-are in windows/VC8.\r
-\r
-Support has been dropped for versions of Visual Studio prior to 8. The\r
-main reason is because Microsoft now provides a free compiler and\r
-developer environment.  Visual Studio Express can be found at\r
-\r
-http://msdn.microsoft.com/vstudio/express/visualc/default.aspx\r
-\r
-You'll also need the Platform SDK.  Instructions for obtaining and\r
-using the SDK with Visual Studio Express can be found at\r
-\r
-http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/\r
-\r
-If you are stuck using VC6 or VC7, you may start with these project\r
-files, but you may need to modify them to reflect changes in the\r
-Mesa source code tree.  If you sucessfully update the project files,\r
-please submit them to the author of this document so that they may\r
-be included in the next distribution. \r
-\r
-The project files to build the core Mesa library, Windows Mesa\r
-drivers, OSMesa, and GLU are in the mesa directory.  The project files\r
-to build GLUT and some demo programs are in the progs directory.\r
-\r
-Makefiles are no longer shipped or supported, but can be generated\r
-from the projects using Visual Studio.\r
-\r
-\r
-Windows Drivers\r
-------- -------\r
-\r
-At this time, only the GDI driver is known to work.  Most of the demos\r
-in progs/demos should work with this driver.\r
-\r
-Source code also exists in the tree for other drivers in\r
-src/mesa/drivers/windows, but the status of this code is unknown.\r
-\r
-The GDI driver operates basically by writing pixel spans into a DIB\r
-section and then blitting the DIB to the window.  The driver was\r
-recently cleaned up and rewitten and so may have bugs or may be\r
-missing some functionality.  The older versions of the CVS source may\r
-be useful in figuring out any problems, or report them to me.\r
-\r
-To build Mesa with the GDI driver, build the mesa, gdi, and glu\r
-projects in the Visual Studio workspace found at\r
-\r
-       windows/VC8/mesa/mesa.sln\r
-\r
-The osmesa DLL can also be built with the osmesa project.\r
-\r
-The build system creates a lib top-level directory and copies\r
-resulting LIB and DLL files to this lib directory.  The files are:\r
-\r
-       OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB\r
-       OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL\r
-\r
-If the MesaDemos ZIP file was extracted, the DLL files are also copied\r
-to the demos directory.  This facilitates running the demos as described\r
-below.\r
-\r
-\r
-GLUT and Demos\r
----- --- -----\r
-\r
-A Visual Studio workspace can be found at \r
-\r
-       windows/VC8/progs/progs.sln\r
-\r
-It can be used to build GLUT and a few demos.  The GLUT lib and DLL\r
-are copied to the top-level lib directory, along with the Mesa libs.\r
-\r
-The demo build system expects to find the LIB files in the top level\r
-lib directory, so you must build the Mesa libs first.  The demo\r
-executables are placed in the demos directory, because some of them\r
-rely on data files found there.  Also, the Mesa lib DLL's were copied\r
-there by the Mesa lib build process.  Therefore, you should be able to\r
-simply run the demo executables from the demo directory.\r
-\r
-If you want to run the demos from the Visual Studio, you may have to\r
-change the startup directory and explicitly state where the executables are.\r
-\r
-You may also build all the demo programs by using a makefile.  Go to\r
-the progs/demos directory and make sure you have executed VCVARS32.BAT\r
-or whatever setup script is appropriate for your compiler.  Then,\r
-\r
-       nmake -f Makefile.win\r
-\r
-should build all the demos.\r
-\r
-\r
-Build System Notes\r
------ ------ -----\r
-\r
-VC6 (not actively supported)\r
----\r
-\r
-Visual Studio 6 does not recognize files with the .cc extension as C++\r
-language files, without a lot of unnatural tweaking.  So, the VC6\r
-build process uses custom build steps to compile these files in the\r
-GLU library.\r
-\r
-Two additional configurations are provided, Debug x86 and Release x86\r
-that activate the shader code compilation by defining SLANG_86.  It is\r
-unknown if and how this works.\r
-\r
-VC7 (not actively supported)\r
----\r
-\r
-The above-mentioned .cc problem does not exist in this version.\r
-\r
-VC8\r
----\r
-\r
-No notes.\r
-\r
-\r
-General\r
--------\r
-\r
-After building, you can copy the above DLL files to a place in your\r
-PATH such as $SystemRoot/SYSTEM32.  If you don't like putting things\r
-in a system directory, place them in the same directory as the\r
-executable(s).  Be careful about accidentially overwriting files of\r
-the same name in the SYSTEM32 directory.\r
-\r
-The DLL files are built so that the external entry points use the\r
-stdcall calling convention.\r
-\r
-Static LIB files are not built.  The LIB files that are built with are\r
-the linker import files associated with the DLL files.\r
-\r
-The si-glu sources are used to build the GLU libs.  This was done\r
-mainly to get the better tessellator code.\r
-\r
-To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE\r
-to the project settings.  You will also need to edit src/mesa.def to\r
-change all the gl* symbols to mgl*.  Because this is easy to do with a\r
-global replace operation in a text editor, no additional mangled\r
-version of mesa.def is maintained or shipped.\r
-\r
-If you have a Windows-related build problem or question, it is\r
-probably better to direct it to me (kschultz@users.sourceforge.net),\r
-rather than directly to the other Mesa developers.  I will help you as\r
-much as I can.  I also monitor the Mesa mailing lists and will answer\r
-questions in this area there as well.\r
-\r
-\r
-Karl Schultz\r
+File: docs/README.WIN32
+
+Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
+
+Quick Start
+----- -----
+
+Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
+directory.  The libs and demos build separately, so if you do not care
+about the demos or GLUT, you only need to unzip MesaLib.  If you unzip
+more than one ZIP file, they all need to be unzipped into the same
+directory.  Don't worry, you will not overwrite anything.
+
+The Windows build system uses Microsoft Visual Studio.  Project files
+for a specific version of Visual Studio are in their own directory in
+the top-level "windows" directory.  For example, Visual Studio 8 files
+are in windows/VC8.
+
+Support has been dropped for versions of Visual Studio prior to 8. The
+main reason is because Microsoft now provides a free compiler and
+developer environment.  Visual Studio Express can be found at
+
+http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
+
+You'll also need the Platform SDK.  Instructions for obtaining and
+using the SDK with Visual Studio Express can be found at
+
+http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
+
+If you are stuck using VC6 or VC7, you may start with these project
+files, but you may need to modify them to reflect changes in the
+Mesa source code tree.  If you sucessfully update the project files,
+please submit them to the author of this document so that they may
+be included in the next distribution. 
+
+The project files to build the core Mesa library, Windows Mesa
+drivers, OSMesa, and GLU are in the mesa directory.  The project files
+to build GLUT and some demo programs are in the progs directory.
+
+Makefiles are no longer shipped or supported, but can be generated
+from the projects using Visual Studio.
+
+
+Windows Drivers
+------- -------
+
+At this time, only the GDI driver is known to work.  Most of the demos
+in progs/demos should work with this driver.
+
+Source code also exists in the tree for other drivers in
+src/mesa/drivers/windows, but the status of this code is unknown.
+
+The GDI driver operates basically by writing pixel spans into a DIB
+section and then blitting the DIB to the window.  The driver was
+recently cleaned up and rewitten and so may have bugs or may be
+missing some functionality.  The older versions of the CVS source may
+be useful in figuring out any problems, or report them to me.
+
+To build Mesa with the GDI driver, build the mesa, gdi, and glu
+projects in the Visual Studio workspace found at
+
+       windows/VC8/mesa/mesa.sln
+
+The osmesa DLL can also be built with the osmesa project.
+
+The build system creates a lib top-level directory and copies
+resulting LIB and DLL files to this lib directory.  The files are:
+
+       OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
+       OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
+
+If the MesaDemos ZIP file was extracted, the DLL files are also copied
+to the demos directory.  This facilitates running the demos as described
+below.
+
+
+GLUT and Demos
+---- --- -----
+
+A Visual Studio workspace can be found at 
+
+       windows/VC8/progs/progs.sln
+
+It can be used to build GLUT and a few demos.  The GLUT lib and DLL
+are copied to the top-level lib directory, along with the Mesa libs.
+
+The demo build system expects to find the LIB files in the top level
+lib directory, so you must build the Mesa libs first.  The demo
+executables are placed in the demos directory, because some of them
+rely on data files found there.  Also, the Mesa lib DLL's were copied
+there by the Mesa lib build process.  Therefore, you should be able to
+simply run the demo executables from the demo directory.
+
+If you want to run the demos from the Visual Studio, you may have to
+change the startup directory and explicitly state where the executables are.
+
+You may also build all the demo programs by using a makefile.  Go to
+the progs/demos directory and make sure you have executed VCVARS32.BAT
+or whatever setup script is appropriate for your compiler.  Then,
+
+       nmake -f Makefile.win
+
+should build all the demos.
+
+
+Build System Notes
+----- ------ -----
+
+VC6 (not actively supported)
+---
+
+Visual Studio 6 does not recognize files with the .cc extension as C++
+language files, without a lot of unnatural tweaking.  So, the VC6
+build process uses custom build steps to compile these files in the
+GLU library.
+
+Two additional configurations are provided, Debug x86 and Release x86
+that activate the shader code compilation by defining SLANG_86.  It is
+unknown if and how this works.
+
+VC7 (not actively supported)
+---
+
+The above-mentioned .cc problem does not exist in this version.
+
+VC8
+---
+
+No notes.
+
+
+General
+-------
+
+After building, you can copy the above DLL files to a place in your
+PATH such as $SystemRoot/SYSTEM32.  If you don't like putting things
+in a system directory, place them in the same directory as the
+executable(s).  Be careful about accidentially overwriting files of
+the same name in the SYSTEM32 directory.
+
+The DLL files are built so that the external entry points use the
+stdcall calling convention.
+
+Static LIB files are not built.  The LIB files that are built with are
+the linker import files associated with the DLL files.
+
+The si-glu sources are used to build the GLU libs.  This was done
+mainly to get the better tessellator code.
+
+To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
+to the project settings.  You will also need to edit src/mesa.def to
+change all the gl* symbols to mgl*.  Because this is easy to do with a
+global replace operation in a text editor, no additional mangled
+version of mesa.def is maintained or shipped.
+
+If you have a Windows-related build problem or question, it is
+probably better to direct it to me (kschultz@users.sourceforge.net),
+rather than directly to the other Mesa developers.  I will help you as
+much as I can.  I also monitor the Mesa mailing lists and will answer
+questions in this area there as well.
+
+
+Karl Schultz
index e67900474e2f4683fedafe25d41b2c6b871e1690..d8dd555b05efd58405ae728ad8e0b476ac5f720f 100644 (file)
@@ -1,33 +1,33 @@
-\r
-default: full\r
-\r
-all: full subset\r
-\r
-%.tag: %.doxy\r
-       doxygen $<\r
-\r
-FULL = \\r
-       main.doxy \\r
-       math.doxy \\r
-       vbo.doxy \\r
-       glapi.doxy \\r
-       shader.doxy \\r
-       swrast.doxy \\r
-       swrast_setup.doxy \\r
-       tnl.doxy \\r
-       tnl_dd.doxy\r
-\r
-full: $(FULL:.doxy=.tag)\r
-       $(foreach FILE,$(FULL),doxygen $(FILE);)\r
-\r
-SUBSET = \\r
-       main.doxy \\r
-       math.doxy \\r
-       miniglx.doxy\r
-\r
-subset: $(SUBSET:.doxy=.tag)\r
-       $(foreach FILE,$(SUBSET),doxygen $(FILE);)\r
-\r
-clean:\r
-       rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)\r
-       rm -rf *.tag\r
+
+default: full
+
+all: full subset
+
+%.tag: %.doxy
+       doxygen $<
+
+FULL = \
+       main.doxy \
+       math.doxy \
+       vbo.doxy \
+       glapi.doxy \
+       shader.doxy \
+       swrast.doxy \
+       swrast_setup.doxy \
+       tnl.doxy \
+       tnl_dd.doxy
+
+full: $(FULL:.doxy=.tag)
+       $(foreach FILE,$(FULL),doxygen $(FILE);)
+
+SUBSET = \
+       main.doxy \
+       math.doxy \
+       miniglx.doxy
+
+subset: $(SUBSET:.doxy=.tag)
+       $(foreach FILE,$(SUBSET),doxygen $(FILE);)
+
+clean:
+       rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
+       rm -rf *.tag
index 7a53f6ebc29538fa737ad2aa07e5aa4033789eb4..331b931928e809c9a744c640877e795533f4ac55 100644 (file)
@@ -1,19 +1,19 @@
-doxygen tnl_dd.doxy\r
-doxygen vbo.doxy\r
-doxygen math.doxy\r
-doxygen swrast.doxy\r
-doxygen swrast_setup.doxy\r
-doxygen tnl.doxy\r
-doxygen core.doxy\r
-doxygen glapi.doxy\r
-doxygen shader.doxy\r
-\r
-echo Building again, to resolve tags\r
-doxygen tnl_dd.doxy\r
-doxygen vbo.doxy\r
-doxygen math.doxy\r
-doxygen swrast.doxy\r
-doxygen swrast_setup.doxy\r
-doxygen tnl.doxy\r
-doxygen glapi.doxy\r
-doxygen shader.doxy\r
+doxygen tnl_dd.doxy
+doxygen vbo.doxy
+doxygen math.doxy
+doxygen swrast.doxy
+doxygen swrast_setup.doxy
+doxygen tnl.doxy
+doxygen core.doxy
+doxygen glapi.doxy
+doxygen shader.doxy
+
+echo Building again, to resolve tags
+doxygen tnl_dd.doxy
+doxygen vbo.doxy
+doxygen math.doxy
+doxygen swrast.doxy
+doxygen swrast_setup.doxy
+doxygen tnl.doxy
+doxygen glapi.doxy
+doxygen shader.doxy
index d9ba61c175a24b0c2b6f38bb639189524746f534..0f9f7895714728fb7aabebad0dec59af5f3c3346 100644 (file)
@@ -1,79 +1,79 @@
-/****************************************************************************\r
-*\r
-*                      Mesa bindings for SciTech MGL\r
-*\r
-*                   Copyright (C) 1996 SciTech Software.\r
-*                           All rights reserved.\r
-*\r
-* Filename:     mglmesa.h\r
-* Version:      Revision: 1.1.1.1\r
-*\r
-* Language:     ANSI C\r
-* Environment:  Any\r
-*\r
-* Description:  Header file for the Mesa/OpenGL interface bindings for the\r
-*               SciTech MGL graphics library. Uses the MGL internal\r
-*               device context structures to get direct access to the\r
-*               high performance MGL rasterization functions for maximum\r
-*               performance. Utilizes the VESA VBE/AF Accelerator Functions\r
-*               via the MGL's accelerated device driver functions, as well\r
-*               as basic DirectDraw accelerated functions provided by the\r
-*               MGL.\r
-*\r
-* This library is free software; you can redistribute it and/or\r
-* modify it under the terms of the GNU Library General Public\r
-* License as published by the Free Software Foundation; either\r
-* version 2 of the License, or (at your option) any later version.\r
-*\r
-* This library is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-* Library General Public License for more details.\r
-*\r
-* You should have received a copy of the GNU Library General Public\r
-* License along with this library; if not, write to the Free\r
-* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-*\r
-*\r
-****************************************************************************/\r
-\r
-#ifndef __MGLMESA_H\r
-#define __MGLMESA_H\r
-\r
-#include "mgraph.h"\r
-\r
-/*------------------------- Function Prototypes ---------------------------*/\r
-\r
-#ifdef  __cplusplus\r
-extern "C" {            /* Use "C" linkage when in C++ mode */\r
-#endif\r
-\r
-#ifndef __WINDOWS__\r
-#define GLAPIENTRY\r
-#endif\r
-\r
-#ifdef  __WINDOWS__\r
-bool    GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);\r
-#endif\r
-void    GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);\r
-bool    GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);\r
-bool    GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);\r
-void    GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);\r
-void    GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);\r
-void    GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);\r
-\r
-/* Palette manipulation support. The reason we provide palette manipulation\r
- * routines is so that when rendering in double buffered modes with a\r
- * software backbuffer, the palette for the backbuffer is kept consistent\r
- * with the hardware front buffer.\r
- */\r
-\r
-void    GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);\r
-void    GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);\r
-void    GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);\r
-\r
-#ifdef  __cplusplus\r
-}                       /* End of "C" linkage for C++   */\r
-#endif  /* __cplusplus */\r
-\r
-#endif  /* __MGLMESA_H */\r
+/****************************************************************************
+*
+*                      Mesa bindings for SciTech MGL
+*
+*                   Copyright (C) 1996 SciTech Software.
+*                           All rights reserved.
+*
+* Filename:     mglmesa.h
+* Version:      Revision: 1.1.1.1
+*
+* Language:     ANSI C
+* Environment:  Any
+*
+* Description:  Header file for the Mesa/OpenGL interface bindings for the
+*               SciTech MGL graphics library. Uses the MGL internal
+*               device context structures to get direct access to the
+*               high performance MGL rasterization functions for maximum
+*               performance. Utilizes the VESA VBE/AF Accelerator Functions
+*               via the MGL's accelerated device driver functions, as well
+*               as basic DirectDraw accelerated functions provided by the
+*               MGL.
+*
+* 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.
+*
+*
+****************************************************************************/
+
+#ifndef __MGLMESA_H
+#define __MGLMESA_H
+
+#include "mgraph.h"
+
+/*------------------------- Function Prototypes ---------------------------*/
+
+#ifdef  __cplusplus
+extern "C" {            /* Use "C" linkage when in C++ mode */
+#endif
+
+#ifndef __WINDOWS__
+#define GLAPIENTRY
+#endif
+
+#ifdef  __WINDOWS__
+bool    GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);
+#endif
+void    GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);
+bool    GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);
+bool    GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);
+void    GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);
+void    GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);
+void    GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);
+
+/* Palette manipulation support. The reason we provide palette manipulation
+ * routines is so that when rendering in double buffered modes with a
+ * software backbuffer, the palette for the backbuffer is kept consistent
+ * with the hardware front buffer.
+ */
+
+void    GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);
+void    GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);
+void    GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);
+
+#ifdef  __cplusplus
+}                       /* End of "C" linkage for C++   */
+#endif  /* __cplusplus */
+
+#endif  /* __MGLMESA_H */
index 374de48bd5e83e271d247f0e4caa356e0fdc41dd..09fe4c64c289e306be7f9afaf2affcacd36a4223 100644 (file)
-BACKGROUND = 0.000 0.500 0.700\r
-\r
-ANAME = AXLE1\r
-ARADIUS = 1.000\r
-AAXIS = 2\r
-APOSITION = -7.000 0.000 0.000\r
-ACOLOR = 0.800 0.500 0.200\r
-ALENGTH = 6.000\r
-AMOTORED = 1\r
-AANGULARVELOCITY = 90.000\r
-ADIRECTION = 1\r
-\r
-ANAME = AXLE2\r
-ARADIUS = 1.000\r
-AAXIS = 2\r
-APOSITION = -3.000 0.000 0.000\r
-ACOLOR = 0.800 0.500 0.200\r
-ALENGTH = 12.000\r
-AMOTORED = 0\r
-\r
-ANAME = AXLE3\r
-ARADIUS = 1.000\r
-AAXIS = 2\r
-APOSITION = 1.000 0.000 0.000\r
-ACOLOR = 0.800 0.500 0.200\r
-ALENGTH = 6.000\r
-AMOTORED = 0\r
-\r
-ANAME = AXLE4\r
-ARADIUS = 1.000\r
-AAXIS = 2\r
-APOSITION = 8.000 0.000 0.000\r
-ACOLOR = 0.800 0.500 0.200\r
-ALENGTH = 18.000\r
-AMOTORED = 0\r
-\r
-ANAME = AXLE5\r
-ARADIUS = 1.000\r
-AAXIS = 1\r
-APOSITION = 8.000 -8.200 -7.400\r
-ACOLOR = 0.800 0.500 0.200\r
-ALENGTH = 12.000\r
-AMOTORED = 0\r
-\r
-GNAME = GEAR1\r
-GTYPE = NORMAL\r
-GRADIUS = 2.200\r
-GWIDTH = 3.000\r
-GTEETH = 40\r
-GTOOTHDEPTH = 0.500\r
-GCOLOR = 0.500 0.500 0.500\r
-GAXLE = AXLE1\r
-GPOSITION = 0.000\r
-\r
-GNAME = GEAR2\r
-GTYPE = NORMAL\r
-GRADIUS = 2.200\r
-GWIDTH = 3.000\r
-GTEETH = 30\r
-GTOOTHDEPTH = 0.500\r
-GCOLOR = 0.500 0.500 0.500\r
-GAXLE = AXLE2\r
-GPOSITION = 0.000\r
-\r
-GNAME = GEAR3\r
-GTYPE = NORMAL\r
-GRADIUS = 2.200\r
-GWIDTH = 3.000\r
-GTEETH = 20\r
-GTOOTHDEPTH = 0.500\r
-GCOLOR = 0.500 0.500 0.500\r
-GAXLE = AXLE3\r
-GPOSITION = 0.000\r
-\r
-GNAME = GEAR4\r
-GTYPE = NORMAL\r
-GRADIUS = 1.700\r
-GWIDTH = 1.000\r
-GTEETH = 20\r
-GTOOTHDEPTH = 0.500\r
-GCOLOR = 0.500 0.500 0.500\r
-GAXLE = AXLE2\r
-GPOSITION = 5.000\r
-\r
-GNAME = GEAR5\r
-GTYPE = NORMAL\r
-GRADIUS = 3.000\r
-GWIDTH = 1.000\r
-GTEETH = 20\r
-GTOOTHDEPTH = 0.500\r
-GCOLOR = 0.500 0.500 0.500\r
-GAXLE = AXLE4\r
-GPOSITION = 5.000\r
-\r
-GNAME = GEAR6\r
-GTYPE = BEVEL\r
-GFACE = 0\r
-GRADIUS = 4.000\r
-GWIDTH = 1.000\r
-GTEETH = 20\r
-GTOOTHDEPTH = 1.700\r
-GCOLOR = 0.500 0.500 0.500\r
-GAXLE = AXLE4\r
-GPOSITION = -4.000\r
-\r
-GNAME = GEAR7\r
-GTYPE = BEVEL\r
-GFACE = 0\r
-GRADIUS = 4.000\r
-GWIDTH = 1.000\r
-GTEETH = 20\r
-GTOOTHDEPTH = 1.700\r
-GCOLOR = 0.500 0.500 0.500\r
-GAXLE = AXLE5\r
-GPOSITION = 5.000\r
-\r
-BELTNAME = BELT1\r
-GEAR1NAME = GEAR5\r
-GEAR2NAME = GEAR4\r
+BACKGROUND = 0.000 0.500 0.700
+
+ANAME = AXLE1
+ARADIUS = 1.000
+AAXIS = 2
+APOSITION = -7.000 0.000 0.000
+ACOLOR = 0.800 0.500 0.200
+ALENGTH = 6.000
+AMOTORED = 1
+AANGULARVELOCITY = 90.000
+ADIRECTION = 1
+
+ANAME = AXLE2
+ARADIUS = 1.000
+AAXIS = 2
+APOSITION = -3.000 0.000 0.000
+ACOLOR = 0.800 0.500 0.200
+ALENGTH = 12.000
+AMOTORED = 0
+
+ANAME = AXLE3
+ARADIUS = 1.000
+AAXIS = 2
+APOSITION = 1.000 0.000 0.000
+ACOLOR = 0.800 0.500 0.200
+ALENGTH = 6.000
+AMOTORED = 0
+
+ANAME = AXLE4
+ARADIUS = 1.000
+AAXIS = 2
+APOSITION = 8.000 0.000 0.000
+ACOLOR = 0.800 0.500 0.200
+ALENGTH = 18.000
+AMOTORED = 0
+
+ANAME = AXLE5
+ARADIUS = 1.000
+AAXIS = 1
+APOSITION = 8.000 -8.200 -7.400
+ACOLOR = 0.800 0.500 0.200
+ALENGTH = 12.000
+AMOTORED = 0
+
+GNAME = GEAR1
+GTYPE = NORMAL
+GRADIUS = 2.200
+GWIDTH = 3.000
+GTEETH = 40
+GTOOTHDEPTH = 0.500
+GCOLOR = 0.500 0.500 0.500
+GAXLE = AXLE1
+GPOSITION = 0.000
+
+GNAME = GEAR2
+GTYPE = NORMAL
+GRADIUS = 2.200
+GWIDTH = 3.000
+GTEETH = 30
+GTOOTHDEPTH = 0.500
+GCOLOR = 0.500 0.500 0.500
+GAXLE = AXLE2
+GPOSITION = 0.000
+
+GNAME = GEAR3
+GTYPE = NORMAL
+GRADIUS = 2.200
+GWIDTH = 3.000
+GTEETH = 20
+GTOOTHDEPTH = 0.500
+GCOLOR = 0.500 0.500 0.500
+GAXLE = AXLE3
+GPOSITION = 0.000
+
+GNAME = GEAR4
+GTYPE = NORMAL
+GRADIUS = 1.700
+GWIDTH = 1.000
+GTEETH = 20
+GTOOTHDEPTH = 0.500
+GCOLOR = 0.500 0.500 0.500
+GAXLE = AXLE2
+GPOSITION = 5.000
+
+GNAME = GEAR5
+GTYPE = NORMAL
+GRADIUS = 3.000
+GWIDTH = 1.000
+GTEETH = 20
+GTOOTHDEPTH = 0.500
+GCOLOR = 0.500 0.500 0.500
+GAXLE = AXLE4
+GPOSITION = 5.000
+
+GNAME = GEAR6
+GTYPE = BEVEL
+GFACE = 0
+GRADIUS = 4.000
+GWIDTH = 1.000
+GTEETH = 20
+GTOOTHDEPTH = 1.700
+GCOLOR = 0.500 0.500 0.500
+GAXLE = AXLE4
+GPOSITION = -4.000
+
+GNAME = GEAR7
+GTYPE = BEVEL
+GFACE = 0
+GRADIUS = 4.000
+GWIDTH = 1.000
+GTEETH = 20
+GTOOTHDEPTH = 1.700
+GCOLOR = 0.500 0.500 0.500
+GAXLE = AXLE5
+GPOSITION = 5.000
+
+BELTNAME = BELT1
+GEAR1NAME = GEAR5
+GEAR2NAME = GEAR4
index 1424a740d7b95200f8ec4efc80426551daf90836..cf7cebf2249cd148d2a923c98757adda1eef3b1e 100644 (file)
-Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216\r
-\r
-Named object: "Object01"\r
-Tri-mesh, Vertices: 20     Faces: 36\r
-Vertex list:\r
-Vertex 0:  X: -210     Y: -432.781738     Z: 180.000031\r
-Vertex 1:  X: -610.810303     Y: 144.260559     Z: 103.580154\r
-Vertex 2:  X: 56.586655     Y: 144.260544     Z: -128.902023\r
-Vertex 3:  X: -75.776352     Y: 144.260605     Z: 565.321838\r
-Vertex 4:  X: -462.815979     Y: -347.937683     Z: 131.797302\r
-Vertex 5:  X: -616.506042     Y: -126.67173     Z: 102.494209\r
-Vertex 6:  X: -41.847229     Y: -347.937683     Z: -14.843644\r
-Vertex 7:  X: 60.375015     Y: -126.671753     Z: -133.291641\r
-Vertex 8:  X: -125.336807     Y: -347.937653     Z: 423.046448\r
-Vertex 9:  X: -73.868958     Y: -126.671692     Z: 570.797424\r
-Vertex 10:  X: -448.353271     Y: 237.304672     Z: -92.34951\r
-Vertex 11:  X: -192.440964     Y: 237.304672     Z: -181.494431\r
-Vertex 12:  X: 145.038193     Y: 237.304672     Z: 109.754745\r
-Vertex 13:  X: 94.283768     Y: 237.304688     Z: 375.953766\r
-Vertex 14:  X: -326.684937     Y: 237.304733     Z: 522.594727\r
-Vertex 15:  X: -531.842834     Y: 237.304718     Z: 345.540588\r
-Vertex 16:  X: -331.419525     Y: -225.964966     Z: -168.564438\r
-Vertex 17:  X: 152.575485     Y: -225.964935     Z: 249.129868\r
-Vertex 18:  X: -451.155914     Y: -225.964905     Z: 459.434662\r
-Vertex 19:  X: -298.413483     Y: 423.31897     Z: 163.142761\r
-Face list:\r
-Face 0:    A:0 B:4 C:6 AB:1 BC:1 CA:1\r
-Face 1:    A:4 B:5 C:16 AB:1 BC:1 CA:1\r
-Face 2:    A:4 B:16 C:6 AB:1 BC:1 CA:1\r
-Face 3:    A:6 B:16 C:7 AB:1 BC:1 CA:1\r
-Face 4:    A:5 B:1 C:10 AB:1 BC:1 CA:1\r
-Face 5:    A:5 B:10 C:16 AB:1 BC:1 CA:1\r
-Face 6:    A:16 B:10 C:11 AB:1 BC:1 CA:1\r
-Face 7:    A:16 B:11 C:7 AB:1 BC:1 CA:1\r
-Face 8:    A:7 B:11 C:2 AB:1 BC:1 CA:1\r
-Face 9:    A:0 B:6 C:8 AB:1 BC:1 CA:1\r
-Face 10:    A:6 B:7 C:17 AB:1 BC:1 CA:1\r
-Face 11:    A:6 B:17 C:8 AB:1 BC:1 CA:1\r
-Face 12:    A:8 B:17 C:9 AB:1 BC:1 CA:1\r
-Face 13:    A:7 B:2 C:12 AB:1 BC:1 CA:1\r
-Face 14:    A:7 B:12 C:17 AB:1 BC:1 CA:1\r
-Face 15:    A:17 B:12 C:13 AB:1 BC:1 CA:1\r
-Face 16:    A:17 B:13 C:9 AB:1 BC:1 CA:1\r
-Face 17:    A:9 B:13 C:3 AB:1 BC:1 CA:1\r
-Face 18:    A:0 B:8 C:4 AB:1 BC:1 CA:1\r
-Face 19:    A:8 B:9 C:18 AB:1 BC:1 CA:1\r
-Face 20:    A:8 B:18 C:4 AB:1 BC:1 CA:1\r
-Face 21:    A:4 B:18 C:5 AB:1 BC:1 CA:1\r
-Face 22:    A:9 B:3 C:14 AB:1 BC:1 CA:1\r
-Face 23:    A:9 B:14 C:18 AB:1 BC:1 CA:1\r
-Face 24:    A:18 B:14 C:15 AB:1 BC:1 CA:1\r
-Face 25:    A:18 B:15 C:5 AB:1 BC:1 CA:1\r
-Face 26:    A:5 B:15 C:1 AB:1 BC:1 CA:1\r
-Face 27:    A:1 B:15 C:10 AB:1 BC:1 CA:1\r
-Face 28:    A:15 B:14 C:19 AB:1 BC:1 CA:1\r
-Face 29:    A:15 B:19 C:10 AB:1 BC:1 CA:1\r
-Face 30:    A:10 B:19 C:11 AB:1 BC:1 CA:1\r
-Face 31:    A:14 B:3 C:13 AB:1 BC:1 CA:1\r
-Face 32:    A:14 B:13 C:19 AB:1 BC:1 CA:1\r
-Face 33:    A:19 B:13 C:12 AB:1 BC:1 CA:1\r
-Face 34:    A:19 B:12 C:11 AB:1 BC:1 CA:1\r
-\r
-                                     Page 1\r
-\r
-\r
-\r
-Face 35:    A:11 B:12 C:2 AB:1 BC:1 CA:1\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-                                     Page 2\r
-\r
-\r
-\r
+Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
+
+Named object: "Object01"
+Tri-mesh, Vertices: 20     Faces: 36
+Vertex list:
+Vertex 0:  X: -210     Y: -432.781738     Z: 180.000031
+Vertex 1:  X: -610.810303     Y: 144.260559     Z: 103.580154
+Vertex 2:  X: 56.586655     Y: 144.260544     Z: -128.902023
+Vertex 3:  X: -75.776352     Y: 144.260605     Z: 565.321838
+Vertex 4:  X: -462.815979     Y: -347.937683     Z: 131.797302
+Vertex 5:  X: -616.506042     Y: -126.67173     Z: 102.494209
+Vertex 6:  X: -41.847229     Y: -347.937683     Z: -14.843644
+Vertex 7:  X: 60.375015     Y: -126.671753     Z: -133.291641
+Vertex 8:  X: -125.336807     Y: -347.937653     Z: 423.046448
+Vertex 9:  X: -73.868958     Y: -126.671692     Z: 570.797424
+Vertex 10:  X: -448.353271     Y: 237.304672     Z: -92.34951
+Vertex 11:  X: -192.440964     Y: 237.304672     Z: -181.494431
+Vertex 12:  X: 145.038193     Y: 237.304672     Z: 109.754745
+Vertex 13:  X: 94.283768     Y: 237.304688     Z: 375.953766
+Vertex 14:  X: -326.684937     Y: 237.304733     Z: 522.594727
+Vertex 15:  X: -531.842834     Y: 237.304718     Z: 345.540588
+Vertex 16:  X: -331.419525     Y: -225.964966     Z: -168.564438
+Vertex 17:  X: 152.575485     Y: -225.964935     Z: 249.129868
+Vertex 18:  X: -451.155914     Y: -225.964905     Z: 459.434662
+Vertex 19:  X: -298.413483     Y: 423.31897     Z: 163.142761
+Face list:
+Face 0:    A:0 B:4 C:6 AB:1 BC:1 CA:1
+Face 1:    A:4 B:5 C:16 AB:1 BC:1 CA:1
+Face 2:    A:4 B:16 C:6 AB:1 BC:1 CA:1
+Face 3:    A:6 B:16 C:7 AB:1 BC:1 CA:1
+Face 4:    A:5 B:1 C:10 AB:1 BC:1 CA:1
+Face 5:    A:5 B:10 C:16 AB:1 BC:1 CA:1
+Face 6:    A:16 B:10 C:11 AB:1 BC:1 CA:1
+Face 7:    A:16 B:11 C:7 AB:1 BC:1 CA:1
+Face 8:    A:7 B:11 C:2 AB:1 BC:1 CA:1
+Face 9:    A:0 B:6 C:8 AB:1 BC:1 CA:1
+Face 10:    A:6 B:7 C:17 AB:1 BC:1 CA:1
+Face 11:    A:6 B:17 C:8 AB:1 BC:1 CA:1
+Face 12:    A:8 B:17 C:9 AB:1 BC:1 CA:1
+Face 13:    A:7 B:2 C:12 AB:1 BC:1 CA:1
+Face 14:    A:7 B:12 C:17 AB:1 BC:1 CA:1
+Face 15:    A:17 B:12 C:13 AB:1 BC:1 CA:1
+Face 16:    A:17 B:13 C:9 AB:1 BC:1 CA:1
+Face 17:    A:9 B:13 C:3 AB:1 BC:1 CA:1
+Face 18:    A:0 B:8 C:4 AB:1 BC:1 CA:1
+Face 19:    A:8 B:9 C:18 AB:1 BC:1 CA:1
+Face 20:    A:8 B:18 C:4 AB:1 BC:1 CA:1
+Face 21:    A:4 B:18 C:5 AB:1 BC:1 CA:1
+Face 22:    A:9 B:3 C:14 AB:1 BC:1 CA:1
+Face 23:    A:9 B:14 C:18 AB:1 BC:1 CA:1
+Face 24:    A:18 B:14 C:15 AB:1 BC:1 CA:1
+Face 25:    A:18 B:15 C:5 AB:1 BC:1 CA:1
+Face 26:    A:5 B:15 C:1 AB:1 BC:1 CA:1
+Face 27:    A:1 B:15 C:10 AB:1 BC:1 CA:1
+Face 28:    A:15 B:14 C:19 AB:1 BC:1 CA:1
+Face 29:    A:15 B:19 C:10 AB:1 BC:1 CA:1
+Face 30:    A:10 B:19 C:11 AB:1 BC:1 CA:1
+Face 31:    A:14 B:3 C:13 AB:1 BC:1 CA:1
+Face 32:    A:14 B:13 C:19 AB:1 BC:1 CA:1
+Face 33:    A:19 B:13 C:12 AB:1 BC:1 CA:1
+Face 34:    A:19 B:12 C:11 AB:1 BC:1 CA:1
+
+                                     Page 1
+
+
+
+Face 35:    A:11 B:12 C:2 AB:1 BC:1 CA:1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                                     Page 2
+
+
+
index 6bd41f403372bcb7a515e86c59d469b172fe45af..605a62baa451e9fa94ddf93292dbbf149cd9fee7 100644 (file)
-Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216\r
-\r
-Named object: "Object01"\r
-Tri-mesh, Vertices: 40     Faces: 80\r
-Vertex list:\r
-Vertex 0:  X: -50.170624     Y: -0.000026     Z: -240.147842\r
-Vertex 1:  X: -80.584503     Y: -63.958851     Z: -205.014572\r
-Vertex 2:  X: -129.795166     Y: -39.528744     Z: -148.16774\r
-Vertex 3:  X: -129.795166     Y: 39.528721     Z: -148.16774\r
-Vertex 4:  X: -80.584503     Y: 63.958797     Z: -205.014572\r
-Vertex 5:  X: 85.963654     Y: -0.000002     Z: 31.490465\r
-Vertex 6:  X: 39.614838     Y: -63.958828     Z: 34.827602\r
-Vertex 7:  X: -35.37915     Y: -39.528728     Z: 40.227196\r
-Vertex 8:  X: -35.37912     Y: 39.528736     Z: 40.227188\r
-Vertex 9:  X: 39.614838     Y: 63.95882     Z: 34.827595\r
-Vertex 10:  X: -9.852051     Y: 0.000023     Z: 319.829254\r
-Vertex 11:  X: -44.985352     Y: -63.958805     Z: 289.415405\r
-Vertex 12:  X: -101.832199     Y: -39.528709     Z: 240.204758\r
-Vertex 13:  X: -101.832184     Y: 39.528755     Z: 240.204773\r
-Vertex 14:  X: -44.985352     Y: 63.958843     Z: 289.415405\r
-Vertex 15:  X: -281.490326     Y: 0.000035     Z: 455.963654\r
-Vertex 16:  X: -284.827484     Y: -63.958794     Z: 409.614868\r
-Vertex 17:  X: -290.227112     Y: -39.528702     Z: 334.62085\r
-Vertex 18:  X: -290.227112     Y: 39.528763     Z: 334.62088\r
-Vertex 19:  X: -284.827484     Y: 63.958855     Z: 409.614838\r
-Vertex 20:  X: -569.829163     Y: 0.000026     Z: 360.14798\r
-Vertex 21:  X: -539.415344     Y: -63.958801     Z: 325.014709\r
-Vertex 22:  X: -490.204712     Y: -39.528709     Z: 268.167847\r
-Vertex 23:  X: -490.204712     Y: 39.528755     Z: 268.167847\r
-Vertex 24:  X: -539.415344     Y: 63.958847     Z: 325.014679\r
-Vertex 25:  X: -705.963684     Y: 0.000002     Z: 88.509598\r
-Vertex 26:  X: -659.614807     Y: -63.958824     Z: 85.172462\r
-Vertex 27:  X: -584.62085     Y: -39.528725     Z: 79.77285\r
-Vertex 28:  X: -584.62085     Y: 39.52874     Z: 79.77285\r
-Vertex 29:  X: -659.614868     Y: 63.958824     Z: 85.172447\r
-Vertex 30:  X: -610.147827     Y: -0.000023     Z: -199.829361\r
-Vertex 31:  X: -575.014587     Y: -63.958847     Z: -169.415497\r
-Vertex 32:  X: -518.167725     Y: -39.528744     Z: -120.204819\r
-Vertex 33:  X: -518.167725     Y: 39.528721     Z: -120.204834\r
-Vertex 34:  X: -575.014587     Y: 63.958801     Z: -169.415497\r
-Vertex 35:  X: -338.509338     Y: -0.000035     Z: -335.963745\r
-Vertex 36:  X: -335.172241     Y: -63.958858     Z: -289.614868\r
-Vertex 37:  X: -329.772675     Y: -39.528751     Z: -214.620865\r
-Vertex 38:  X: -329.772675     Y: 39.528713     Z: -214.620865\r
-Vertex 39:  X: -335.172241     Y: 63.95879     Z: -289.614899\r
-Face list:\r
-Face 0:    A:0 B:6 C:1 AB:0 BC:1 CA:1\r
-Smoothing:  1\r
-Face 1:    A:0 B:5 C:6 AB:1 BC:1 CA:0\r
-Smoothing:  1\r
-Face 2:    A:1 B:7 C:2 AB:0 BC:1 CA:1\r
-Smoothing:  2\r
-Face 3:    A:1 B:6 C:7 AB:1 BC:1 CA:0\r
-Smoothing:  2\r
-Face 4:    A:2 B:8 C:3 AB:0 BC:1 CA:1\r
-Smoothing:  3\r
-Face 5:    A:2 B:7 C:8 AB:1 BC:1 CA:0\r
-Smoothing:  3\r
-Face 6:    A:3 B:9 C:4 AB:0 BC:1 CA:1\r
-Smoothing:  4\r
-Face 7:    A:3 B:8 C:9 AB:1 BC:1 CA:0\r
-\r
-                                     Page 1\r
-\r
-\r
-\r
-Smoothing:  4\r
-Face 8:    A:4 B:5 C:0 AB:0 BC:1 CA:1\r
-Smoothing:  5\r
-Face 9:    A:4 B:9 C:5 AB:1 BC:1 CA:0\r
-Smoothing:  5\r
-Face 10:    A:5 B:11 C:6 AB:0 BC:1 CA:1\r
-Smoothing:  6\r
-Face 11:    A:5 B:10 C:11 AB:1 BC:1 CA:0\r
-Smoothing:  6\r
-Face 12:    A:6 B:12 C:7 AB:0 BC:1 CA:1\r
-Smoothing:  7\r
-Face 13:    A:6 B:11 C:12 AB:1 BC:1 CA:0\r
-Smoothing:  7\r
-Face 14:    A:7 B:13 C:8 AB:0 BC:1 CA:1\r
-Smoothing:  8\r
-Face 15:    A:7 B:12 C:13 AB:1 BC:1 CA:0\r
-Smoothing:  8\r
-Face 16:    A:8 B:14 C:9 AB:0 BC:1 CA:1\r
-Smoothing:  9\r
-Face 17:    A:8 B:13 C:14 AB:1 BC:1 CA:0\r
-Smoothing:  9\r
-Face 18:    A:9 B:10 C:5 AB:0 BC:1 CA:1\r
-Smoothing:  10\r
-Face 19:    A:9 B:14 C:10 AB:1 BC:1 CA:0\r
-Smoothing:  10\r
-Face 20:    A:10 B:16 C:11 AB:0 BC:1 CA:1\r
-Smoothing:  11\r
-Face 21:    A:10 B:15 C:16 AB:1 BC:1 CA:0\r
-Smoothing:  11\r
-Face 22:    A:11 B:17 C:12 AB:0 BC:1 CA:1\r
-Smoothing:  12\r
-Face 23:    A:11 B:16 C:17 AB:1 BC:1 CA:0\r
-Smoothing:  12\r
-Face 24:    A:12 B:18 C:13 AB:0 BC:1 CA:1\r
-Smoothing:  13\r
-Face 25:    A:12 B:17 C:18 AB:1 BC:1 CA:0\r
-Smoothing:  13\r
-Face 26:    A:13 B:19 C:14 AB:0 BC:1 CA:1\r
-Smoothing:  14\r
-Face 27:    A:13 B:18 C:19 AB:1 BC:1 CA:0\r
-Smoothing:  14\r
-Face 28:    A:14 B:15 C:10 AB:0 BC:1 CA:1\r
-Smoothing:  15\r
-Face 29:    A:14 B:19 C:15 AB:1 BC:1 CA:0\r
-Smoothing:  15\r
-Face 30:    A:15 B:21 C:16 AB:0 BC:1 CA:1\r
-Smoothing:  16\r
-Face 31:    A:15 B:20 C:21 AB:1 BC:1 CA:0\r
-Smoothing:  16\r
-Face 32:    A:16 B:22 C:17 AB:0 BC:1 CA:1\r
-Smoothing:  17\r
-Face 33:    A:16 B:21 C:22 AB:1 BC:1 CA:0\r
-Smoothing:  17\r
-Face 34:    A:17 B:23 C:18 AB:0 BC:1 CA:1\r
-Smoothing:  18\r
-Face 35:    A:17 B:22 C:23 AB:1 BC:1 CA:0\r
-Smoothing:  18\r
-Face 36:    A:18 B:24 C:19 AB:0 BC:1 CA:1\r
-Smoothing:  19\r
-Face 37:    A:18 B:23 C:24 AB:1 BC:1 CA:0\r
-Smoothing:  19\r
-\r
-                                     Page 2\r
-\r
-\r
-\r
-Face 38:    A:19 B:20 C:15 AB:0 BC:1 CA:1\r
-Smoothing:  20\r
-Face 39:    A:19 B:24 C:20 AB:1 BC:1 CA:0\r
-Smoothing:  20\r
-Face 40:    A:20 B:26 C:21 AB:0 BC:1 CA:1\r
-Smoothing:  21\r
-Face 41:    A:20 B:25 C:26 AB:1 BC:1 CA:0\r
-Smoothing:  21\r
-Face 42:    A:21 B:27 C:22 AB:0 BC:1 CA:1\r
-Smoothing:  22\r
-Face 43:    A:21 B:26 C:27 AB:1 BC:1 CA:0\r
-Smoothing:  22\r
-Face 44:    A:22 B:28 C:23 AB:0 BC:1 CA:1\r
-Smoothing:  23\r
-Face 45:    A:22 B:27 C:28 AB:1 BC:1 CA:0\r
-Smoothing:  23\r
-Face 46:    A:23 B:29 C:24 AB:0 BC:1 CA:1\r
-Smoothing:  24\r
-Face 47:    A:23 B:28 C:29 AB:1 BC:1 CA:0\r
-Smoothing:  24\r
-Face 48:    A:24 B:25 C:20 AB:0 BC:1 CA:1\r
-Smoothing:  25\r
-Face 49:    A:24 B:29 C:25 AB:1 BC:1 CA:0\r
-Smoothing:  25\r
-Face 50:    A:25 B:31 C:26 AB:0 BC:1 CA:1\r
-Smoothing:  26\r
-Face 51:    A:25 B:30 C:31 AB:1 BC:1 CA:0\r
-Smoothing:  26\r
-Face 52:    A:26 B:32 C:27 AB:0 BC:1 CA:1\r
-Smoothing:  27\r
-Face 53:    A:26 B:31 C:32 AB:1 BC:1 CA:0\r
-Smoothing:  27\r
-Face 54:    A:27 B:33 C:28 AB:0 BC:1 CA:1\r
-Smoothing:  28\r
-Face 55:    A:27 B:32 C:33 AB:1 BC:1 CA:0\r
-Smoothing:  28\r
-Face 56:    A:28 B:34 C:29 AB:0 BC:1 CA:1\r
-Smoothing:  29\r
-Face 57:    A:28 B:33 C:34 AB:1 BC:1 CA:0\r
-Smoothing:  29\r
-Face 58:    A:29 B:30 C:25 AB:0 BC:1 CA:1\r
-Smoothing:  30\r
-Face 59:    A:29 B:34 C:30 AB:1 BC:1 CA:0\r
-Smoothing:  30\r
-Face 60:    A:30 B:36 C:31 AB:0 BC:1 CA:1\r
-Smoothing:  31\r
-Face 61:    A:30 B:35 C:36 AB:1 BC:1 CA:0\r
-Smoothing:  31\r
-Face 62:    A:31 B:37 C:32 AB:0 BC:1 CA:1\r
-Smoothing:  32\r
-Face 63:    A:31 B:36 C:37 AB:1 BC:1 CA:0\r
-Smoothing:  32\r
-Face 64:    A:32 B:38 C:33 AB:0 BC:1 CA:1\r
-Smoothing:  1\r
-Face 65:    A:32 B:37 C:38 AB:1 BC:1 CA:0\r
-Smoothing:  1\r
-Face 66:    A:33 B:39 C:34 AB:0 BC:1 CA:1\r
-Smoothing:  2\r
-Face 67:    A:33 B:38 C:39 AB:1 BC:1 CA:0\r
-Smoothing:  2\r
-Face 68:    A:34 B:35 C:30 AB:0 BC:1 CA:1\r
-\r
-                                     Page 3\r
-\r
-\r
-\r
-Smoothing:  3\r
-Face 69:    A:34 B:39 C:35 AB:1 BC:1 CA:0\r
-Smoothing:  3\r
-Face 70:    A:35 B:1 C:36 AB:0 BC:1 CA:1\r
-Smoothing:  4\r
-Face 71:    A:35 B:0 C:1 AB:1 BC:1 CA:0\r
-Smoothing:  4\r
-Face 72:    A:36 B:2 C:37 AB:0 BC:1 CA:1\r
-Smoothing:  5\r
-Face 73:    A:36 B:1 C:2 AB:1 BC:1 CA:0\r
-Smoothing:  5\r
-Face 74:    A:37 B:3 C:38 AB:0 BC:1 CA:1\r
-Smoothing:  6\r
-Face 75:    A:37 B:2 C:3 AB:1 BC:1 CA:0\r
-Smoothing:  6\r
-Face 76:    A:38 B:4 C:39 AB:0 BC:1 CA:1\r
-Smoothing:  7\r
-Face 77:    A:38 B:3 C:4 AB:1 BC:1 CA:0\r
-Smoothing:  7\r
-Face 78:    A:39 B:0 C:35 AB:0 BC:1 CA:1\r
-Smoothing:  8\r
-Face 79:    A:39 B:4 C:0 AB:1 BC:1 CA:0\r
-Smoothing:  8\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-                                     Page 4\r
-\r
-\r
-\r
+Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
+
+Named object: "Object01"
+Tri-mesh, Vertices: 40     Faces: 80
+Vertex list:
+Vertex 0:  X: -50.170624     Y: -0.000026     Z: -240.147842
+Vertex 1:  X: -80.584503     Y: -63.958851     Z: -205.014572
+Vertex 2:  X: -129.795166     Y: -39.528744     Z: -148.16774
+Vertex 3:  X: -129.795166     Y: 39.528721     Z: -148.16774
+Vertex 4:  X: -80.584503     Y: 63.958797     Z: -205.014572
+Vertex 5:  X: 85.963654     Y: -0.000002     Z: 31.490465
+Vertex 6:  X: 39.614838     Y: -63.958828     Z: 34.827602
+Vertex 7:  X: -35.37915     Y: -39.528728     Z: 40.227196
+Vertex 8:  X: -35.37912     Y: 39.528736     Z: 40.227188
+Vertex 9:  X: 39.614838     Y: 63.95882     Z: 34.827595
+Vertex 10:  X: -9.852051     Y: 0.000023     Z: 319.829254
+Vertex 11:  X: -44.985352     Y: -63.958805     Z: 289.415405
+Vertex 12:  X: -101.832199     Y: -39.528709     Z: 240.204758
+Vertex 13:  X: -101.832184     Y: 39.528755     Z: 240.204773
+Vertex 14:  X: -44.985352     Y: 63.958843     Z: 289.415405
+Vertex 15:  X: -281.490326     Y: 0.000035     Z: 455.963654
+Vertex 16:  X: -284.827484     Y: -63.958794     Z: 409.614868
+Vertex 17:  X: -290.227112     Y: -39.528702     Z: 334.62085
+Vertex 18:  X: -290.227112     Y: 39.528763     Z: 334.62088
+Vertex 19:  X: -284.827484     Y: 63.958855     Z: 409.614838
+Vertex 20:  X: -569.829163     Y: 0.000026     Z: 360.14798
+Vertex 21:  X: -539.415344     Y: -63.958801     Z: 325.014709
+Vertex 22:  X: -490.204712     Y: -39.528709     Z: 268.167847
+Vertex 23:  X: -490.204712     Y: 39.528755     Z: 268.167847
+Vertex 24:  X: -539.415344     Y: 63.958847     Z: 325.014679
+Vertex 25:  X: -705.963684     Y: 0.000002     Z: 88.509598
+Vertex 26:  X: -659.614807     Y: -63.958824     Z: 85.172462
+Vertex 27:  X: -584.62085     Y: -39.528725     Z: 79.77285
+Vertex 28:  X: -584.62085     Y: 39.52874     Z: 79.77285
+Vertex 29:  X: -659.614868     Y: 63.958824     Z: 85.172447
+Vertex 30:  X: -610.147827     Y: -0.000023     Z: -199.829361
+Vertex 31:  X: -575.014587     Y: -63.958847     Z: -169.415497
+Vertex 32:  X: -518.167725     Y: -39.528744     Z: -120.204819
+Vertex 33:  X: -518.167725     Y: 39.528721     Z: -120.204834
+Vertex 34:  X: -575.014587     Y: 63.958801     Z: -169.415497
+Vertex 35:  X: -338.509338     Y: -0.000035     Z: -335.963745
+Vertex 36:  X: -335.172241     Y: -63.958858     Z: -289.614868
+Vertex 37:  X: -329.772675     Y: -39.528751     Z: -214.620865
+Vertex 38:  X: -329.772675     Y: 39.528713     Z: -214.620865
+Vertex 39:  X: -335.172241     Y: 63.95879     Z: -289.614899
+Face list:
+Face 0:    A:0 B:6 C:1 AB:0 BC:1 CA:1
+Smoothing:  1
+Face 1:    A:0 B:5 C:6 AB:1 BC:1 CA:0
+Smoothing:  1
+Face 2:    A:1 B:7 C:2 AB:0 BC:1 CA:1
+Smoothing:  2
+Face 3:    A:1 B:6 C:7 AB:1 BC:1 CA:0
+Smoothing:  2
+Face 4:    A:2 B:8 C:3 AB:0 BC:1 CA:1
+Smoothing:  3
+Face 5:    A:2 B:7 C:8 AB:1 BC:1 CA:0
+Smoothing:  3
+Face 6:    A:3 B:9 C:4 AB:0 BC:1 CA:1
+Smoothing:  4
+Face 7:    A:3 B:8 C:9 AB:1 BC:1 CA:0
+
+                                     Page 1
+
+
+
+Smoothing:  4
+Face 8:    A:4 B:5 C:0 AB:0 BC:1 CA:1
+Smoothing:  5
+Face 9:    A:4 B:9 C:5 AB:1 BC:1 CA:0
+Smoothing:  5
+Face 10:    A:5 B:11 C:6 AB:0 BC:1 CA:1
+Smoothing:  6
+Face 11:    A:5 B:10 C:11 AB:1 BC:1 CA:0
+Smoothing:  6
+Face 12:    A:6 B:12 C:7 AB:0 BC:1 CA:1
+Smoothing:  7
+Face 13:    A:6 B:11 C:12 AB:1 BC:1 CA:0
+Smoothing:  7
+Face 14:    A:7 B:13 C:8 AB:0 BC:1 CA:1
+Smoothing:  8
+Face 15:    A:7 B:12 C:13 AB:1 BC:1 CA:0
+Smoothing:  8
+Face 16:    A:8 B:14 C:9 AB:0 BC:1 CA:1
+Smoothing:  9
+Face 17:    A:8 B:13 C:14 AB:1 BC:1 CA:0
+Smoothing:  9
+Face 18:    A:9 B:10 C:5 AB:0 BC:1 CA:1
+Smoothing:  10
+Face 19:    A:9 B:14 C:10 AB:1 BC:1 CA:0
+Smoothing:  10
+Face 20:    A:10 B:16 C:11 AB:0 BC:1 CA:1
+Smoothing:  11
+Face 21:    A:10 B:15 C:16 AB:1 BC:1 CA:0
+Smoothing:  11
+Face 22:    A:11 B:17 C:12 AB:0 BC:1 CA:1
+Smoothing:  12
+Face 23:    A:11 B:16 C:17 AB:1 BC:1 CA:0
+Smoothing:  12
+Face 24:    A:12 B:18 C:13 AB:0 BC:1 CA:1
+Smoothing:  13
+Face 25:    A:12 B:17 C:18 AB:1 BC:1 CA:0
+Smoothing:  13
+Face 26:    A:13 B:19 C:14 AB:0 BC:1 CA:1
+Smoothing:  14
+Face 27:    A:13 B:18 C:19 AB:1 BC:1 CA:0
+Smoothing:  14
+Face 28:    A:14 B:15 C:10 AB:0 BC:1 CA:1
+Smoothing:  15
+Face 29:    A:14 B:19 C:15 AB:1 BC:1 CA:0
+Smoothing:  15
+Face 30:    A:15 B:21 C:16 AB:0 BC:1 CA:1
+Smoothing:  16
+Face 31:    A:15 B:20 C:21 AB:1 BC:1 CA:0
+Smoothing:  16
+Face 32:    A:16 B:22 C:17 AB:0 BC:1 CA:1
+Smoothing:  17
+Face 33:    A:16 B:21 C:22 AB:1 BC:1 CA:0
+Smoothing:  17
+Face 34:    A:17 B:23 C:18 AB:0 BC:1 CA:1
+Smoothing:  18
+Face 35:    A:17 B:22 C:23 AB:1 BC:1 CA:0
+Smoothing:  18
+Face 36:    A:18 B:24 C:19 AB:0 BC:1 CA:1
+Smoothing:  19
+Face 37:    A:18 B:23 C:24 AB:1 BC:1 CA:0
+Smoothing:  19
+
+                                     Page 2
+
+
+
+Face 38:    A:19 B:20 C:15 AB:0 BC:1 CA:1
+Smoothing:  20
+Face 39:    A:19 B:24 C:20 AB:1 BC:1 CA:0
+Smoothing:  20
+Face 40:    A:20 B:26 C:21 AB:0 BC:1 CA:1
+Smoothing:  21
+Face 41:    A:20 B:25 C:26 AB:1 BC:1 CA:0
+Smoothing:  21
+Face 42:    A:21 B:27 C:22 AB:0 BC:1 CA:1
+Smoothing:  22
+Face 43:    A:21 B:26 C:27 AB:1 BC:1 CA:0
+Smoothing:  22
+Face 44:    A:22 B:28 C:23 AB:0 BC:1 CA:1
+Smoothing:  23
+Face 45:    A:22 B:27 C:28 AB:1 BC:1 CA:0
+Smoothing:  23
+Face 46:    A:23 B:29 C:24 AB:0 BC:1 CA:1
+Smoothing:  24
+Face 47:    A:23 B:28 C:29 AB:1 BC:1 CA:0
+Smoothing:  24
+Face 48:    A:24 B:25 C:20 AB:0 BC:1 CA:1
+Smoothing:  25
+Face 49:    A:24 B:29 C:25 AB:1 BC:1 CA:0
+Smoothing:  25
+Face 50:    A:25 B:31 C:26 AB:0 BC:1 CA:1
+Smoothing:  26
+Face 51:    A:25 B:30 C:31 AB:1 BC:1 CA:0
+Smoothing:  26
+Face 52:    A:26 B:32 C:27 AB:0 BC:1 CA:1
+Smoothing:  27
+Face 53:    A:26 B:31 C:32 AB:1 BC:1 CA:0
+Smoothing:  27
+Face 54:    A:27 B:33 C:28 AB:0 BC:1 CA:1
+Smoothing:  28
+Face 55:    A:27 B:32 C:33 AB:1 BC:1 CA:0
+Smoothing:  28
+Face 56:    A:28 B:34 C:29 AB:0 BC:1 CA:1
+Smoothing:  29
+Face 57:    A:28 B:33 C:34 AB:1 BC:1 CA:0
+Smoothing:  29
+Face 58:    A:29 B:30 C:25 AB:0 BC:1 CA:1
+Smoothing:  30
+Face 59:    A:29 B:34 C:30 AB:1 BC:1 CA:0
+Smoothing:  30
+Face 60:    A:30 B:36 C:31 AB:0 BC:1 CA:1
+Smoothing:  31
+Face 61:    A:30 B:35 C:36 AB:1 BC:1 CA:0
+Smoothing:  31
+Face 62:    A:31 B:37 C:32 AB:0 BC:1 CA:1
+Smoothing:  32
+Face 63:    A:31 B:36 C:37 AB:1 BC:1 CA:0
+Smoothing:  32
+Face 64:    A:32 B:38 C:33 AB:0 BC:1 CA:1
+Smoothing:  1
+Face 65:    A:32 B:37 C:38 AB:1 BC:1 CA:0
+Smoothing:  1
+Face 66:    A:33 B:39 C:34 AB:0 BC:1 CA:1
+Smoothing:  2
+Face 67:    A:33 B:38 C:39 AB:1 BC:1 CA:0
+Smoothing:  2
+Face 68:    A:34 B:35 C:30 AB:0 BC:1 CA:1
+
+                                     Page 3
+
+
+
+Smoothing:  3
+Face 69:    A:34 B:39 C:35 AB:1 BC:1 CA:0
+Smoothing:  3
+Face 70:    A:35 B:1 C:36 AB:0 BC:1 CA:1
+Smoothing:  4
+Face 71:    A:35 B:0 C:1 AB:1 BC:1 CA:0
+Smoothing:  4
+Face 72:    A:36 B:2 C:37 AB:0 BC:1 CA:1
+Smoothing:  5
+Face 73:    A:36 B:1 C:2 AB:1 BC:1 CA:0
+Smoothing:  5
+Face 74:    A:37 B:3 C:38 AB:0 BC:1 CA:1
+Smoothing:  6
+Face 75:    A:37 B:2 C:3 AB:1 BC:1 CA:0
+Smoothing:  6
+Face 76:    A:38 B:4 C:39 AB:0 BC:1 CA:1
+Smoothing:  7
+Face 77:    A:38 B:3 C:4 AB:1 BC:1 CA:0
+Smoothing:  7
+Face 78:    A:39 B:0 C:35 AB:0 BC:1 CA:1
+Smoothing:  8
+Face 79:    A:39 B:4 C:0 AB:1 BC:1 CA:0
+Smoothing:  8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                                     Page 4
+
+
+
index 8196c1b348f14abb2530af8ba62d6b5a720d0c74..7053ebc86aa6f3092dc7f0e8c9dc126fa6150f57 100644 (file)
@@ -30,6 +30,7 @@ SOURCES = \
        bug_3050.c \
        bug_3101.c \
        bug_3195.c \
+       calibrate_rast.c \
        copypixrate.c \
        crossbar.c \
        cva.c \
diff --git a/progs/tests/calibrate_rast.c b/progs/tests/calibrate_rast.c
new file mode 100644 (file)
index 0000000..37d8ac8
--- /dev/null
@@ -0,0 +1,395 @@
+/*
+ * Automatic primitive rasterization precision test.
+ *
+ * Draw prims at various sub-pixel offsets and examine where the quad is
+ * actually drawn.
+ * Check if the range of offsets which paint the right pixels falls within
+ * OpenGL's specification.
+ * In case of failures, report the coordinate bias needed to fix the problem.
+ *
+ * Note that even Mesa/swrast fails some line tests.  This is because some
+ * window coordinates wind up as 53.9999 instead of 54, for example.  Enabling
+ * the small translation factor below fixes that.  Revisit someday...
+ *
+ * Brian Paul
+ * 28 Feb 2008
+ */
+
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <GL/glut.h>
+
+
+static int Width = 100, Height = 100;
+static int Win;
+static float Step = 0.125;
+#if 0
+/* This tiny offset fixes errors in Mesa/Xlib */
+static float Xtrans = 0.5 * 0.125;
+static float Ytrans = 0.5 * 0.125;
+#else
+static float Xtrans = 0.0;
+static float Ytrans = 0.0;
+#endif
+
+
+static void
+PointCalibrate(int xpos, int ypos)
+{
+   GLfloat rgba[4];
+   float x, y;
+   float xmin, ymin, xmax, ymax;
+
+   xmin = ymin = 1000.0;
+   xmax = ymax = -1000.0;
+
+   for (y = -1.0; y <= 1.0; y += Step) {
+      for (x = -1.0; x <= 1.0; x += Step) {
+         glClear(GL_COLOR_BUFFER_BIT);
+         glBegin(GL_POINTS);
+         glVertex2f(xpos + x, ypos + y);
+         glEnd();
+         glReadPixels(xpos, ypos, 1, 1, GL_RGBA, GL_FLOAT, rgba);
+         if (rgba[0] == 1.0 && rgba[1] == 1.0 && rgba[2] == 1.0) {
+            /* hit */
+            if (x < xmin)
+               xmin = x;
+            if (y < ymin)
+               ymin = y;
+            if (x > xmax)
+               xmax = x;
+            if (y > ymax)
+               ymax = y;
+         }
+      }
+   }
+
+   printf("Point at (%2d, %2d) drawn for x in [%6.3f, %6.3f] and y in [%6.3f, %6.3f]\n",
+          xpos, ypos,
+          xpos + xmin, xpos + xmax,
+          ypos + ymin, ypos + ymax);
+
+   if (xmax - xmin != 1.0 - Step) {
+      printf("  => Inconsistant X-axis rasterization!\n");
+   }
+   if (ymax - ymin != 1.0 - Step) {
+      printf("  => Inconsistant Y-axis rasterization!\n");
+   }
+   if (xmin < 0.0) {
+      printf("  => Points should be X biased by about %f\n", xmin);
+   }
+   if (ymin < 0.0) {
+      printf("  => Points should be Y biased by about %f\n", ymin);
+   }
+   if (xmax > 1.0) {
+      printf("  => Points should be X biased by about %f\n", 1.0 - xmax);
+   }
+   if (ymax > 1.0) {
+      printf("  => Points should be Y biased by about %f\n", 1.0 - ymax);
+   }
+
+}
+
+
+/**
+ * XXX Implement VLineCalibrate() someday
+ */
+static void
+HLineCalibrate(int xpos, int ypos, int len)
+{
+   GLfloat rgba[2][4];
+   float x, y;
+   float ymin, ymax;
+   float xmin_left, xmax_left, xmin_right, xmax_right;
+
+   xmin_left = xmin_right = 1000.0;
+   xmax_left = xmax_right = -1000.0;
+   ymin = 1000;
+   ymax = -1000.0;
+
+   /*
+    * First, check vertical positioning of the horizontal line
+    */
+   for (y = -1.0; y <= 1.0; y += Step) {
+      glClear(GL_COLOR_BUFFER_BIT);
+      glBegin(GL_LINES);
+      glVertex2f(xpos,       ypos + y);
+      glVertex2f(xpos + len, ypos + y);
+      glEnd();
+
+      glReadPixels(xpos + len / 2, ypos, 1, 1, GL_RGBA, GL_FLOAT, rgba);
+      if (rgba[0][0] == 1.0) {
+         /* hit */
+         if (y < ymin)
+            ymin = y;
+         if (y > ymax)
+            ymax = y;
+      }
+   }
+
+   printf("H-line at Y=%2d drawn for y in [%6.3f, %6.3f]\n",
+          ypos,
+          ypos + ymin, ypos + ymax);
+
+   if (ymax - ymin != 1.0 - Step) {
+      printf("  => Inconsistant Y-axis rasterization!\n");
+   }
+
+   if (ymin > 0.5 ) {
+      printf("  => Lines should be Y biased by about %f\n", ymin - 0.5);
+   }
+
+   if (ymax < 0.5 ) {
+      printf("  => Lines should be Y biased by about %f\n", 0.5 - ymax);
+   }
+
+   /*
+    * Second, check endpoints  (for Y at 1/2 pixel)
+    */
+   for (x = -1.0; x <= 1.0; x += Step) {
+      glClear(GL_COLOR_BUFFER_BIT);
+      glBegin(GL_LINES);
+      glVertex2f(xpos + x,       ypos + 0.5f);
+      glVertex2f(xpos + x + len, ypos + 0.5f);
+      glEnd();
+
+      /* left end */
+      glReadPixels(xpos - 1, ypos, 2, 1, GL_RGBA, GL_FLOAT, rgba);
+      if (rgba[0][0] == 0.0 && rgba[1][0] == 1.0) {
+         /* hit */
+         if (x < xmin_left)
+            xmin_left = x;
+         if (x > xmax_left)
+            xmax_left = x;
+      }
+
+      /* right end */
+      glReadPixels(xpos + len - 1, ypos, 2, 1, GL_RGBA, GL_FLOAT, rgba);
+      if (rgba[0][0] == 1.0 && rgba[1][0] == 0.0) {
+         /* hit */
+         if (x < xmin_right)
+            xmin_right = x;
+         if (x > xmax_right)
+            xmax_right = x;
+      }
+   }
+
+   printf("H-line [%d..%d) hit left end for x in [%6.3f, %6.3f] "
+          "hit right end for x in [%6.3f, %6.3f]\n",
+          xpos, xpos + len,
+          xpos + xmin_left, xpos + xmax_left,
+          xpos + len + xmin_right, xpos + len + xmax_right);
+
+   if (xmax_left - xmin_left > 1.0 - Step) {
+      printf("  => Inconsistant left-end rasterization!\n");
+   }
+   if (xmax_right - xmin_right > 1.0 - Step) {
+      printf("  => Inconsistant right-end rasterization!\n");
+   }
+
+   if (xmin_left != xmin_right ||
+       xmax_left != xmax_right) {
+      printf("  => Inconsistant length!\n");
+   }
+
+   if (xmin_left < 0.0) {
+      printf("  => Coords should be X biased by about %f\n", xmin_left );
+   }
+   if (xmin_right < 0.0) {
+      printf("  => Coords should be X biased by about %f\n", xmin_right );
+   }
+   if (xmax_left >= 1.0) {
+      printf("  => Coords should be X biased by about %f\n", -xmax_right + 1.0);
+   }
+   if (xmax_right >= 1.0) {
+      printf("  => Coords should be X biased by about %f\n", -xmax_right + 1.0);
+   }
+
+}
+
+
+static void
+QuadCalibrate(int xpos, int ypos, int width, int height)
+{
+   GLfloat rgba1[2][4];
+   GLfloat rgba2[2][4];
+   float x, y;
+   float xmin, ymin, xmax, ymax;
+
+   xmin = ymin = 1000.0;
+   xmax = ymax = -1000.0;
+
+   for (y = -1.0; y <= 1.0; y += Step) {
+      for (x = -1.0; x <= 1.0; x += Step) {
+         glClear(GL_COLOR_BUFFER_BIT);
+         glBegin(GL_QUADS);
+         glVertex2f(xpos + x,         ypos + y);
+         glVertex2f(xpos + x + width, ypos + y);
+         glVertex2f(xpos + x + width, ypos + y + height);
+         glVertex2f(xpos + x,         ypos + y + height);
+         glEnd();
+
+         /* horizontal measurement */
+         glReadPixels(xpos - 1, ypos + 2, 2, 1, GL_RGBA, GL_FLOAT, rgba1);
+         glReadPixels(xpos + width - 1, ypos + 2, 2, 1, GL_RGBA, GL_FLOAT, rgba2);
+         if (rgba1[0][0] == 0.0 && rgba1[1][0] == 1.0 &&
+             rgba2[0][0] == 1.0 && rgba2[1][0] == 0.0) {
+            if (x < xmin)
+               xmin = x;
+            if (x > xmax)
+               xmax = x;
+         }
+
+         /* vertical measurement */
+         glReadPixels(xpos + 2, ypos - 1, 1, 2, GL_RGBA, GL_FLOAT, rgba1);
+         glReadPixels(xpos + 2, ypos + height - 1, 1, 2, GL_RGBA, GL_FLOAT, rgba2);
+         if (rgba1[0][0] == 0.0 && rgba1[1][0] == 1.0 &&
+             rgba2[0][0] == 1.0 && rgba2[1][0] == 0.0) {
+            if (y < ymin)
+               ymin = y;
+            if (y > ymax)
+               ymax = y;
+         }
+      }
+   }
+
+   printf("Quad at (%2d, %2d)..(%2d, %2d) drawn"
+          " for x in [%6.3f, %6.3f] and y in [%6.3f, %6.3f]\n",
+          xpos, ypos,
+          xpos + width, ypos + height,
+          xpos + xmin, xpos + xmax,
+          ypos + ymin, ypos + ymax);
+
+   if (xmax - xmin != 1.0 - Step) {
+      printf("  => Inconsistant X-axis rasterization/size!\n");
+   }
+   if (ymax - ymin != 1.0 - Step) {
+      printf("  => Inconsistant Y-axis rasterization/size!\n");
+   }
+
+   if (xmin < -0.5) {
+      printf("  => Coords should be X biased by about %f\n", 0.5 + xmin );
+   }
+   if (ymin < -0.5) {
+      printf("  => Coords should be Y biased by about %f\n", 0.5 + ymin);
+   }
+   if (xmax > 0.5) {
+      printf("  => Coords should be X biased by about %f\n", -xmax + 0.5);
+   }
+   if (ymax > 0.5) {
+      printf("  => Coords should be Y biased by about %f\n", -ymax + 0.5);
+   }
+}
+
+
+/**
+ * Misc/disabled code for debugging.
+ */
+static void
+DebugTest(void)
+{
+   glClear(GL_COLOR_BUFFER_BIT);
+   glEnable(GL_BLEND);
+   glBlendFunc(GL_ONE, GL_ONE);
+
+   glColor3f(.5, .5, .5);
+
+   glBegin(GL_LINES);
+   glVertex2f(30, 35.5);
+   glVertex2f(54, 35.5);
+   glVertex2f(54, 35.5);
+   glVertex2f(66, 35.5);
+   glEnd();
+
+   glDisable(GL_BLEND);
+   glColor3f(1,1,1);
+}
+
+
+static void
+Draw(void)
+{
+   glClear(GL_COLOR_BUFFER_BIT);
+
+   glPushMatrix();
+   glTranslatef(Xtrans, Ytrans, 0);
+
+   PointCalibrate(1, 1);
+   PointCalibrate(50, 50);
+   PointCalibrate(28, 17);
+   PointCalibrate(17, 18);
+   printf("\n");
+
+   HLineCalibrate(5, 10, 10);
+   HLineCalibrate(25, 22, 12);
+   HLineCalibrate(54, 33, 12);
+   HLineCalibrate(54+12, 33, 12);
+   printf("\n");
+
+   QuadCalibrate(2, 2, 10, 10);
+   QuadCalibrate(50, 50, 10, 10);
+   QuadCalibrate(28, 17, 12, 12);
+   QuadCalibrate(17, 28, 12, 12);
+
+   (void) DebugTest;
+
+   glPopMatrix();
+
+   glutSwapBuffers();
+}
+
+
+static void
+Reshape(int width, int height)
+{
+   Width = width;
+   Height = height;
+   glViewport(0, 0, width, height);
+   glMatrixMode(GL_PROJECTION);
+   glLoadIdentity();
+   glOrtho(0, width, 0, height, -1, 1);
+   glMatrixMode(GL_MODELVIEW);
+   glLoadIdentity();
+}
+
+
+static void
+Key(unsigned char key, int x, int y)
+{
+   (void) x;
+   (void) y;
+   switch (key) {
+   case 27:
+      glutDestroyWindow(Win);
+      exit(0);
+      break;
+   }
+   glutPostRedisplay();
+}
+
+
+static void
+Init(void)
+{
+   printf("Measurement/callibration for basic prim rasterization...\n");
+   printf("GL_RENDERER: %s\n", (char*) glGetString(GL_RENDERER));
+}
+
+
+int
+main(int argc, char *argv[])
+{
+   glutInit(&argc, argv);
+   glutInitWindowPosition(0, 0);
+   glutInitWindowSize(Width, Height);
+   glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
+   Win = glutCreateWindow(argv[0]);
+   glutReshapeFunc(Reshape);
+   glutKeyboardFunc(Key);
+   glutDisplayFunc(Draw);
+   Init();
+   glutMainLoop();
+   return 0;
+}
index 3b0fe100b85d0ab03525aa08a03179bfc083cb5f..44ee128a4a24b7517c5cf0fc53af72abf44728ae 100644 (file)
@@ -88,44 +88,44 @@ struct cso_cache;
 
 struct cso_blend {
    struct pipe_blend_state state;
-   void   *data;
-   void   (*delete_state)(void *, void  *);
-   void   *context;
+   void *data;
+   void (*delete_state)(struct pipe_context *, void *);
+   struct pipe_context *context;
 };
 
 struct cso_depth_stencil_alpha {
    struct pipe_depth_stencil_alpha_state state;
    void *data;
-   void   (*delete_state)(void *, void  *);
-   void   *context;
+   void (*delete_state)(struct pipe_context *, void *);
+   struct pipe_context *context;
 };
 
 struct cso_rasterizer {
    struct pipe_rasterizer_state state;
    void *data;
-   void   (*delete_state)(void *, void  *);
-   void   *context;
+   void (*delete_state)(struct pipe_context *, void *);
+   struct pipe_context *context;
 };
 
 struct cso_fragment_shader {
    struct pipe_shader_state state;
    void *data;
-   void   (*delete_state)(void *, void  *);
-   void   *context;
+   void (*delete_state)(struct pipe_context *, void *);
+   struct pipe_context *context;
 };
 
 struct cso_vertex_shader {
    struct pipe_shader_state state;
    void *data;
-   void   (*delete_state)(void *, void  *);
-   void   *context;
+   void (*delete_state)(struct pipe_context *, void *);
+   struct pipe_context *context;
 };
 
 struct cso_sampler {
    struct pipe_sampler_state state;
    void *data;
-   void   (*delete_state)(void *, void  *);
-   void   *context;
+   void (*delete_state)(struct pipe_context *, void *);
+   struct pipe_context *context;
 };
 
 
index c9980f0b8355a47e4a467cce6cfd7db1264e252d..2daa1636f36ec4e3dc1402693d868229b29ea237 100644 (file)
@@ -29,7 +29,9 @@ C_SOURCES = \
        draw_vf.c \
        draw_vf_generic.c \
        draw_vf_sse.c \
-       draw_wide_prims.c
+       draw_wide_line.c \
+       draw_wide_point.c
+
 
 include ../../Makefile.template
 
index 3302dc44f7885fcab10b113d5d2ffb8b317d2ca3..c18dcb2927ab97ce08abd03e2c137ee2f8916a85 100644 (file)
@@ -28,7 +28,8 @@ draw = env.ConvenienceLibrary(
                'draw_vf.c',
                'draw_vf_generic.c',
                'draw_vf_sse.c',
-               'draw_wide_prims.c',
+               'draw_wide_point.c',
+               'draw_wide_line.c'
        ])
 
 auxiliaries.insert(0, draw)
index 73a02a32e425104d9bdaea6852ce2512aa2f230d..51140388f0983771205163cd11fe7ead6639e15d 100644 (file)
@@ -340,9 +340,11 @@ generate_aaline_fs(struct aaline_stage *aaline)
    tgsi_dump(aaline_fs.tokens, 0);
 #endif
 
+#if 1 /* XXX remove */
    aaline_fs.input_semantic_name[aaline_fs.num_inputs] = TGSI_SEMANTIC_GENERIC;
    aaline_fs.input_semantic_index[aaline_fs.num_inputs] = transform.maxGeneric + 1;
    aaline_fs.num_inputs++;
+#endif
 
    aaline->fs->aaline_fs
       = aaline->driver_create_fs_state(aaline->pipe, &aaline_fs);
@@ -362,6 +364,7 @@ static void
 aaline_create_texture(struct aaline_stage *aaline)
 {
    struct pipe_context *pipe = aaline->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_texture texTemp;
    uint level;
 
@@ -374,7 +377,7 @@ aaline_create_texture(struct aaline_stage *aaline)
    texTemp.depth[0] = 1;
    texTemp.cpp = 1;
 
-   aaline->texture = pipe->texture_create(pipe, &texTemp);
+   aaline->texture = screen->texture_create(screen, &texTemp);
 
    /* Fill in mipmap images.
     * Basically each level is solid opaque, except for the outermost
@@ -388,7 +391,7 @@ aaline_create_texture(struct aaline_stage *aaline)
 
       assert(aaline->texture->width[level] == aaline->texture->height[level]);
 
-      surface = pipe->get_tex_surface(pipe, aaline->texture, 0, level, 0);
+      surface = screen->get_tex_surface(screen, aaline->texture, 0, level, 0);
       data = pipe_surface_map(surface);
 
       for (i = 0; i < size; i++) {
index cae6fcd4d2b0741a5b7edfc2be0891807805332c..d48a416899fa4c04b902ceb85909247d0006588c 100644 (file)
@@ -509,14 +509,16 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
                          (struct tgsi_token *) aapoint_fs.tokens,
                          MAX, &transform.base);
 
-#if 1 /* DEBUG */
+#if 0 /* DEBUG */
    tgsi_dump(orig_fs->tokens, 0);
    tgsi_dump(aapoint_fs.tokens, 0);
 #endif
 
+#if 1 /* XXX remove */
    aapoint_fs.input_semantic_name[aapoint_fs.num_inputs] = TGSI_SEMANTIC_GENERIC;
    aapoint_fs.input_semantic_index[aapoint_fs.num_inputs] = transform.maxGeneric + 1;
    aapoint_fs.num_inputs++;
+#endif
 
    aapoint->fs->aapoint_fs
       = aapoint->driver_create_fs_state(aapoint->pipe, &aapoint_fs);
@@ -694,8 +696,8 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header)
       /* find PSIZ vertex output */
       const struct draw_vertex_shader *vs = draw->vertex_shader;
       uint i;
-      for (i = 0; i < vs->state->num_outputs; i++) {
-         if (vs->state->output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
+      for (i = 0; i < vs->info.num_outputs; i++) {
+         if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
             aapoint->psize_slot = i;
             break;
          }
index e3051507eaf16ebaf0d6203f14dc9148af7e7319..200152ecab9489b9d0feb361d634fe72dd92a635 100644 (file)
@@ -409,13 +409,13 @@ clip_init_state( struct draw_stage *stage )
    clipper->flat = stage->draw->rasterizer->flatshade ? TRUE : FALSE;
 
    if (clipper->flat) {
-      const struct pipe_shader_state *vs = stage->draw->vertex_shader->state;
+      const struct draw_vertex_shader *vs = stage->draw->vertex_shader;
       uint i;
 
       clipper->num_color_attribs = 0;
-      for (i = 0; i < vs->num_outputs; i++) {
-        if (vs->output_semantic_name[i] == TGSI_SEMANTIC_COLOR ||
-            vs->output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) {
+      for (i = 0; i < vs->info.num_outputs; i++) {
+        if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_COLOR ||
+            vs->info.output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) {
            clipper->color_attribs[clipper->num_color_attribs++] = i;
         }
       }
index 7dd1c6f6faace0e2f264210b2774ed47638dd453..428b6209e05dea065760e89cf6eed752737fce01 100644 (file)
@@ -48,7 +48,8 @@ struct draw_context *draw_create( void )
 #endif
 
    /* create pipeline stages */
-   draw->pipeline.wide      = draw_wide_stage( draw );
+   draw->pipeline.wide_line  = draw_wide_line_stage( draw );
+   draw->pipeline.wide_point = draw_wide_point_stage( draw );
    draw->pipeline.stipple   = draw_stipple_stage( draw );
    draw->pipeline.unfilled  = draw_unfilled_stage( draw );
    draw->pipeline.twoside   = draw_twoside_stage( draw );
@@ -80,8 +81,9 @@ struct draw_context *draw_create( void )
 
    draw->shader_queue_flush = draw_vertex_shader_queue_flush;
 
-   draw->convert_wide_points = TRUE;
-   draw->convert_wide_lines = TRUE;
+   /* these defaults are oriented toward the needs of softpipe */
+   draw->wide_point_threshold = 1000000.0; /* infinity */
+   draw->wide_line_threshold = 1.0;
 
    draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */
 
@@ -94,7 +96,8 @@ struct draw_context *draw_create( void )
 
 void draw_destroy( struct draw_context *draw )
 {
-   draw->pipeline.wide->destroy( draw->pipeline.wide );
+   draw->pipeline.wide_line->destroy( draw->pipeline.wide_line );
+   draw->pipeline.wide_point->destroy( draw->pipeline.wide_point );
    draw->pipeline.stipple->destroy( draw->pipeline.stipple );
    draw->pipeline.unfilled->destroy( draw->pipeline.unfilled );
    draw->pipeline.twoside->destroy( draw->pipeline.twoside );
@@ -220,26 +223,26 @@ draw_set_mapped_constant_buffer(struct draw_context *draw,
 
 
 /**
- * Tells the draw module whether to convert wide points (size != 1)
- * into triangles.
+ * Tells the draw module to draw points with triangles if their size
+ * is greater than this threshold.
  */
 void
-draw_convert_wide_points(struct draw_context *draw, boolean enable)
+draw_wide_point_threshold(struct draw_context *draw, float threshold)
 {
    draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
-   draw->convert_wide_points = enable;
+   draw->wide_point_threshold = threshold;
 }
 
 
 /**
- * Tells the draw module whether to convert wide lines (width != 1)
- * into triangles.
+ * Tells the draw module to draw lines with triangles if their width
+ * is greater than this threshold.
  */
 void
-draw_convert_wide_lines(struct draw_context *draw, boolean enable)
+draw_wide_line_threshold(struct draw_context *draw, float threshold)
 {
    draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
-   draw->convert_wide_lines = enable;
+   draw->wide_line_threshold = threshold;
 }
 
 
@@ -262,11 +265,11 @@ int
 draw_find_vs_output(struct draw_context *draw,
                     uint semantic_name, uint semantic_index)
 {
-   const struct pipe_shader_state *vs = draw->vertex_shader->state;
+   const struct draw_vertex_shader *vs = draw->vertex_shader;
    uint i;
-   for (i = 0; i < vs->num_outputs; i++) {
-      if (vs->output_semantic_name[i] == semantic_name &&
-          vs->output_semantic_index[i] == semantic_index)
+   for (i = 0; i < vs->info.num_outputs; i++) {
+      if (vs->info.output_semantic_name[i] == semantic_name &&
+          vs->info.output_semantic_index[i] == semantic_index)
          return i;
    }
 
@@ -281,6 +284,19 @@ draw_find_vs_output(struct draw_context *draw,
 }
 
 
+/**
+ * Return number of vertex shader outputs.
+ */
+uint
+draw_num_vs_outputs(struct draw_context *draw)
+{
+   uint count = draw->vertex_shader->info.num_outputs;
+   if (draw->extra_vp_outputs.slot >= 0)
+      count++;
+   return count;
+}
+
+
 /**
  * Allocate space for temporary post-transform vertices, such as for clipping.
  */
index c25301f71df366fefcb7a9a33d0d19b55362b3fc..ab87b4127c0e9567f5277ffdb223a68cc9ff8b3a 100644 (file)
@@ -90,9 +90,9 @@ void draw_set_rasterizer_state( struct draw_context *draw,
 void draw_set_rasterize_stage( struct draw_context *draw,
                                struct draw_stage *stage );
 
-void draw_convert_wide_points(struct draw_context *draw, boolean enable);
+void draw_wide_point_threshold(struct draw_context *draw, float threshold);
 
-void draw_convert_wide_lines(struct draw_context *draw, boolean enable);
+void draw_wide_line_threshold(struct draw_context *draw, float threshold);
 
 boolean draw_use_sse(struct draw_context *draw);
 
@@ -110,6 +110,10 @@ int
 draw_find_vs_output(struct draw_context *draw,
                     uint semantic_name, uint semantic_index);
 
+uint
+draw_num_vs_outputs(struct draw_context *draw);
+
+
 
 /*
  * Vertex shader functions
index 4398abbc60c953775eb15d61b7775535afb63cae..ccad71d695797b87e3b39482f9a21cc16cd57848 100644 (file)
@@ -128,14 +128,14 @@ static void flatshade_point( struct draw_stage *stage,
 static void flatshade_init_state( struct draw_stage *stage )
 {
    struct flat_stage *flat = flat_stage(stage);
-   const struct pipe_shader_state *vs = stage->draw->vertex_shader->state;
+   const struct draw_vertex_shader *vs = stage->draw->vertex_shader;
    uint i;
 
    /* Find which vertex shader outputs are colors, make a list */
    flat->num_color_attribs = 0;
-   for (i = 0; i < vs->num_outputs; i++) {
-      if (vs->output_semantic_name[i] == TGSI_SEMANTIC_COLOR ||
-          vs->output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) {
+   for (i = 0; i < vs->info.num_outputs; i++) {
+      if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_COLOR ||
+          vs->info.output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) {
          flat->color_attribs[flat->num_color_attribs++] = i;
       }
    }
index 6abced139ba85a7fe0ada62840982b3c34324c56..c732d723a7f3f51edb2bf1e228cf6935b4ba1a01 100644 (file)
@@ -46,6 +46,7 @@
 
 #include "rtasm/rtasm_x86sse.h"
 #include "tgsi/exec/tgsi_exec.h"
+#include "tgsi/util/tgsi_scan.h"
 
 
 struct pipe_context;
@@ -134,6 +135,8 @@ struct draw_vertex_shader {
     */
    const struct pipe_shader_state   *state;
 
+   struct tgsi_shader_info info;
+
    void (*prepare)( struct draw_vertex_shader *shader,
                    struct draw_context *draw );
 
@@ -183,7 +186,8 @@ struct draw_context
       struct draw_stage *aapoint;
       struct draw_stage *aaline;
       struct draw_stage *pstipple;
-      struct draw_stage *wide;
+      struct draw_stage *wide_line;
+      struct draw_stage *wide_point;
       struct draw_stage *rasterize;
    } pipeline;
 
@@ -215,8 +219,8 @@ struct draw_context
    float plane[12][4];
    unsigned nr_planes;
 
-   boolean convert_wide_points; /**< convert wide points to tris? */
-   boolean convert_wide_lines;  /**< convert wide lines to tris? */
+   float wide_point_threshold; /**< convert pnts to tris if larger than this */
+   float wide_line_threshold;  /**< convert lines to tris if wider than this */
    boolean use_sse;
 
    /* If a prim stage introduces new vertex attributes, they'll be stored here
@@ -301,7 +305,8 @@ extern struct draw_stage *draw_clip_stage( struct draw_context *context );
 extern struct draw_stage *draw_flatshade_stage( struct draw_context *context );
 extern struct draw_stage *draw_cull_stage( struct draw_context *context );
 extern struct draw_stage *draw_stipple_stage( struct draw_context *context );
-extern struct draw_stage *draw_wide_stage( struct draw_context *context );
+extern struct draw_stage *draw_wide_line_stage( struct draw_context *context );
+extern struct draw_stage *draw_wide_point_stage( struct draw_context *context );
 extern struct draw_stage *draw_validate_stage( struct draw_context *context );
 
 
index 1ab04cd95989722107951653895330d2ab697b28..f6200aa82012fb2914b39b910096f9e41142cf03 100644 (file)
@@ -330,11 +330,13 @@ generate_pstip_fs(struct pstip_stage *pstip)
 
    pstip->sampler_unit = transform.maxSampler + 1;
 
+#if 1 /* XXX remove */
    if (transform.wincoordInput < 0) {
       pstip_fs.input_semantic_name[pstip_fs.num_inputs] = TGSI_SEMANTIC_POSITION;
       pstip_fs.input_semantic_index[pstip_fs.num_inputs] = (ubyte)transform.maxInput;
       pstip_fs.num_inputs++;
    }
+#endif
 
    pstip->fs->pstip_fs = pstip->driver_create_fs_state(pstip->pipe, &pstip_fs);
 }
@@ -348,12 +350,13 @@ pstip_update_texture(struct pstip_stage *pstip)
 {
    static const uint bit31 = 1 << 31;
    struct pipe_context *pipe = pstip->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_surface *surface;
    const uint *stipple = pstip->state.stipple->stipple;
    uint i, j;
    ubyte *data;
 
-   surface = pipe->get_tex_surface(pipe, pstip->texture, 0, 0, 0);
+   surface = screen->get_tex_surface(screen, pstip->texture, 0, 0, 0);
    data = pipe_surface_map(surface);
 
    /*
@@ -389,6 +392,7 @@ static void
 pstip_create_texture(struct pstip_stage *pstip)
 {
    struct pipe_context *pipe = pstip->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_texture texTemp;
 
    memset(&texTemp, 0, sizeof(texTemp));
@@ -400,7 +404,7 @@ pstip_create_texture(struct pstip_stage *pstip)
    texTemp.depth[0] = 1;
    texTemp.cpp = 1;
 
-   pstip->texture = pipe->texture_create(pipe, &texTemp);
+   pstip->texture = screen->texture_create(screen, &texTemp);
 
    //pstip_update_texture(pstip);
 }
index 1c3895798713ddac18692f2ecac59508c9022e13..3debaac282273517badcf2ceeb69c6206b3275be 100644 (file)
@@ -119,7 +119,7 @@ static void twoside_first_tri( struct draw_stage *stage,
                               struct prim_header *header )
 {
    struct twoside_stage *twoside = twoside_stage(stage);
-   const struct pipe_shader_state *vs = stage->draw->vertex_shader->state;
+   const struct draw_vertex_shader *vs = stage->draw->vertex_shader;
    uint i;
 
    twoside->attrib_front0 = 0;
@@ -128,15 +128,15 @@ static void twoside_first_tri( struct draw_stage *stage,
    twoside->attrib_back1 = 0;
 
    /* Find which vertex shader outputs are front/back colors */
-   for (i = 0; i < vs->num_outputs; i++) {
-      if (vs->output_semantic_name[i] == TGSI_SEMANTIC_COLOR) {
-         if (vs->output_semantic_index[i] == 0)
+   for (i = 0; i < vs->info.num_outputs; i++) {
+      if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_COLOR) {
+         if (vs->info.output_semantic_index[i] == 0)
             twoside->attrib_front0 = i;
          else
             twoside->attrib_front1 = i;
       }
-      if (vs->output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) {
-         if (vs->output_semantic_index[i] == 0)
+      if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) {
+         if (vs->info.output_semantic_index[i] == 0)
             twoside->attrib_back0 = i;
          else
             twoside->attrib_back1 = i;
index 3a19dd4cd7881d6a05c11a34728e68a49c941718..084eee9b6e9ace87969f345a35ee104a0fdb6c78 100644 (file)
@@ -52,6 +52,18 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
     */
    stage->next = next;
 
+   /* drawing wide lines? */
+   wide_lines = (draw->rasterizer->line_width > draw->wide_line_threshold
+                 && !draw->rasterizer->line_smooth);
+
+   /* drawing large points? */
+   if (draw->rasterizer->point_smooth && draw->pipeline.aapoint)
+      wide_points = FALSE;
+   else if (draw->rasterizer->point_size > draw->wide_point_threshold)
+      wide_points = TRUE;
+   else
+      wide_points = FALSE;
+
    /*
     * NOTE: we build up the pipeline in end-to-start order.
     *
@@ -69,21 +81,14 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
       next = draw->pipeline.aapoint;
    }
 
-   /* drawing wide lines? */
-   wide_lines = (draw->rasterizer->line_width != 1.0
-                 && draw->convert_wide_lines
-                 && !draw->rasterizer->line_smooth);
+   if (wide_lines) {
+      draw->pipeline.wide_line->next = next;
+      next = draw->pipeline.wide_line;
+   }
 
-   /* drawing large points? */
-   wide_points = (draw->rasterizer->point_size != 1.0
-                  && draw->convert_wide_points
-                  && !draw->pipeline.aapoint);
-   
-   if (wide_lines ||
-       wide_points ||
-       draw->rasterizer->point_sprite) {
-      draw->pipeline.wide->next = next;
-      next = draw->pipeline.wide;
+   if (wide_points || draw->rasterizer->point_sprite) {
+      draw->pipeline.wide_point->next = next;
+      next = draw->pipeline.wide_point;
    }
 
    if (draw->rasterizer->line_stipple_enable) {
index e13df04605c7639df82fc533066c7505a3e47f2b..cb8cdd04a3ee19748dd697fab242f9629de29a2a 100644 (file)
@@ -473,7 +473,7 @@ void draw_update_vertex_fetch( struct draw_context *draw )
    if (!draw->vertex_shader)
       return;
 
-   nr_attrs = draw->vertex_shader->state->num_inputs;
+   nr_attrs = draw->vertex_shader->info.num_inputs;
 
    for (i = 0; i < nr_attrs; i++) {
       unsigned buf = draw->vertex_element[i].vertex_buffer_index;
index 5d2f5c9c43aee6d2e9b7d18b80fc3ef0af1efc0b..1e9535555549bef2813032a4b73de7cd8ef98998 100644 (file)
@@ -91,15 +91,16 @@ draw_create_vertex_shader(struct draw_context *draw,
    struct draw_vertex_shader *vs;
 
    vs = draw_create_vs_llvm( draw, shader );
-   if (vs)
-      return vs;
+   if (!vs) {
+      vs = draw_create_vs_sse( draw, shader );
+      if (!vs) {
+         vs = draw_create_vs_exec( draw, shader );
+      }
+   }
+   assert(vs);
 
-   vs = draw_create_vs_sse( draw, shader );
-   if (vs)
-      return vs;
+   tgsi_scan_shader(shader->tokens, &vs->info);
 
-   vs = draw_create_vs_exec( draw, shader );
-   assert(vs);
    return vs;
 }
 
@@ -111,7 +112,7 @@ draw_bind_vertex_shader(struct draw_context *draw,
    draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
 
    draw->vertex_shader = dvs;
-   draw->num_vs_outputs = dvs->state->num_outputs;
+   draw->num_vs_outputs = dvs->info.num_outputs;
 
    tgsi_exec_machine_init(&draw->machine);
 
index 8588879400a8d45afa69f9d5f8bd755309477901..583812aadd2a90311119e1c165271b9242c3feb0 100644 (file)
@@ -103,7 +103,7 @@ vs_exec_run( struct draw_vertex_shader *shader,
    const float *trans = draw->viewport.translate;
 
    assert(count <= 4);
-   assert(draw->vertex_shader->state->output_semantic_name[0]
+   assert(draw->vertex_shader->info.output_semantic_name[0]
           == TGSI_SEMANTIC_POSITION);
 
    machine->Consts = (float (*)[4]) draw->user.constants;
index 11ef0c503dcf77b15892d1d2e16ea98dbdb2ba31..0b8bc2bf1444c7063c4cb1f4e5e0df7d91429b70 100644 (file)
@@ -119,7 +119,7 @@ vs_sse_run( struct draw_vertex_shader *base,
    const float *trans = draw->viewport.translate;
 
    assert(count <= 4);
-   assert(draw->vertex_shader->state->output_semantic_name[0]
+   assert(draw->vertex_shader->info.output_semantic_name[0]
           == TGSI_SEMANTIC_POSITION);
 
    /* Consts does not require 16 byte alignment. */
diff --git a/src/gallium/auxiliary/draw/draw_wide_line.c b/src/gallium/auxiliary/draw/draw_wide_line.c
new file mode 100644 (file)
index 0000000..946a983
--- /dev/null
@@ -0,0 +1,187 @@
+/**************************************************************************
+ * 
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
+ **************************************************************************/
+
+/* Authors:  Keith Whitwell <keith@tungstengraphics.com>
+ */
+
+#include "pipe/p_util.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_shader_tokens.h"
+#include "draw_private.h"
+
+
+struct wideline_stage {
+   struct draw_stage stage;
+
+   float half_line_width;
+};
+
+
+
+static INLINE struct wideline_stage *wideline_stage( struct draw_stage *stage )
+{
+   return (struct wideline_stage *)stage;
+}
+
+
+static void wideline_point( struct draw_stage *stage,
+                               struct prim_header *header )
+{
+   stage->next->point( stage->next, header );
+}
+
+
+static void wideline_tri( struct draw_stage *stage,
+                             struct prim_header *header )
+{
+   stage->next->tri(stage->next, header);
+}
+
+
+/**
+ * Draw a wide line by drawing a quad (two triangles).
+ * XXX need to disable polygon stipple.
+ */
+static void wideline_line( struct draw_stage *stage,
+                           struct prim_header *header )
+{
+   /*const struct wideline_stage *wide = wideline_stage(stage);*/
+   const float half_width = 0.5f * stage->draw->rasterizer->line_width;
+
+   struct prim_header tri;
+
+   struct vertex_header *v0 = dup_vert(stage, header->v[0], 0);
+   struct vertex_header *v1 = dup_vert(stage, header->v[0], 1);
+   struct vertex_header *v2 = dup_vert(stage, header->v[1], 2);
+   struct vertex_header *v3 = dup_vert(stage, header->v[1], 3);
+
+   float *pos0 = v0->data[0];
+   float *pos1 = v1->data[0];
+   float *pos2 = v2->data[0];
+   float *pos3 = v3->data[0];
+
+   const float dx = FABSF(pos0[0] - pos2[0]);
+   const float dy = FABSF(pos0[1] - pos2[1]);
+   
+   /*
+    * Draw wide line as a quad (two tris) by "stretching" the line along
+    * X or Y.
+    * We need to tweak coords in several ways to be conformant here.
+    */
+
+   if (dx > dy) {
+      /* x-major line */
+      pos0[1] = pos0[1] - half_width - 0.25f;
+      pos1[1] = pos1[1] + half_width - 0.25f;
+      pos2[1] = pos2[1] - half_width - 0.25f;
+      pos3[1] = pos3[1] + half_width - 0.25f;
+      if (pos0[0] < pos2[0]) {
+         /* left to right line */
+         pos0[0] -= 0.5f;
+         pos1[0] -= 0.5f;
+         pos2[0] -= 0.5f;
+         pos3[0] -= 0.5f;
+      }
+      else {
+         /* right to left line */
+         pos0[0] += 0.5f;
+         pos1[0] += 0.5f;
+         pos2[0] += 0.5f;
+         pos3[0] += 0.5f;
+      }
+   }
+   else {
+      /* y-major line */
+      pos0[0] = pos0[0] - half_width + 0.25f;
+      pos1[0] = pos1[0] + half_width + 0.25f;
+      pos2[0] = pos2[0] - half_width + 0.25f;
+      pos3[0] = pos3[0] + half_width + 0.25f;
+      if (pos0[1] < pos2[1]) {
+         /* top to bottom line */
+         pos0[1] -= 0.5f;
+         pos1[1] -= 0.5f;
+         pos2[1] -= 0.5f;
+         pos3[1] -= 0.5f;
+      }
+      else {
+         /* bottom to top line */
+         pos0[1] += 0.5f;
+         pos1[1] += 0.5f;
+         pos2[1] += 0.5f;
+         pos3[1] += 0.5f;
+      }
+   }
+
+   tri.det = header->det;  /* only the sign matters */
+   tri.v[0] = v0;
+   tri.v[1] = v2;
+   tri.v[2] = v3;
+   stage->next->tri( stage->next, &tri );
+
+   tri.v[0] = v0;
+   tri.v[1] = v3;
+   tri.v[2] = v1;
+   stage->next->tri( stage->next, &tri );
+}
+
+
+static void wideline_flush( struct draw_stage *stage, unsigned flags )
+{
+   stage->next->flush( stage->next, flags );
+}
+
+
+static void wideline_reset_stipple_counter( struct draw_stage *stage )
+{
+   stage->next->reset_stipple_counter( stage->next );
+}
+
+
+static void wideline_destroy( struct draw_stage *stage )
+{
+   draw_free_temp_verts( stage );
+   FREE( stage );
+}
+
+
+struct draw_stage *draw_wide_line_stage( struct draw_context *draw )
+{
+   struct wideline_stage *wide = CALLOC_STRUCT(wideline_stage);
+
+   draw_alloc_temp_verts( &wide->stage, 4 );
+
+   wide->stage.draw = draw;
+   wide->stage.next = NULL;
+   wide->stage.point = wideline_point;
+   wide->stage.line = wideline_line;
+   wide->stage.tri = wideline_tri;
+   wide->stage.flush = wideline_flush;
+   wide->stage.reset_stipple_counter = wideline_reset_stipple_counter;
+   wide->stage.destroy = wideline_destroy;
+
+   return &wide->stage;
+}
diff --git a/src/gallium/auxiliary/draw/draw_wide_point.c b/src/gallium/auxiliary/draw/draw_wide_point.c
new file mode 100644 (file)
index 0000000..8f877a1
--- /dev/null
@@ -0,0 +1,257 @@
+/**************************************************************************
+ * 
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
+ **************************************************************************/
+
+/* Authors:  Keith Whitwell <keith@tungstengraphics.com>
+ */
+
+#include "pipe/p_util.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_shader_tokens.h"
+#include "draw_private.h"
+
+
+struct widepoint_stage {
+   struct draw_stage stage;
+
+   float half_point_size;
+
+   uint texcoord_slot[PIPE_MAX_SHADER_OUTPUTS];
+   uint texcoord_mode[PIPE_MAX_SHADER_OUTPUTS];
+   uint num_texcoords;
+
+   int psize_slot;
+};
+
+
+
+static INLINE struct widepoint_stage *
+widepoint_stage( struct draw_stage *stage )
+{
+   return (struct widepoint_stage *)stage;
+}
+
+
+static void passthrough_point( struct draw_stage *stage,
+                             struct prim_header *header )
+{
+   stage->next->point( stage->next, header );
+}
+
+static void widepoint_line( struct draw_stage *stage,
+                            struct prim_header *header )
+{
+   stage->next->line(stage->next, header);
+}
+
+static void widepoint_tri( struct draw_stage *stage,
+                           struct prim_header *header )
+{
+   stage->next->tri(stage->next, header);
+}
+
+
+/**
+ * Set the vertex texcoords for sprite mode.
+ * Coords may be left untouched or set to a right-side-up or upside-down
+ * orientation.
+ */
+static void set_texcoords(const struct widepoint_stage *wide,
+                          struct vertex_header *v, const float tc[4])
+{
+   uint i;
+   for (i = 0; i < wide->num_texcoords; i++) {
+      if (wide->texcoord_mode[i] != PIPE_SPRITE_COORD_NONE) {
+         uint j = wide->texcoord_slot[i];
+         v->data[j][0] = tc[0];
+         if (wide->texcoord_mode[i] == PIPE_SPRITE_COORD_LOWER_LEFT)
+            v->data[j][1] = 1.0f - tc[1];
+         else
+            v->data[j][1] = tc[1];
+         v->data[j][2] = tc[2];
+         v->data[j][3] = tc[3];
+      }
+   }
+}
+
+
+/* If there are lots of sprite points (and why wouldn't there be?) it
+ * would probably be more sensible to change hardware setup to
+ * optimize this rather than doing the whole thing in software like
+ * this.
+ */
+static void widepoint_point( struct draw_stage *stage,
+                             struct prim_header *header )
+{
+   const struct widepoint_stage *wide = widepoint_stage(stage);
+   const boolean sprite = (boolean) stage->draw->rasterizer->point_sprite;
+   float half_size;
+   float left_adj, right_adj;
+
+   struct prim_header tri;
+
+   /* four dups of original vertex */
+   struct vertex_header *v0 = dup_vert(stage, header->v[0], 0);
+   struct vertex_header *v1 = dup_vert(stage, header->v[0], 1);
+   struct vertex_header *v2 = dup_vert(stage, header->v[0], 2);
+   struct vertex_header *v3 = dup_vert(stage, header->v[0], 3);
+
+   float *pos0 = v0->data[0];
+   float *pos1 = v1->data[0];
+   float *pos2 = v2->data[0];
+   float *pos3 = v3->data[0];
+
+   /* point size is either per-vertex or fixed size */
+   if (wide->psize_slot >= 0) {
+      half_size = 0.5f * header->v[0]->data[wide->psize_slot][0];
+   }
+   else {
+      half_size = wide->half_point_size;
+   }
+
+   left_adj = -half_size; /* + 0.25f;*/
+   right_adj = half_size; /* + 0.25f;*/
+
+   pos0[0] += left_adj;
+   pos0[1] -= half_size;
+
+   pos1[0] += left_adj;
+   pos1[1] += half_size;
+
+   pos2[0] += right_adj;
+   pos2[1] -= half_size;
+
+   pos3[0] += right_adj;
+   pos3[1] += half_size;
+
+   if (sprite) {
+      static const float tex00[4] = { 0, 0, 0, 1 };
+      static const float tex01[4] = { 0, 1, 0, 1 };
+      static const float tex11[4] = { 1, 1, 0, 1 };
+      static const float tex10[4] = { 1, 0, 0, 1 };
+      set_texcoords( wide, v0, tex00 );
+      set_texcoords( wide, v1, tex01 );
+      set_texcoords( wide, v2, tex10 );
+      set_texcoords( wide, v3, tex11 );
+   }
+
+   tri.det = header->det;  /* only the sign matters */
+   tri.v[0] = v0;
+   tri.v[1] = v2;
+   tri.v[2] = v3;
+   stage->next->tri( stage->next, &tri );
+
+   tri.v[0] = v0;
+   tri.v[1] = v3;
+   tri.v[2] = v1;
+   stage->next->tri( stage->next, &tri );
+}
+
+
+static void widepoint_first_point( struct draw_stage *stage, 
+                             struct prim_header *header )
+{
+   struct widepoint_stage *wide = widepoint_stage(stage);
+   struct draw_context *draw = stage->draw;
+
+   wide->half_point_size = 0.5f * draw->rasterizer->point_size;
+
+   /* XXX we won't know the real size if it's computed by the vertex shader! */
+   if (draw->rasterizer->point_size > draw->wide_point_threshold) {
+      stage->point = widepoint_point;
+   }
+   else {
+      stage->point = passthrough_point;
+   }
+
+   if (draw->rasterizer->point_sprite) {
+      /* find vertex shader texcoord outputs */
+      const struct draw_vertex_shader *vs = draw->vertex_shader;
+      uint i, j = 0;
+      for (i = 0; i < vs->info.num_outputs; i++) {
+         if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_GENERIC) {
+            wide->texcoord_slot[j] = i;
+            wide->texcoord_mode[j] = draw->rasterizer->sprite_coord_mode[j];
+            j++;
+         }
+      }
+      wide->num_texcoords = j;
+   }
+
+   wide->psize_slot = -1;
+   if (draw->rasterizer->point_size_per_vertex) {
+      /* find PSIZ vertex output */
+      const struct draw_vertex_shader *vs = draw->vertex_shader;
+      uint i;
+      for (i = 0; i < vs->info.num_outputs; i++) {
+         if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
+            wide->psize_slot = i;
+            break;
+         }
+      }
+   }
+   
+   stage->point( stage, header );
+}
+
+
+static void widepoint_flush( struct draw_stage *stage, unsigned flags )
+{
+   stage->point = widepoint_first_point;
+   stage->next->flush( stage->next, flags );
+}
+
+
+static void widepoint_reset_stipple_counter( struct draw_stage *stage )
+{
+   stage->next->reset_stipple_counter( stage->next );
+}
+
+
+static void widepoint_destroy( struct draw_stage *stage )
+{
+   draw_free_temp_verts( stage );
+   FREE( stage );
+}
+
+
+struct draw_stage *draw_wide_point_stage( struct draw_context *draw )
+{
+   struct widepoint_stage *wide = CALLOC_STRUCT(widepoint_stage);
+
+   draw_alloc_temp_verts( &wide->stage, 4 );
+
+   wide->stage.draw = draw;
+   wide->stage.next = NULL;
+   wide->stage.point = widepoint_first_point;
+   wide->stage.line = widepoint_line;
+   wide->stage.tri = widepoint_tri;
+   wide->stage.flush = widepoint_flush;
+   wide->stage.reset_stipple_counter = widepoint_reset_stipple_counter;
+   wide->stage.destroy = widepoint_destroy;
+
+   return &wide->stage;
+}
index 1f8069bdcaaf985e7fc4817d07ef8d637dec88c2..d6bff110b40a8e10595a9be68174b002d4a8a85b 100644 (file)
@@ -219,8 +219,8 @@ static void wide_point( struct draw_stage *stage,
       half_size = wide->half_point_size;
    }
 
-   left_adj = -half_size + 0.25f;
-   right_adj = half_size + 0.25f;
+   left_adj = -half_size; /* + 0.25f;*/
+   right_adj = half_size; /* + 0.25f;*/
 
    pos0[0] += left_adj;
    pos0[1] -= half_size;
@@ -266,7 +266,8 @@ static void wide_first_point( struct draw_stage *stage,
 
    wide->half_point_size = 0.5f * draw->rasterizer->point_size;
 
-   if (draw->rasterizer->point_size != 1.0) {
+   /* XXX we won't know the real size if it's computed by the vertex shader! */
+   if (draw->rasterizer->point_size > draw->wide_point_threshold) {
       stage->point = wide_point;
    }
    else {
@@ -277,8 +278,8 @@ static void wide_first_point( struct draw_stage *stage,
       /* find vertex shader texcoord outputs */
       const struct draw_vertex_shader *vs = draw->vertex_shader;
       uint i, j = 0;
-      for (i = 0; i < vs->state->num_outputs; i++) {
-         if (vs->state->output_semantic_name[i] == TGSI_SEMANTIC_GENERIC) {
+      for (i = 0; i < vs->info.num_outputs; i++) {
+         if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_GENERIC) {
             wide->texcoord_slot[j] = i;
             wide->texcoord_mode[j] = draw->rasterizer->sprite_coord_mode[j];
             j++;
@@ -293,8 +294,8 @@ static void wide_first_point( struct draw_stage *stage,
       /* find PSIZ vertex output */
       const struct draw_vertex_shader *vs = draw->vertex_shader;
       uint i;
-      for (i = 0; i < vs->state->num_outputs; i++) {
-         if (vs->state->output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
+      for (i = 0; i < vs->info.num_outputs; i++) {
+         if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
             wide->psize_slot = i;
             break;
          }
index 92da4bca7f4e8fd6561c8f6ba0e904b4e02a13c0..57912a952fb0c7d8e9f5477f42a493d173ea23cc 100644 (file)
@@ -97,7 +97,7 @@ void gallivm_cpu_engine_delete(struct gallivm_cpu_engine *ee);
 #endif /* MESA_LLVM */
 
 #if defined __cplusplus
-} // extern "C"
+}
 #endif
 
 #endif
index cfe7b1901b371085811c2afc2cb76cf4aada5f78..ebf3e11cd566ba0074b51e1808f4c69899c4af7f 100644 (file)
@@ -32,7 +32,7 @@ struct gallivm_ir {
    int num_components;
    int   num_consts;
 
-   //FIXME: this might not be enough for some shaders
+   /* FIXME: this might not be enough for some shaders */
    struct gallivm_interpolate interpolators[32*4];
    int   num_interp;
 };
@@ -46,7 +46,7 @@ struct gallivm_prog {
 
    int   num_consts;
 
-   //FIXME: this might not be enough for some shaders
+   /* FIXME: this might not be enough for some shaders */
    struct gallivm_interpolate interpolators[32*4];
    int   num_interp;
 };
@@ -104,7 +104,7 @@ static INLINE int gallivm_w_swizzle(int swizzle)
 #endif /* MESA_LLVM */
 
 #if defined __cplusplus
-} // extern "C"
+}
 #endif
 
 #endif
index f5b5f4052f8c799713c685f02707438f6ad0ad05..4b09c80b2a1d992fe7f61dfd60795fdaaa5cd941 100644 (file)
@@ -37,7 +37,7 @@
  * There is no obligation of a winsys driver to use this library. And a pipe
  * driver should be completly agnostic about it.
  * 
- * \author José Fonseca <jrfonseca@tungstengraphics.com>
+ * \author Jos� Fonseca <jrfonseca@tungstengraphics.com>
  */
 
 #ifndef PB_BUFFER_H_
 #include "pipe/p_inlines.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 struct pb_vtbl;
 
 /**
@@ -200,4 +205,8 @@ void
 pb_init_winsys(struct pipe_winsys *winsys);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*PB_BUFFER_H_*/
index c40b9c75e181432270b321ab25b7f29fc2c98ea5..50d5891bdb31ada127a56d32899d7695b18b729d 100644 (file)
@@ -44,7 +44,7 @@
  * Between the handle's destruction, and the fence signalling, the buffer is 
  * stored in a fenced buffer list.
  * 
- * \author José Fonseca <jrfonseca@tungstengraphics.com>
+ * \author José Fonseca <jrfonseca@tungstengraphics.com>
  */
 
 #ifndef PB_BUFFER_FENCED_H_
 #include "pipe/p_debug.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 struct pipe_winsys;
 struct pipe_buffer;
 struct pipe_fence_handle;
@@ -114,4 +119,8 @@ buffer_fence(struct pb_buffer *buf,
              struct pipe_fence_handle *fence);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*PB_BUFFER_FENCED_H_*/
index 1ddf784c9781636b1ef48c1ac5747e2989de1229..0cf8e92e377ef268bfe4371280b01dd5f273528e 100644 (file)
@@ -43,7 +43,7 @@
  * - the fenced buffer manager, which will delay buffer destruction until the 
  * the moment the card finishing processing it. 
  * 
- * \author José Fonseca <jrfonseca@tungstengraphics.com>
+ * \author José Fonseca <jrfonseca@tungstengraphics.com>
  */
 
 #ifndef PB_BUFMGR_H_
 #include <stddef.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 struct pb_desc;
 struct pipe_buffer;
 struct pipe_winsys;
@@ -123,4 +128,8 @@ fenced_bufmgr_create(struct pb_manager *provider,
                      struct pipe_winsys *winsys);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*PB_BUFMGR_H_*/
index 779b901f2b8289734becb72a0f0ac33e5f0442ab..0da3b0bdb75708591e65687725fde168375fc5ed 100755 (executable)
@@ -1268,7 +1268,7 @@ emit_store(
       break;
 
    case TGSI_SAT_ZERO_ONE:
-//      assert( 0 );
+      /* assert( 0 ); */
       break;
 
    case TGSI_SAT_MINUS_PLUS_ONE:
@@ -2268,7 +2268,7 @@ tgsi_emit_sse2(
            &parse.FullToken.FullInstruction );
 
         if (!ok) {
-           debug_printf("failed to translate tgsi opcode %d\n", 
+           debug_printf("failed to translate tgsi opcode %d to SSE\n", 
                         parse.FullToken.FullInstruction.Instruction.Opcode );
         }
          break;
@@ -2276,7 +2276,7 @@ tgsi_emit_sse2(
       case TGSI_TOKEN_TYPE_IMMEDIATE:
          /* XXX implement this */
         ok = 0;
-        debug_printf("failed to emit immediate value\n");
+        debug_printf("failed to emit immediate value to SSE\n");
         break;
 
       default:
@@ -2358,7 +2358,7 @@ tgsi_emit_sse2_fs(
             &parse.FullToken.FullInstruction );
 
         if (!ok) {
-           debug_printf("failed to translate tgsi opcode %d\n", 
+           debug_printf("failed to translate tgsi opcode %d to SSE\n", 
                         parse.FullToken.FullInstruction.Instruction.Opcode );
         }
          break;
@@ -2366,7 +2366,7 @@ tgsi_emit_sse2_fs(
       case TGSI_TOKEN_TYPE_IMMEDIATE:
          /* XXX implement this */
         ok = 0;
-        debug_printf("failed to emit immediate value\n");
+        debug_printf("failed to emit immediate value to SSE\n");
          break;
 
       default:
index 9bee3717665bc05c805938d058fe3efefa0d28d7..63b8ef3911247f521ed719eed9951ce581641393 100755 (executable)
@@ -3,7 +3,7 @@
 
 #if defined __cplusplus
 extern "C" {
-#endif // defined __cplusplus
+#endif
 
 struct tgsi_token;
 struct x86_function;
@@ -19,8 +19,8 @@ tgsi_emit_sse2_fs(
    struct x86_function *function );
 
 #if defined __cplusplus
-} // extern "C"
-#endif // defined __cplusplus
+}
+#endif
 
-#endif // !defined TGSI_SSE2_H
+#endif /* TGSI_SSE2_H */
 
index 116c78abf34a0eea1f1cb22791045474a1359071..607860e7fc5e6311a4582b49bc7712b0fc7b1fd3 100644 (file)
@@ -3,7 +3,7 @@
 
 #if defined __cplusplus
 extern "C" {
-#endif // defined __cplusplus
+#endif
 
 /*
  * version
@@ -313,8 +313,8 @@ tgsi_build_dst_register_ext_modulate(
    struct tgsi_header *header );
 
 #if defined __cplusplus
-} // extern "C"
-#endif // defined __cplusplus
+}
+#endif
 
-#endif // !defined TGSI_BUILD_H
+#endif /* TGSI_BUILD_H */
 
index ff74e6117c4de77a222864fb51c413a0b9e83b41..59be14a748c7a721741e90b8152ce8313b5ed449 100644 (file)
@@ -664,6 +664,19 @@ static const char *TGSI_TEXTURES[] =
    "TEXTURE_SHADOWRECT"
 };
 
+static const char *TGSI_TEXTURES_SHORT[] =
+{
+   "UNKNOWN",
+   "1D",
+   "2D",
+   "3D",
+   "CUBE",
+   "RECT",
+   "SHADOW1D",
+   "SHADOW2D",
+   "SHADOWRECT"
+};
+
 static const char *TGSI_SRC_REGISTER_EXTS[] =
 {
    "SRC_REGISTER_EXT_TYPE_SWZ",
@@ -1037,6 +1050,11 @@ dump_instruction_short(
       first_reg = FALSE;
    }
 
+   if (inst->InstructionExtTexture.Texture != TGSI_TEXTURE_UNKNOWN) {
+      TXT( ", " );
+      ENM( inst->InstructionExtTexture.Texture, TGSI_TEXTURES_SHORT );
+   }
+
    switch( inst->Instruction.Opcode ) {
    case TGSI_OPCODE_IF:
    case TGSI_OPCODE_ELSE:
index 1adc9db2519bfd20b0b4616835275ea17c151657..b983b382268d64747af5918a9c049b958a55ad7f 100644 (file)
@@ -3,7 +3,7 @@
 
 #if defined __cplusplus
 extern "C" {
-#endif // defined __cplusplus
+#endif
 
 #define TGSI_DUMP_VERBOSE       1
 #define TGSI_DUMP_NO_IGNORED    2
@@ -21,8 +21,8 @@ tgsi_dump_str(
    unsigned                flags );
 
 #if defined __cplusplus
-} // extern "C"
-#endif // defined __cplusplus
+}
+#endif
 
-#endif // !defined TGSI_DUMP_H
+#endif /* TGSI_DUMP_H */
 
index 9372da8d5d14c89f1f8c0bf33bc0cfb3ec3ce1cf..5ccb5bfcf68881caa7e012494dad06c49366d824 100644 (file)
@@ -3,7 +3,7 @@
 
 #if defined __cplusplus
 extern "C" {
-#endif // defined __cplusplus
+#endif
 
 struct tgsi_full_version
 {
@@ -114,8 +114,8 @@ tgsi_parse_token(
    struct tgsi_parse_context *ctx );
 
 #if defined __cplusplus
-} // extern "C"
-#endif // defined __cplusplus
+}
+#endif
 
-#endif // !defined TGSI_PARSE_H
+#endif /* TGSI_PARSE_H */
 
index 4b99ac37cce07cfd635566b16e3fdffb54028cd1..ea4a72967d6182b9c7f3213169a9017b8040e73a 100644 (file)
@@ -37,6 +37,7 @@
 #include "tgsi/util/tgsi_parse.h"
 #include "tgsi/util/tgsi_build.h"
 
+#include "pipe/p_util.h"
 
 
 
@@ -46,10 +47,12 @@ void
 tgsi_scan_shader(const struct tgsi_token *tokens,
                  struct tgsi_shader_info *info)
 {
-   uint procType;
+   uint procType, i;
    struct tgsi_parse_context parse;
 
    memset(info, 0, sizeof(*info));
+   for (i = 0; i < TGSI_FILE_COUNT; i++)
+      info->file_max[i] = -1;
 
    /**
     ** Setup to begin parsing input shader
@@ -69,6 +72,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
     */
    while( !tgsi_parse_end_of_tokens( &parse ) ) {
 
+      info->num_tokens++;
+
       tgsi_parse_token( &parse );
 
       switch( parse.FullToken.Token.Type ) {
@@ -91,8 +96,27 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
             for (i = fulldecl->u.DeclarationRange.First;
                  i <= fulldecl->u.DeclarationRange.Last;
                  i++) {
+
+               /* only first 32 regs will appear in this bitfield */
                info->file_mask[file] |= (1 << i);
                info->file_count[file]++;
+               info->file_max[file] = MAX2(info->file_max[file], (int)i);
+
+               if (file == TGSI_FILE_INPUT) {
+                  info->input_semantic_name[info->num_inputs]
+                     = (ubyte)fulldecl->Semantic.SemanticName;
+                  info->input_semantic_index[info->num_inputs]
+                     = (ubyte)fulldecl->Semantic.SemanticIndex;
+                  info->num_inputs++;
+               }
+
+               if (file == TGSI_FILE_OUTPUT) {
+                  info->output_semantic_name[info->num_outputs]
+                     = (ubyte)fulldecl->Semantic.SemanticName;
+                  info->output_semantic_index[info->num_outputs]
+                     = (ubyte)fulldecl->Semantic.SemanticIndex;
+                  info->num_outputs++;
+               }
 
                /* special case */
                if (procType == TGSI_PROCESSOR_FRAGMENT &&
@@ -113,5 +137,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
       }
    }
 
+   info->uses_kill = (info->opcode_count[TGSI_OPCODE_KIL] ||
+                      info->opcode_count[TGSI_OPCODE_KILP]);
+
    tgsi_parse_free (&parse);
 }
index 757446437c946bc23df4458e50159fd125ba19eb..0530bc6b510cf3c442f806ab45906136403c7ddb 100644 (file)
@@ -29,7 +29,8 @@
 #define TGSI_SCAN_H
 
 
-#include "pipe/p_util.h"
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
 #include "pipe/p_shader_tokens.h"
 
 
  */
 struct tgsi_shader_info
 {
+   uint num_tokens;
+
+   /* XXX eventually remove the corresponding fields from pipe_shader_state: */
+   ubyte num_inputs;
+   ubyte num_outputs;
+   ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
+   ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
+   ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
+   ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
+
    uint file_mask[TGSI_FILE_COUNT];  /**< bitmask of declared registers */
    uint file_count[TGSI_FILE_COUNT];  /**< number of declared registers */
+   int file_max[TGSI_FILE_COUNT];  /**< highest index of declared registers */
 
    uint immediate_count; /**< number of immediates declared */
 
    uint opcode_count[TGSI_OPCODE_LAST];  /**< opcode histogram */
 
    boolean writes_z;  /**< does fragment shader write Z value? */
+   boolean uses_kill;  /**< KIL or KILP instruction used? */
 };
 
 
index ef14446f0e4dd427fac392df4d387f676ece4a0c..45f5f0be0e42ecc5ee232ba1f65e46a47f4bfba2 100644 (file)
@@ -3,7 +3,7 @@
 
 #if defined __cplusplus
 extern "C" {
-#endif // defined __cplusplus
+#endif
 
 void *
 tgsi_align_128bit(
@@ -63,8 +63,8 @@ tgsi_util_set_full_src_register_sign_mode(
    unsigned sign_mode );
 
 #if defined __cplusplus
-} // extern "C"
-#endif // defined __cplusplus
+}
+#endif
 
-#endif // !defined TGSI_UTIL_H
+#endif /* TGSI_UTIL_H */
 
index 164dde762c0d87bb954cfb5d5e4717184bbb4903..d38fa6ce07334719cc0081f4bad4b0ba25b594c3 100644 (file)
@@ -29,6 +29,7 @@ SOURCES = \
        cell_state_emit.c \
        cell_state_shader.c \
        cell_pipe_state.c \
+       cell_screen.c \
        cell_state_vertex.c \
        cell_spu.c \
        cell_surface.c \
index 98c314f45c4e44612a98b2f023574f7f79669978..ccbbd1d331c2c4918fa2257b7f2080c8ff11845d 100644 (file)
 #include "pipe/p_format.h"
 #include "pipe/p_util.h"
 #include "pipe/p_winsys.h"
-#include "cell/common.h"
+#include "pipe/p_screen.h"
+
 #include "draw/draw_context.h"
 #include "draw/draw_private.h"
+
+#include "cell/common.h"
 #include "cell_clear.h"
 #include "cell_context.h"
 #include "cell_draw_arrays.h"
 
 
 
-static boolean
-cell_is_format_supported( struct pipe_context *pipe,
-                          enum pipe_format format, uint type )
-{
-   /*struct cell_context *cell = cell_context( pipe );*/
-
-   switch (type) {
-   case PIPE_TEXTURE:
-      /* cell supports all texture formats, XXX for now anyway */
-      return TRUE;
-   case PIPE_SURFACE:
-      /* cell supports all (off-screen) surface formats, XXX for now */
-      return TRUE;
-   default:
-      assert(0);
-      return FALSE;
-   }
-}
-
-
-static int cell_get_param(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
-      return 8;
-   case PIPE_CAP_NPOT_TEXTURES:
-      return 1;
-   case PIPE_CAP_TWO_SIDED_STENCIL:
-      return 1;
-   case PIPE_CAP_GLSL:
-      return 1;
-   case PIPE_CAP_S3TC:
-      return 0;
-   case PIPE_CAP_ANISOTROPIC_FILTER:
-      return 0;
-   case PIPE_CAP_POINT_SPRITE:
-      return 1;
-   case PIPE_CAP_MAX_RENDER_TARGETS:
-      return 1;
-   case PIPE_CAP_OCCLUSION_QUERY:
-      return 1;
-   case PIPE_CAP_TEXTURE_SHADOW_MAP:
-      return 1;
-   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
-      return 12; /* max 2Kx2K */
-   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
-      return 8;  /* max 128x128x128 */
-   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return 12; /* max 2Kx2K */
-   default:
-      return 0;
-   }
-}
-
-static float cell_get_paramf(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_LINE_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_LINE_WIDTH_AA:
-      return 255.0; /* arbitrary */
-
-   case PIPE_CAP_MAX_POINT_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_POINT_WIDTH_AA:
-      return 255.0; /* arbitrary */
-
-   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
-      return 0.0;
-
-   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
-      return 16.0; /* arbitrary */
-
-   default:
-      return 0;
-   }
-}
-
-
-static const char *
-cell_get_name( struct pipe_context *pipe )
-{
-   return "Cell";
-}
-
-static const char *
-cell_get_vendor( struct pipe_context *pipe )
-{
-   return "Tungsten Graphics, Inc.";
-}
-
-
-
 static void
 cell_destroy_context( struct pipe_context *pipe )
 {
@@ -174,7 +84,8 @@ cell_draw_create(struct cell_context *cell)
 
 
 struct pipe_context *
-cell_create_context(struct pipe_winsys *winsys, struct cell_winsys *cws)
+cell_create_context(struct pipe_screen *screen,
+                    struct cell_winsys *cws)
 {
    struct cell_context *cell;
    uint spu, buf;
@@ -187,17 +98,10 @@ cell_create_context(struct pipe_winsys *winsys, struct cell_winsys *cws)
    memset(cell, 0, sizeof(*cell));
 
    cell->winsys = cws;
-   cell->pipe.winsys = winsys;
+   cell->pipe.winsys = screen->winsys;
+   cell->pipe.screen = screen;
    cell->pipe.destroy = cell_destroy_context;
 
-   /* queries */
-   cell->pipe.is_format_supported = cell_is_format_supported;
-   cell->pipe.get_name = cell_get_name;
-   cell->pipe.get_vendor = cell_get_vendor;
-   cell->pipe.get_param = cell_get_param;
-   cell->pipe.get_paramf = cell_get_paramf;
-
-
    /* state setters */
    cell->pipe.set_vertex_buffer = cell_set_vertex_buffer;
    cell->pipe.set_vertex_element = cell_set_vertex_element;
@@ -224,10 +128,17 @@ cell_create_context(struct pipe_winsys *winsys, struct cell_winsys *cws)
    cell_init_vbuf(cell);
    draw_set_rasterize_stage(cell->draw, cell->vbuf);
 
+   /* convert all points/lines to tris for the time being */
+   draw_wide_point_threshold(cell->draw, 0.0);
+   draw_wide_line_threshold(cell->draw, 0.0);
+
    /*
     * SPU stuff
     */
    cell->num_spus = 6;
+   /* XXX is this in SDK 3.0 only?
+   cell->num_spus = spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, -1);
+   */
 
    cell_start_spus(cell);
 
index 1433a4925fa7a4788a8dd5a5308fe6a8071b84db..bf27289f3f5e29a75b2b26be9275f759c88132ba 100644 (file)
@@ -128,7 +128,7 @@ cell_context(struct pipe_context *pipe)
 
 
 extern struct pipe_context *
-cell_create_context(struct pipe_winsys *ws, struct cell_winsys *cws);
+cell_create_context(struct pipe_screen *screen, struct cell_winsys *cws);
 
 extern void
 cell_vertex_shader_queue_flush(struct draw_context *draw);
index 95bfc29fbeb0316390f73102f03bc4b66ad52235..075e0a0c471bf2a5a50583df3a6e3aa303aa1ad0 100644 (file)
@@ -242,8 +242,7 @@ cell_set_sampler_texture(struct pipe_context *pipe,
 
    draw_flush(cell->draw);
 
-   pipe_texture_reference(pipe,
-                          (struct pipe_texture **) &cell->texture[sampler],
+   pipe_texture_reference((struct pipe_texture **) &cell->texture[sampler],
                           texture);
 
    cell_update_texture_mapping(cell);
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
new file mode 100644 (file)
index 0000000..124670d
--- /dev/null
@@ -0,0 +1,166 @@
+/**************************************************************************
+ * 
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
+ **************************************************************************/
+
+
+#include "pipe/p_util.h"
+#include "pipe/p_winsys.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_screen.h"
+
+#include "cell_screen.h"
+#include "cell_texture.h"
+#include "cell_winsys.h"
+
+
+static const char *
+cell_get_vendor(struct pipe_screen *screen)
+{
+   return "Tungsten Graphics, Inc.";
+}
+
+
+static const char *
+cell_get_name(struct pipe_screen *screen)
+{
+   return "Cell";
+}
+
+
+static int
+cell_get_param(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
+      return 8;
+   case PIPE_CAP_NPOT_TEXTURES:
+      return 1;
+   case PIPE_CAP_TWO_SIDED_STENCIL:
+      return 1;
+   case PIPE_CAP_GLSL:
+      return 1;
+   case PIPE_CAP_S3TC:
+      return 0;
+   case PIPE_CAP_ANISOTROPIC_FILTER:
+      return 0;
+   case PIPE_CAP_POINT_SPRITE:
+      return 1;
+   case PIPE_CAP_MAX_RENDER_TARGETS:
+      return 1;
+   case PIPE_CAP_OCCLUSION_QUERY:
+      return 1;
+   case PIPE_CAP_TEXTURE_SHADOW_MAP:
+      return 1;
+   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+      return 12; /* max 2Kx2K */
+   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
+      return 8;  /* max 128x128x128 */
+   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
+      return 12; /* max 2Kx2K */
+   default:
+      return 0;
+   }
+}
+
+
+static float
+cell_get_paramf(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_LINE_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_LINE_WIDTH_AA:
+      return 255.0; /* arbitrary */
+
+   case PIPE_CAP_MAX_POINT_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_POINT_WIDTH_AA:
+      return 255.0; /* arbitrary */
+
+   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
+      return 0.0;
+
+   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
+      return 16.0; /* arbitrary */
+
+   default:
+      return 0;
+   }
+}
+
+
+static boolean
+cell_is_format_supported( struct pipe_screen *screen,
+                          enum pipe_format format, uint type )
+{
+   switch (type) {
+   case PIPE_TEXTURE:
+      /* cell supports all texture formats, XXX for now anyway */
+      return TRUE;
+   case PIPE_SURFACE:
+      /* cell supports all (off-screen) surface formats, XXX for now */
+      return TRUE;
+   default:
+      assert(0);
+      return FALSE;
+   }
+}
+
+
+static void
+cell_destroy_screen( struct pipe_screen *screen )
+{
+   FREE(screen);
+}
+
+
+/**
+ * Create a new pipe_screen object
+ * Note: we're not presently subclassing pipe_screen (no cell_screen) but
+ * that would be the place to put SPU thread/context info...
+ */
+struct pipe_screen *
+cell_create_screen(struct pipe_winsys *winsys)
+{
+   struct pipe_screen *screen = CALLOC_STRUCT(pipe_screen);
+
+   if (!screen)
+      return NULL;
+
+   screen->winsys = winsys;
+
+   screen->destroy = cell_destroy_screen;
+
+   screen->get_name = cell_get_name;
+   screen->get_vendor = cell_get_vendor;
+   screen->get_param = cell_get_param;
+   screen->get_paramf = cell_get_paramf;
+   screen->is_format_supported = cell_is_format_supported;
+
+   cell_init_screen_texture_funcs(screen);
+
+   return screen;
+}
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.h b/src/gallium/drivers/cell/ppu/cell_screen.h
new file mode 100644 (file)
index 0000000..c7e1588
--- /dev/null
@@ -0,0 +1,41 @@
+/**************************************************************************
+ * 
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ **************************************************************************/
+
+
+#ifndef CELL_SCREEN_H
+#define CELL_SCREEN_H
+
+
+struct pipe_screen;
+struct pipe_winsys;
+
+
+extern struct pipe_screen *
+cell_create_screen(struct pipe_winsys *winsys);
+
+
+#endif /* CELL_SCREEN_H */
index 419e74dc40253508abcc07a559f2c84bb3616895..973c0b1aa12952362855aceb92d8a6b7ee41f872 100644 (file)
@@ -97,8 +97,18 @@ static void *cell_thread_function(void *arg)
 void
 cell_start_spus(struct cell_context *cell)
 {
+   static boolean one_time_init = FALSE;
    uint i, j;
 
+
+   if (one_time_init) {
+      fprintf(stderr, "PPU: Multiple rendering contexts not yet supported "
+             "on Cell.\n");
+      abort();
+   }
+
+   one_time_init = TRUE;
+
    assert(cell->num_spus <= MAX_SPUS);
 
    ASSERT_ALIGN16(&cell_global.command[0]);
index 0edefa5f0561bffacf7e345864031ec68c743806..e235421107e022c955904e7fc335166177f5f19a 100644 (file)
@@ -80,21 +80,23 @@ cell_texture_layout(struct cell_texture * spt)
 
 
 static struct pipe_texture *
-cell_texture_create(struct pipe_context *pipe,
-                    const struct pipe_texture *templat)
+cell_texture_create_screen(struct pipe_screen *screen,
+                           const struct pipe_texture *templat)
 {
+   struct pipe_winsys *ws = screen->winsys;
    struct cell_texture *spt = CALLOC_STRUCT(cell_texture);
    if (!spt)
       return NULL;
 
    spt->base = *templat;
    spt->base.refcount = 1;
+   spt->base.screen = screen;
 
    cell_texture_layout(spt);
 
-   spt->buffer = pipe->winsys->buffer_create(pipe->winsys, 32,
-                                             PIPE_BUFFER_USAGE_PIXEL,
-                                             spt->buffer_size);
+   spt->buffer = ws->buffer_create(ws, 32,
+                                   PIPE_BUFFER_USAGE_PIXEL,
+                                   spt->buffer_size);
 
    if (!spt->buffer) {
       FREE(spt);
@@ -106,7 +108,8 @@ cell_texture_create(struct pipe_context *pipe,
 
 
 static void
-cell_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
+cell_texture_release_screen(struct pipe_screen *screen,
+                            struct pipe_texture **pt)
 {
    if (!*pt)
       return;
@@ -122,7 +125,7 @@ cell_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
       DBG("%s deleting %p\n", __FUNCTION__, (void *) spt);
       */
 
-      pipe_buffer_reference(pipe->winsys, &spt->buffer, NULL);
+      pipe_buffer_reference(screen->winsys, &spt->buffer, NULL);
 
       FREE(spt);
    }
@@ -138,22 +141,20 @@ cell_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
 }
 
 
-/**
- * Called via pipe->get_tex_surface()
- */
 static struct pipe_surface *
-cell_get_tex_surface(struct pipe_context *pipe,
-                         struct pipe_texture *pt,
-                         unsigned face, unsigned level, unsigned zslice)
+cell_get_tex_surface_screen(struct pipe_screen *screen,
+                            struct pipe_texture *pt,
+                            unsigned face, unsigned level, unsigned zslice)
 {
+   struct pipe_winsys *ws = screen->winsys;
    struct cell_texture *spt = cell_texture(pt);
    struct pipe_surface *ps;
 
-   ps = pipe->winsys->surface_alloc(pipe->winsys);
+   ps = ws->surface_alloc(ws);
    if (ps) {
       assert(ps->refcount);
       assert(ps->winsys);
-      pipe_buffer_reference(pipe->winsys, &ps->buffer, spt->buffer);
+      pipe_buffer_reference(ws, &ps->buffer, spt->buffer);
       ps->format = pt->format;
       ps->cpp = pt->cpp;
       ps->width = pt->width[level];
@@ -208,6 +209,7 @@ static void
 cell_tile_texture(struct cell_context *cell,
                   struct cell_texture *texture)
 {
+   struct pipe_screen *screen = cell->pipe.screen;
    uint face = 0, level = 0, zslice = 0;
    struct pipe_surface *surf;
    const uint w = texture->base.width[0], h = texture->base.height[0];
@@ -219,7 +221,7 @@ cell_tile_texture(struct cell_context *cell,
    assert(w % TILE_SIZE == 0);
    assert(h % TILE_SIZE == 0);
 
-   surf = cell_get_tex_surface(&cell->pipe, &texture->base, face, level, zslice);
+   surf = screen->get_tex_surface(screen, &texture->base, face, level, zslice);
    ASSERT(surf);
 
    src = (const uint *) pipe_surface_map(surf);
@@ -265,8 +267,13 @@ cell_update_texture_mapping(struct cell_context *cell)
 void
 cell_init_texture_functions(struct cell_context *cell)
 {
-   cell->pipe.texture_create = cell_texture_create;
-   cell->pipe.texture_release = cell_texture_release;
    cell->pipe.texture_update = cell_texture_update;
-   cell->pipe.get_tex_surface = cell_get_tex_surface;
+}
+
+void
+cell_init_screen_texture_funcs(struct pipe_screen *screen)
+{
+   screen->texture_create = cell_texture_create_screen;
+   screen->texture_release = cell_texture_release_screen;
+   screen->get_tex_surface = cell_get_tex_surface_screen;
 }
index 824fb3e20fc18cc55ad1954d1fc9f6661a12fc99..fcee069d05566c38eb76b38876ca6faef4fccb51 100644 (file)
@@ -68,4 +68,8 @@ extern void
 cell_init_texture_functions(struct cell_context *cell);
 
 
+extern void
+cell_init_screen_texture_funcs(struct pipe_screen *screen);
+
+
 #endif /* CELL_TEXTURE_H */
index cc4bafdb3ac747a70ad2bb00b8514df22c4e5aef..59300028d4da00f0fa4eaae0ea908f2fe1645969 100644 (file)
@@ -286,6 +286,8 @@ cmd_state_texture(const struct cell_command_texture *texture)
       { spu.texture.width, spu.texture.height, 0.0, 0.0};
    spu.tex_size_mask = (vector unsigned int)
       { spu.texture.width - 1, spu.texture.height - 1, 0, 0 };
+   spu.tex_size_x_mask = spu_splats(spu.texture.width - 1);
+   spu.tex_size_y_mask = spu_splats(spu.texture.height - 1);
 }
 
 
index d14f1abbe7405392f8430371dc0cdcb4d20c9adb..a13edd17029983d89f6ed6a1b819afccf9190921 100644 (file)
@@ -107,6 +107,8 @@ struct spu_global
 
    vector float tex_size;
    vector unsigned int tex_size_mask; /**< == int(size - 1) */
+   vector unsigned int tex_size_x_mask; /**< == int(size - 1) */
+   vector unsigned int tex_size_y_mask; /**< == int(size - 1) */
 
    vector float (*sample_texture)(vector float texcoord);
 
@@ -130,7 +132,6 @@ extern boolean Debug;
 #define TAG_INDEX_BUFFER      16
 #define TAG_BATCH_BUFFER      17
 #define TAG_MISC              18
-#define TAG_TEXTURE_TILE      19
 #define TAG_DCACHE0           20
 #define TAG_DCACHE1           21
 #define TAG_DCACHE2           22
index 3962aaa4a9ba8d9d0154a857269d526da7b27e0e..67eb08196a4dd24a84bf54c60b39e68b77dbcc37 100644 (file)
 #include "spu_texture.h"
 #include "spu_tile.h"
 #include "spu_colorpack.h"
-
-
-/**
- * Number of texture tiles to cache.
- * Note that this will probably be the largest consumer of SPU local store/
- * memory for this driver!
- */
-#define CACHE_SIZE 16
-
-static tile_t tex_tiles[CACHE_SIZE]  ALIGN16_ATTRIB;
-
-static vector unsigned int tex_tile_xy[CACHE_SIZE];
-
+#include "spu_dcache.h"
 
 
 /**
@@ -52,78 +40,60 @@ static vector unsigned int tex_tile_xy[CACHE_SIZE];
 void
 invalidate_tex_cache(void)
 {
-   /* XXX memset? */
-   uint i;
-   for (i = 0; i < CACHE_SIZE; i++) {
-      tex_tile_xy[i] = ((vector unsigned int) { ~0U, ~0U, ~0U, ~0U });
-   }
+   spu_dcache_mark_dirty((unsigned) spu.texture.start,
+                         4 * spu.texture.width * spu.texture.height);
 }
 
 
-/**
- * Return the cache pos/index which corresponds to tile (tx,ty)
- */
-static INLINE uint
-cache_pos(vector unsigned int txty)
+static uint
+get_texel(vec_uint4 coordinate)
 {
-   uint pos = (spu_extract(txty,0) + spu_extract(txty,1) * 4) % CACHE_SIZE;
-   return pos;
+   vec_uint4 tmp;
+   unsigned x = spu_extract(coordinate, 0);
+   unsigned y = spu_extract(coordinate, 1);
+   const unsigned tiles_per_row = spu.texture.width / TILE_SIZE;
+   unsigned tile_offset = sizeof(tile_t) * ((y / TILE_SIZE * tiles_per_row) 
+                                            + (x / TILE_SIZE));
+   unsigned texel_offset = 4 * (((y % TILE_SIZE) * TILE_SIZE)
+                                + (x % TILE_SIZE));
+
+   spu_dcache_fetch_unaligned((qword *) & tmp,
+                              spu.texture.start + tile_offset + texel_offset,
+                              4);
+   return spu_extract(tmp, 0);
 }
 
 
-/**
- * Make sure the tile for texel (i,j) is present, return its position/index
- * in the cache.
- */
-static uint
-get_tex_tile(vector unsigned int ij)
+static void
+get_four_texels(vec_uint4 x, vec_uint4 y, vec_uint4 *texels)
 {
-   /* tile address: tx,ty */
-   const vector unsigned int txty = spu_rlmask(ij, -5);  /* divide by 32 */
-   const uint pos = cache_pos(txty);
-
-   if ((spu_extract(tex_tile_xy[pos], 0) != spu_extract(txty, 0)) ||
-       (spu_extract(tex_tile_xy[pos], 1) != spu_extract(txty, 1))) {
-
-      /* texture cache miss, fetch tile from main memory */
-      const uint tiles_per_row = spu.texture.width / TILE_SIZE;
-      const uint bytes_per_tile = sizeof(tile_t);
-      const void *src = (const ubyte *) spu.texture.start
-         + (spu_extract(txty,1) * tiles_per_row + spu_extract(txty,0)) * bytes_per_tile;
-
-      printf("SPU %u: tex cache miss at %d, %d  pos=%u  old=%d,%d\n",
-             spu.init.id,
-             spu_extract(txty,0),
-             spu_extract(txty,1),
-             pos,
-             spu_extract(tex_tile_xy[pos],0),
-             spu_extract(tex_tile_xy[pos],1));
-
-      ASSERT_ALIGN16(tex_tiles[pos].ui);
-      ASSERT_ALIGN16(src);
-
-      mfc_get(tex_tiles[pos].ui,  /* dest */
-              (unsigned int) src,
-              bytes_per_tile,      /* size */
-              TAG_TEXTURE_TILE,
-              0, /* tid */
-              0  /* rid */);
-
-      wait_on_mask(1 << TAG_TEXTURE_TILE);
-
-      tex_tile_xy[pos] = txty;
-   }
-   else {
-#if 0
-      printf("SPU %u: tex cache HIT at %d, %d\n",
-             spu.init.id, tx, ty);
-#endif
-   }
-
-   return pos;
+   const unsigned texture_ea = (uintptr_t) spu.texture.start;
+   vec_uint4 tile_x = spu_rlmask(x, -5);
+   vec_uint4 tile_y = spu_rlmask(y, -5);
+   const qword offset_x = si_andi((qword) x, 0x1f);
+   const qword offset_y = si_andi((qword) y, 0x1f);
+
+   const qword tiles_per_row = (qword) spu_splats(spu.texture.width / TILE_SIZE);
+   const qword tile_size = (qword) spu_splats(sizeof(tile_t));
+
+   qword tile_offset = si_mpya((qword) tile_y, tiles_per_row, (qword) tile_x);
+   tile_offset = si_mpy((qword) tile_offset, tile_size);
+
+   qword texel_offset = si_a(si_mpyui(offset_y, 32), offset_x);
+   texel_offset = si_mpyui(texel_offset, 4);
+   
+   vec_uint4 offset = (vec_uint4) si_a(tile_offset, texel_offset);
+   
+   spu_dcache_fetch_unaligned((qword *) & texels[0],
+                              texture_ea + spu_extract(offset, 0), 4);
+   spu_dcache_fetch_unaligned((qword *) & texels[1],
+                              texture_ea + spu_extract(offset, 1), 4);
+   spu_dcache_fetch_unaligned((qword *) & texels[2],
+                              texture_ea + spu_extract(offset, 2), 4);
+   spu_dcache_fetch_unaligned((qword *) & texels[3],
+                              texture_ea + spu_extract(offset, 3), 4);
 }
 
-
 /**
  * Get texture sample at texcoord.
  * XXX this is extremely primitive for now.
@@ -134,9 +104,7 @@ sample_texture_nearest(vector float texcoord)
    vector float tc = spu_mul(texcoord, spu.tex_size);
    vector unsigned int itc = spu_convtu(tc, 0);  /* convert to int */
    itc = spu_and(itc, spu.tex_size_mask);        /* mask (GL_REPEAT) */
-   vector unsigned int ij = spu_and(itc, TILE_SIZE-1); /* intra tile addr */
-   uint pos = get_tex_tile(itc);
-   uint texel = tex_tiles[pos].ui[spu_extract(ij, 1)][spu_extract(ij, 0)];
+   uint texel = get_texel(itc);
    return spu_unpack_A8R8G8B8(texel);
 }
 
@@ -144,49 +112,33 @@ sample_texture_nearest(vector float texcoord)
 vector float
 sample_texture_bilinear(vector float texcoord)
 {
-   static const vector unsigned int offset10 = {1, 0, 0, 0};
-   static const vector unsigned int offset01 = {0, 1, 0, 0};
+   static const vec_uint4 offset_x = {0, 0, 1, 1};
+   static const vec_uint4 offset_y = {0, 1, 0, 1};
 
    vector float tc = spu_mul(texcoord, spu.tex_size);
    tc = spu_add(tc, spu_splats(-0.5f));  /* half texel bias */
 
    /* integer texcoords S,T: */
-   vector unsigned int itc00 = spu_convtu(tc, 0);  /* convert to int */
-   vector unsigned int itc01 = spu_add(itc00, offset01);
-   vector unsigned int itc10 = spu_add(itc00, offset10);
-   vector unsigned int itc11 = spu_add(itc10, offset01);
-
-   /* mask (GL_REPEAT) */
-   itc00 = spu_and(itc00, spu.tex_size_mask);
-   itc01 = spu_and(itc01, spu.tex_size_mask);
-   itc10 = spu_and(itc10, spu.tex_size_mask);
-   itc11 = spu_and(itc11, spu.tex_size_mask);
-
-   /* intra tile addr */
-   vector unsigned int ij00 = spu_and(itc00, TILE_SIZE-1);
-   vector unsigned int ij01 = spu_and(itc01, TILE_SIZE-1);
-   vector unsigned int ij10 = spu_and(itc10, TILE_SIZE-1);
-   vector unsigned int ij11 = spu_and(itc11, TILE_SIZE-1);
-
-   /* get tile cache positions */
-   uint pos00 = get_tex_tile(itc00);
-   uint pos01, pos10, pos11;
-   if ((spu_extract(ij00, 0) < TILE_SIZE-1) &&
-       (spu_extract(ij00, 1) < TILE_SIZE-1)) {
-      /* all texels are in the same tile */
-      pos01 = pos10 = pos11 = pos00;
-   }
-   else {
-      pos01 = get_tex_tile(itc01);
-      pos10 = get_tex_tile(itc10);
-      pos11 = get_tex_tile(itc11);
-   }
-
-   /* get texels from tiles and convert to float[4] */
-   vector float texel00 = spu_unpack_A8R8G8B8(tex_tiles[pos00].ui[spu_extract(ij00, 1)][spu_extract(ij00, 0)]);
-   vector float texel01 = spu_unpack_A8R8G8B8(tex_tiles[pos01].ui[spu_extract(ij01, 1)][spu_extract(ij01, 0)]);
-   vector float texel10 = spu_unpack_A8R8G8B8(tex_tiles[pos10].ui[spu_extract(ij10, 1)][spu_extract(ij10, 0)]);
-   vector float texel11 = spu_unpack_A8R8G8B8(tex_tiles[pos11].ui[spu_extract(ij11, 1)][spu_extract(ij11, 0)]);
+   vec_uint4 itc = spu_convtu(tc, 0);  /* convert to int */
+
+   vec_uint4 texels[4];
+   
+   vec_uint4 x = spu_splats(spu_extract(itc, 0));
+   vec_uint4 y = spu_splats(spu_extract(itc, 1));
+
+   x = spu_add(x, offset_x);
+   y = spu_add(y, offset_y);
+
+   x = spu_and(x, spu.tex_size_x_mask);
+   y = spu_and(y, spu.tex_size_y_mask);
+
+   get_four_texels(x, y, texels);
+
+   vector float texel00 = spu_unpack_A8R8G8B8(spu_extract(texels[0], 0));
+   vector float texel01 = spu_unpack_A8R8G8B8(spu_extract(texels[1], 0));
+   vector float texel10 = spu_unpack_A8R8G8B8(spu_extract(texels[2], 0));
+   vector float texel11 = spu_unpack_A8R8G8B8(spu_extract(texels[3], 0));
+
 
    /* Compute weighting factors in [0,1]
     * Multiply texcoord by 1024, AND with 1023, convert back to float.
index 156f7399b031495c24e27702f0bbada438a909fc..afc0d7eb1ece9f7801e76af9c0c296458b4cc163 100644 (file)
@@ -117,12 +117,15 @@ struct pipe_context *failover_create( struct pipe_context *hw,
    failover->hw = hw;
    failover->sw = sw;
    failover->pipe.winsys = hw->winsys;
+   failover->pipe.screen = hw->screen;
    failover->pipe.destroy = failover_destroy;
+#if 0
    failover->pipe.is_format_supported = hw->is_format_supported;
    failover->pipe.get_name = hw->get_name;
    failover->pipe.get_vendor = hw->get_vendor;
    failover->pipe.get_param = hw->get_param;
    failover->pipe.get_paramf = hw->get_paramf;
+#endif
 
    failover->pipe.draw_arrays = failover_draw_arrays;
    failover->pipe.draw_elements = failover_draw_elements;
@@ -140,10 +143,12 @@ struct pipe_context *failover_create( struct pipe_context *hw,
    failover->pipe.surface_copy = hw->surface_copy;
    failover->pipe.surface_fill = hw->surface_fill;
 
+#if 0
    failover->pipe.texture_create = hw->texture_create;
    failover->pipe.texture_release = hw->texture_release;
-   failover->pipe.texture_update = hw->texture_update;
    failover->pipe.get_tex_surface = hw->get_tex_surface;
+#endif
+   failover->pipe.texture_update = hw->texture_update;
 
    failover->pipe.flush = hw->flush;
 
index 2a75f5d57ce7dfe18c7969f164af276b1030459d..41a61a0020b513a0f5cc365c41f5533050cb2279 100644 (file)
@@ -17,7 +17,7 @@ C_SOURCES = \
        i915_state_derived.c \
        i915_state_emit.c \
        i915_state_sampler.c \
-       i915_strings.c \
+       i915_screen.c \
        i915_prim_emit.c \
        i915_prim_vbuf.c \
        i915_texture.c \
index f5fb96b995c8bf3dc2c5fda3b6a5a5971dae5f32..2366e1247f2306a82d6d3292ee9fb2ffd554df7f 100644 (file)
@@ -15,13 +15,13 @@ i915simple = env.ConvenienceLibrary(
                'i915_fpc_translate.c',
                'i915_prim_emit.c',
                'i915_prim_vbuf.c',
+               'i915_screen.c',
                'i915_state.c',
                'i915_state_derived.c',
                'i915_state_dynamic.c',
                'i915_state_emit.c',
                'i915_state_immediate.c',
                'i915_state_sampler.c',
-               'i915_strings.c',
                'i915_surface.c',
                'i915_texture.c',
        ])
index c3955bbd2dd830d9ec39fa7b20fa2cbbe7722027..15ff2360b74ce24969299d208e998f0a704e81d3 100644 (file)
 #include "pipe/p_defines.h"
 #include "pipe/p_winsys.h"
 #include "pipe/p_util.h"
-
-
-/**
- * Query format support for creating a texture, drawing surface, etc.
- * \param format  the format to test
- * \param type  one of PIPE_TEXTURE, PIPE_SURFACE
- */
-static boolean
-i915_is_format_supported( struct pipe_context *pipe,
-                          enum pipe_format format, uint type )
-{
-   static const enum pipe_format tex_supported[] = {
-      PIPE_FORMAT_R8G8B8A8_UNORM,
-      PIPE_FORMAT_A8R8G8B8_UNORM,
-      PIPE_FORMAT_R5G6B5_UNORM,
-      PIPE_FORMAT_U_L8,
-      PIPE_FORMAT_U_A8,
-      PIPE_FORMAT_U_I8,
-      PIPE_FORMAT_U_A8_L8,
-      PIPE_FORMAT_YCBCR,
-      PIPE_FORMAT_YCBCR_REV,
-      PIPE_FORMAT_S8Z24_UNORM,
-      PIPE_FORMAT_NONE  /* list terminator */
-   };
-   static const enum pipe_format surface_supported[] = {
-      PIPE_FORMAT_A8R8G8B8_UNORM,
-      PIPE_FORMAT_R5G6B5_UNORM,
-      PIPE_FORMAT_S8Z24_UNORM,
-      /*PIPE_FORMAT_R16G16B16A16_SNORM,*/
-      PIPE_FORMAT_NONE  /* list terminator */
-   };
-   const enum pipe_format *list;
-   uint i;
-
-   switch (type) {
-   case PIPE_TEXTURE:
-      list = tex_supported;
-      break;
-   case PIPE_SURFACE:
-      list = surface_supported;
-      break;
-   default:
-      assert(0);
-   }
-
-   for (i = 0; list[i] != PIPE_FORMAT_NONE; i++) {
-      if (list[i] == format)
-         return TRUE;
-   }
-
-   return FALSE;
-}
-
-
-static int
-i915_get_param(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
-      return 8;
-   case PIPE_CAP_NPOT_TEXTURES:
-      return 1;
-   case PIPE_CAP_TWO_SIDED_STENCIL:
-      return 1;
-   case PIPE_CAP_GLSL:
-      return 0;
-   case PIPE_CAP_S3TC:
-      return 0;
-   case PIPE_CAP_ANISOTROPIC_FILTER:
-      return 0;
-   case PIPE_CAP_POINT_SPRITE:
-      return 0;
-   case PIPE_CAP_MAX_RENDER_TARGETS:
-      return 1;
-   case PIPE_CAP_OCCLUSION_QUERY:
-      return 0;
-   case PIPE_CAP_TEXTURE_SHADOW_MAP:
-      return 1;
-   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
-      return 11; /* max 1024x1024 */
-   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
-      return 8;  /* max 128x128x128 */
-   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return 11; /* max 1024x1024 */
-   default:
-      return 0;
-   }
-}
-
-
-static float
-i915_get_paramf(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_LINE_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_LINE_WIDTH_AA:
-      return 7.5;
-
-   case PIPE_CAP_MAX_POINT_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_POINT_WIDTH_AA:
-      return 255.0;
-
-   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
-      return 4.0;
-
-   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
-      return 16.0;
-
-   default:
-      return 0;
-   }
-}
+#include "pipe/p_screen.h"
 
 
 static void i915_destroy( struct pipe_context *pipe )
@@ -162,8 +49,6 @@ static void i915_destroy( struct pipe_context *pipe )
 }
 
 
-
-
 static boolean
 i915_draw_elements( struct pipe_context *pipe,
                     struct pipe_buffer *indexBuffer,
@@ -234,33 +119,11 @@ static boolean i915_draw_arrays( struct pipe_context *pipe,
 
 
 
-struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys,
-                                 struct i915_winsys *i915_winsys,
-                                 unsigned pci_id )
+struct pipe_context *i915_create_context( struct pipe_screen *screen,
+                                          struct pipe_winsys *pipe_winsys,
+                                          struct i915_winsys *i915_winsys )
 {
    struct i915_context *i915;
-   unsigned is_i945 = 0;
-
-   switch (pci_id) {
-   case PCI_CHIP_I915_G:
-   case PCI_CHIP_I915_GM:
-      break;
-
-   case PCI_CHIP_I945_G:
-   case PCI_CHIP_I945_GM:
-   case PCI_CHIP_I945_GME:
-   case PCI_CHIP_G33_G:
-   case PCI_CHIP_Q33_G:
-   case PCI_CHIP_Q35_G:
-      is_i945 = 1;
-      break;
-
-   default:
-      pipe_winsys->printf(pipe_winsys, 
-                         "%s: unknown pci id 0x%x, cannot create context\n", 
-                         __FUNCTION__, pci_id);
-      return NULL;
-   }
 
    i915 = CALLOC_STRUCT(i915_context);
    if (i915 == NULL)
@@ -268,11 +131,9 @@ struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys,
 
    i915->winsys = i915_winsys;
    i915->pipe.winsys = pipe_winsys;
+   i915->pipe.screen = screen;
 
    i915->pipe.destroy = i915_destroy;
-   i915->pipe.is_format_supported = i915_is_format_supported;
-   i915->pipe.get_param = i915_get_param;
-   i915->pipe.get_paramf = i915_get_paramf;
 
    i915->pipe.clear = i915_clear;
 
@@ -295,15 +156,11 @@ struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys,
    i915_init_surface_functions(i915);
    i915_init_state_functions(i915);
    i915_init_flush_functions(i915);
-   i915_init_string_functions(i915);
    i915_init_texture_functions(i915);
 
    draw_install_aaline_stage(i915->draw, &i915->pipe);
    draw_install_aapoint_stage(i915->draw, &i915->pipe);
 
-   i915->pci_id = pci_id;
-   i915->flags.is_i945 = is_i945;
-
    i915->dirty = ~0;
    i915->hardware_dirty = ~0;
 
@@ -311,11 +168,6 @@ struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys,
     */
    i915->batch_start = NULL;
 
-   /*
-    * XXX we could plug GL selection/feedback into the drawing pipeline
-    * by specifying a different setup/render stage.
-    */
-
    return &i915->pipe;
 }
 
index d32dded6bdc276d4c0909b098fca69074a2494b3..6401112f83515a7286ae868c99c3d8e2fbb7961d 100644 (file)
@@ -35,6 +35,8 @@
 
 #include "draw/draw_vertex.h"
 
+#include "tgsi/util/tgsi_scan.h"
+
 
 #define I915_TEX_UNITS 8
 
@@ -89,6 +91,9 @@
 struct i915_fragment_shader
 {
    struct pipe_shader_state state;
+
+   struct tgsi_shader_info info;
+
    uint *program;
    uint program_len;
 
@@ -240,11 +245,6 @@ struct i915_context
    unsigned hardware_dirty;
    
    unsigned debug;
-   unsigned pci_id;
-
-   struct {
-      unsigned is_i945:1;
-   } flags;
 };
 
 /* A flag for each state_tracker state object:
@@ -320,6 +320,7 @@ void i915_init_string_functions( struct i915_context *i915 );
 
 
 
+
 /***********************************************************************
  * Inline conversion functions.  These are better-typed than the
  * macros used previously:
index 250dfe6dbf0b22ab1f68713fa8e65a4aa2f0b979..80a9576304ca417dbef1c80fe61a4d99842cba90 100644 (file)
@@ -58,12 +58,6 @@ struct i915_fp_compile {
    uint declarations[I915_PROGRAM_SIZE];
    uint program[I915_PROGRAM_SIZE];
 
-   uint input_semantic_name[PIPE_MAX_SHADER_INPUTS];
-   uint input_semantic_index[PIPE_MAX_SHADER_INPUTS];
-
-   uint output_semantic_name[PIPE_MAX_SHADER_OUTPUTS];
-   uint output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
-
    uint *csr;            /**< Cursor, points into program. */
 
    uint *decl;           /**< Cursor, points into declarations. */
index 76a2184e9aba87bc3a9f69cbbd2cb8c89700790d..c2d9a93c6c84d582cd15468a01db24a22760ffac 100644 (file)
@@ -162,8 +162,8 @@ src_vector(struct i915_fp_compile *p,
        * We also use a texture coordinate to pass wpos when possible.
        */
 
-      sem_name = p->input_semantic_name[index];
-      sem_ind = p->input_semantic_index[index];
+      sem_name = p->shader->info.input_semantic_name[index];
+      sem_ind = p->shader->info.input_semantic_index[index];
 
       switch (sem_name) {
       case TGSI_SEMANTIC_POSITION:
@@ -265,7 +265,7 @@ get_result_vector(struct i915_fp_compile *p,
    switch (dest->DstRegister.File) {
    case TGSI_FILE_OUTPUT:
       {
-         uint sem_name = p->output_semantic_name[dest->DstRegister.Index];
+         uint sem_name = p->shader->info.output_semantic_name[dest->DstRegister.Index];
          switch (sem_name) {
          case TGSI_SEMANTIC_POSITION:
             return UREG(REG_TYPE_OD, 0);
@@ -942,28 +942,6 @@ i915_translate_instructions(struct i915_fp_compile *p,
       switch( parse.FullToken.Token.Type ) {
       case TGSI_TOKEN_TYPE_DECLARATION:
          if (parse.FullToken.FullDeclaration.Declaration.File
-             == TGSI_FILE_INPUT) {
-            /* save input register info for use in src_vector() */
-            uint ind, sem, semi;
-            ind = parse.FullToken.FullDeclaration.u.DeclarationRange.First;
-            sem = parse.FullToken.FullDeclaration.Semantic.SemanticName;
-            semi = parse.FullToken.FullDeclaration.Semantic.SemanticIndex;
-            /*debug_printf("FS Input DECL [%u] sem %u\n", ind, sem);*/
-            p->input_semantic_name[ind] = sem;
-            p->input_semantic_index[ind] = semi;
-         }
-         else if (parse.FullToken.FullDeclaration.Declaration.File
-             == TGSI_FILE_OUTPUT) {
-            /* save output register info for use in get_result_vector() */
-            uint ind, sem, semi;
-            ind = parse.FullToken.FullDeclaration.u.DeclarationRange.First;
-            sem = parse.FullToken.FullDeclaration.Semantic.SemanticName;
-            semi = parse.FullToken.FullDeclaration.Semantic.SemanticIndex;
-            /*debug_printf("FS Output DECL [%u] sem %u\n", ind, sem);*/
-            p->output_semantic_name[ind] = sem;
-            p->output_semantic_index[ind] = semi;
-         }
-         else if (parse.FullToken.FullDeclaration.Declaration.File
                   == TGSI_FILE_CONSTANT) {
             uint i;
             for (i = parse.FullToken.FullDeclaration.u.DeclarationRange.First;
@@ -981,6 +959,7 @@ i915_translate_instructions(struct i915_fp_compile *p,
                  i <= parse.FullToken.FullDeclaration.u.DeclarationRange.Last;
                  i++) {
                assert(i < I915_MAX_TEMPORARY);
+               /* XXX just use shader->info->file_mask[TGSI_FILE_TEMPORARY] */
                p->temp_flag |= (1 << i); /* mark temp as used */
             }
          }
@@ -1163,7 +1142,7 @@ i915_find_wpos_space(struct i915_fp_compile *p)
       i915_program_error(p, "No free texcoord for wpos value");
    }
 #else
-   if (p->shader->state.input_semantic_name[0] == TGSI_SEMANTIC_POSITION) {
+   if (p->shader->info.input_semantic_name[0] == TGSI_SEMANTIC_POSITION) {
       /* frag shader using the fragment position input */
 #if 0
       assert(0);
@@ -1184,7 +1163,7 @@ static void
 i915_fixup_depth_write(struct i915_fp_compile *p)
 {
    /* XXX assuming pos/depth is always in output[0] */
-   if (p->shader->state.output_semantic_name[0] == TGSI_SEMANTIC_POSITION) {
+   if (p->shader->info.output_semantic_name[0] == TGSI_SEMANTIC_POSITION) {
       const uint depth = UREG(REG_TYPE_OD, 0);
 
       i915_emit_arith(p,
diff --git a/src/gallium/drivers/i915simple/i915_screen.c b/src/gallium/drivers/i915simple/i915_screen.c
new file mode 100644 (file)
index 0000000..8d7bf0b
--- /dev/null
@@ -0,0 +1,250 @@
+/**************************************************************************
+ * 
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
+ **************************************************************************/
+
+
+#include "pipe/p_util.h"
+#include "pipe/p_winsys.h"
+
+#include "i915_reg.h"
+#include "i915_context.h"
+#include "i915_screen.h"
+#include "i915_texture.h"
+
+
+static const char *
+i915_get_vendor( struct pipe_screen *pscreen )
+{
+   return "Tungsten Graphics, Inc.";
+}
+
+
+static const char *
+i915_get_name( struct pipe_screen *pscreen )
+{
+   static char buffer[128];
+   const char *chipset;
+
+   switch (i915_screen(pscreen)->pci_id) {
+   case PCI_CHIP_I915_G:
+      chipset = "915G";
+      break;
+   case PCI_CHIP_I915_GM:
+      chipset = "915GM";
+      break;
+   case PCI_CHIP_I945_G:
+      chipset = "945G";
+      break;
+   case PCI_CHIP_I945_GM:
+      chipset = "945GM";
+      break;
+   case PCI_CHIP_I945_GME:
+      chipset = "945GME";
+      break;
+   case PCI_CHIP_G33_G:
+      chipset = "G33";
+      break;
+   case PCI_CHIP_Q35_G:
+      chipset = "Q35";
+      break;
+   case PCI_CHIP_Q33_G:
+      chipset = "Q33";
+      break;
+   default:
+      chipset = "unknown";
+      break;
+   }
+
+   sprintf(buffer, "i915 (chipset: %s)", chipset);
+   return buffer;
+}
+
+
+static int
+i915_get_param(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
+      return 8;
+   case PIPE_CAP_NPOT_TEXTURES:
+      return 1;
+   case PIPE_CAP_TWO_SIDED_STENCIL:
+      return 1;
+   case PIPE_CAP_GLSL:
+      return 0;
+   case PIPE_CAP_S3TC:
+      return 0;
+   case PIPE_CAP_ANISOTROPIC_FILTER:
+      return 0;
+   case PIPE_CAP_POINT_SPRITE:
+      return 0;
+   case PIPE_CAP_MAX_RENDER_TARGETS:
+      return 1;
+   case PIPE_CAP_OCCLUSION_QUERY:
+      return 0;
+   case PIPE_CAP_TEXTURE_SHADOW_MAP:
+      return 1;
+   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+      return 11; /* max 1024x1024 */
+   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
+      return 8;  /* max 128x128x128 */
+   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
+      return 11; /* max 1024x1024 */
+   default:
+      return 0;
+   }
+}
+
+
+static float
+i915_get_paramf(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_LINE_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_LINE_WIDTH_AA:
+      return 7.5;
+
+   case PIPE_CAP_MAX_POINT_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_POINT_WIDTH_AA:
+      return 255.0;
+
+   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
+      return 4.0;
+
+   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
+      return 16.0;
+
+   default:
+      return 0;
+   }
+}
+
+
+static boolean
+i915_is_format_supported( struct pipe_screen *screen,
+                          enum pipe_format format, uint type )
+{
+   static const enum pipe_format tex_supported[] = {
+      PIPE_FORMAT_R8G8B8A8_UNORM,
+      PIPE_FORMAT_A8R8G8B8_UNORM,
+      PIPE_FORMAT_R5G6B5_UNORM,
+      PIPE_FORMAT_U_L8,
+      PIPE_FORMAT_U_A8,
+      PIPE_FORMAT_U_I8,
+      PIPE_FORMAT_U_A8_L8,
+      PIPE_FORMAT_YCBCR,
+      PIPE_FORMAT_YCBCR_REV,
+      PIPE_FORMAT_S8Z24_UNORM,
+      PIPE_FORMAT_NONE  /* list terminator */
+   };
+   static const enum pipe_format surface_supported[] = {
+      PIPE_FORMAT_A8R8G8B8_UNORM,
+      PIPE_FORMAT_R5G6B5_UNORM,
+      PIPE_FORMAT_S8Z24_UNORM,
+      /*PIPE_FORMAT_R16G16B16A16_SNORM,*/
+      PIPE_FORMAT_NONE  /* list terminator */
+   };
+   const enum pipe_format *list;
+   uint i;
+
+   switch (type) {
+   case PIPE_TEXTURE:
+      list = tex_supported;
+      break;
+   case PIPE_SURFACE:
+      list = surface_supported;
+      break;
+   default:
+      assert(0);
+   }
+
+   for (i = 0; list[i] != PIPE_FORMAT_NONE; i++) {
+      if (list[i] == format)
+         return TRUE;
+   }
+
+   return FALSE;
+}
+
+
+static void
+i915_destroy_screen( struct pipe_screen *screen )
+{
+   FREE(screen);
+}
+
+
+/**
+ * Create a new i915_screen object
+ */
+struct pipe_screen *
+i915_create_screen(struct pipe_winsys *winsys, uint pci_id)
+{
+   struct i915_screen *i915screen = CALLOC_STRUCT(i915_screen);
+
+   if (!i915screen)
+      return NULL;
+
+   switch (pci_id) {
+   case PCI_CHIP_I915_G:
+   case PCI_CHIP_I915_GM:
+      i915screen->is_i945 = FALSE;
+      break;
+
+   case PCI_CHIP_I945_G:
+   case PCI_CHIP_I945_GM:
+   case PCI_CHIP_I945_GME:
+   case PCI_CHIP_G33_G:
+   case PCI_CHIP_Q33_G:
+   case PCI_CHIP_Q35_G:
+      i915screen->is_i945 = TRUE;
+      break;
+
+   default:
+      winsys->printf(winsys, 
+                     "%s: unknown pci id 0x%x, cannot create screen\n", 
+                     __FUNCTION__, pci_id);
+      return NULL;
+   }
+
+   i915screen->pci_id = pci_id;
+
+   i915screen->screen.winsys = winsys;
+
+   i915screen->screen.destroy = i915_destroy_screen;
+
+   i915screen->screen.get_name = i915_get_name;
+   i915screen->screen.get_vendor = i915_get_vendor;
+   i915screen->screen.get_param = i915_get_param;
+   i915screen->screen.get_paramf = i915_get_paramf;
+   i915screen->screen.is_format_supported = i915_is_format_supported;
+
+   i915_init_screen_texture_functions(&i915screen->screen);
+
+   return &i915screen->screen;
+}
diff --git a/src/gallium/drivers/i915simple/i915_screen.h b/src/gallium/drivers/i915simple/i915_screen.h
new file mode 100644 (file)
index 0000000..73b0ff0
--- /dev/null
@@ -0,0 +1,69 @@
+/**************************************************************************
+ * 
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ **************************************************************************/
+
+
+#ifndef I915_SCREEN_H
+#define I915_SCREEN_H
+
+
+#include "pipe/p_screen.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Subclass of pipe_screen
+ */
+struct i915_screen
+{
+   struct pipe_screen screen;
+
+   boolean is_i945;
+   uint pci_id;
+};
+
+
+/** cast wrapper */
+static INLINE struct i915_screen *
+i915_screen(struct pipe_screen *pscreen)
+{
+   return (struct i915_screen *) pscreen;
+}
+
+
+extern struct pipe_screen *
+i915_create_screen(struct pipe_winsys *winsys, uint pci_id);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* I915_SCREEN_H */
index a35bdf941fc00d3f905042145ba98f6d0be71aa2..27af46bea033cfadfdb791cca0bb7a6e86930fb3 100644 (file)
@@ -429,6 +429,8 @@ i915_create_fs_state(struct pipe_context *pipe,
 
    ifs->state = *templ;
 
+   tgsi_scan_shader(templ->tokens, &ifs->info);
+
    /* The shader's compiled to i915 instructions here */
    i915_translate_fragment_program(i915, ifs);
 
@@ -530,8 +532,7 @@ static void i915_set_sampler_texture(struct pipe_context *pipe,
 {
    struct i915_context *i915 = i915_context(pipe);
 
-   pipe_texture_reference(pipe,
-                          (struct pipe_texture **) &i915->texture[sampler],
+   pipe_texture_reference((struct pipe_texture **) &i915->texture[sampler],
                           texture);
 
    i915->dirty |= I915_NEW_TEXTURE;
index 5cf70acdf3b031b68b35698bb437e2500fc60cbe..4daccec6e0c6ae172c95441480ab2b213d734370 100644 (file)
@@ -43,7 +43,7 @@
  */
 static void calculate_vertex_layout( struct i915_context *i915 )
 {
-   const struct pipe_shader_state *fs = &i915->fs->state;
+   const struct i915_fragment_shader *fs = i915->fs;
    const enum interp_mode colorInterp = i915->rasterizer->color_interp;
    struct vertex_info vinfo;
    boolean texCoords[8], colors[2], fog, needW;
@@ -57,18 +57,18 @@ static void calculate_vertex_layout( struct i915_context *i915 )
    /* Determine which fragment program inputs are needed.  Setup HW vertex
     * layout below, in the HW-specific attribute order.
     */
-   for (i = 0; i < fs->num_inputs; i++) {
-      switch (fs->input_semantic_name[i]) {
+   for (i = 0; i < fs->info.num_inputs; i++) {
+      switch (fs->info.input_semantic_name[i]) {
       case TGSI_SEMANTIC_POSITION:
          break;
       case TGSI_SEMANTIC_COLOR:
-         assert(fs->input_semantic_index[i] < 2);
-         colors[fs->input_semantic_index[i]] = TRUE;
+         assert(fs->info.input_semantic_index[i] < 2);
+         colors[fs->info.input_semantic_index[i]] = TRUE;
          break;
       case TGSI_SEMANTIC_GENERIC:
          /* usually a texcoord */
          {
-            const uint unit = fs->input_semantic_index[i];
+            const uint unit = fs->info.input_semantic_index[i];
             assert(unit < 8);
             texCoords[unit] = TRUE;
             needW = TRUE;
diff --git a/src/gallium/drivers/i915simple/i915_strings.c b/src/gallium/drivers/i915simple/i915_strings.c
deleted file mode 100644 (file)
index 301fede..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/**************************************************************************
- * 
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * 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, sub license, 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 (including the
- * next paragraph) 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 NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
- * 
- **************************************************************************/
-
-#include "i915_context.h"
-#include "i915_reg.h"
-
-
-static const char *i915_get_vendor( struct pipe_context *pipe )
-{
-   return "Tungsten Graphics, Inc.";
-}
-
-
-static const char *i915_get_name( struct pipe_context *pipe )
-{
-   static char buffer[128];
-   const char *chipset;
-
-   switch (i915_context(pipe)->pci_id) {
-   case PCI_CHIP_I915_G:
-      chipset = "915G";
-      break;
-   case PCI_CHIP_I915_GM:
-      chipset = "915GM";
-      break;
-   case PCI_CHIP_I945_G:
-      chipset = "945G";
-      break;
-   case PCI_CHIP_I945_GM:
-      chipset = "945GM";
-      break;
-   case PCI_CHIP_I945_GME:
-      chipset = "945GME";
-      break;
-   case PCI_CHIP_G33_G:
-      chipset = "G33";
-      break;
-   case PCI_CHIP_Q35_G:
-      chipset = "Q35";
-      break;
-   case PCI_CHIP_Q33_G:
-      chipset = "Q33";
-      break;
-   default:
-      chipset = "unknown";
-      break;
-   }
-
-   sprintf(buffer, "i915 (chipset: %s)", chipset);
-   return buffer;
-}
-
-
-void
-i915_init_string_functions(struct i915_context *i915)
-{
-   i915->pipe.get_name = i915_get_name;
-   i915->pipe.get_vendor = i915_get_vendor;
-}
index 1b415a94d4094a30b2ba14a8105381753c96b49a..ef5adff550e29519a301c090df8428a08828ca33 100644 (file)
@@ -40,6 +40,7 @@
 #include "i915_context.h"
 #include "i915_texture.h"
 #include "i915_debug.h"
+#include "i915_screen.h"
 
 
 static unsigned minify( unsigned d )
@@ -187,7 +188,7 @@ static const int step_offsets[6][2] = {
 
 
 static boolean
-i915_miptree_layout(struct pipe_context *pipe, struct i915_texture * tex)
+i915_miptree_layout(struct i915_texture * tex)
 {
    struct pipe_texture *pt = &tex->base;
    unsigned level;
@@ -311,7 +312,7 @@ i915_miptree_layout(struct pipe_context *pipe, struct i915_texture * tex)
 
 
 static boolean
-i945_miptree_layout(struct pipe_context *pipe, struct i915_texture * tex)
+i945_miptree_layout(struct i915_texture * tex)
 {
    struct pipe_texture *pt = &tex->base;
    unsigned level;
@@ -479,23 +480,25 @@ i945_miptree_layout(struct pipe_context *pipe, struct i915_texture * tex)
 
 
 static struct pipe_texture *
-i915_texture_create(struct pipe_context *pipe,
-                    const struct pipe_texture *templat)
+i915_texture_create_screen(struct pipe_screen *screen,
+                           const struct pipe_texture *templat)
 {
    struct i915_texture *tex = CALLOC_STRUCT(i915_texture);
 
    if (tex) {
-      struct i915_context *i915 = i915_context(pipe);
+      struct i915_screen *i915screen = i915_screen(screen);
+      struct pipe_winsys *ws = screen->winsys;
 
       tex->base = *templat;
       tex->base.refcount = 1;
+      tex->base.screen = screen;
 
-      if (i915->flags.is_i945 ? i945_miptree_layout(pipe, tex) :
-         i915_miptree_layout(pipe, tex))
-        tex->buffer = pipe->winsys->buffer_create(pipe->winsys, 64,
-                                                   PIPE_BUFFER_USAGE_PIXEL,
-                                                   tex->pitch * tex->base.cpp *
-                                                   tex->total_height);
+      if (i915screen->is_i945 ? i945_miptree_layout(tex) :
+         i915_miptree_layout(tex))
+        tex->buffer = ws->buffer_create(ws, 64,
+                                         PIPE_BUFFER_USAGE_PIXEL,
+                                         tex->pitch * tex->base.cpp *
+                                         tex->total_height);
 
       if (!tex->buffer) {
         FREE(tex);
@@ -508,7 +511,8 @@ i915_texture_create(struct pipe_context *pipe,
 
 
 static void
-i915_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
+i915_texture_release_screen(struct pipe_screen *screen,
+                            struct pipe_texture **pt)
 {
    if (!*pt)
       return;
@@ -525,7 +529,7 @@ i915_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
       DBG("%s deleting %p\n", __FUNCTION__, (void *) tex);
       */
 
-      pipe_buffer_reference(pipe->winsys, &tex->buffer, NULL);
+      pipe_buffer_reference(screen->winsys, &tex->buffer, NULL);
 
       for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++)
          if (tex->image_offset[i])
@@ -548,11 +552,12 @@ i915_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
  * XXX note: same as code in sp_surface.c
  */
 static struct pipe_surface *
-i915_get_tex_surface(struct pipe_context *pipe,
-                     struct pipe_texture *pt,
-                     unsigned face, unsigned level, unsigned zslice)
+i915_get_tex_surface_screen(struct pipe_screen *screen,
+                            struct pipe_texture *pt,
+                            unsigned face, unsigned level, unsigned zslice)
 {
    struct i915_texture *tex = (struct i915_texture *)pt;
+   struct pipe_winsys *ws = screen->winsys;
    struct pipe_surface *ps;
    unsigned offset;  /* in bytes */
 
@@ -569,11 +574,11 @@ i915_get_tex_surface(struct pipe_context *pipe,
       assert(zslice == 0);
    }
 
-   ps = pipe->winsys->surface_alloc(pipe->winsys);
+   ps = ws->surface_alloc(ws);
    if (ps) {
       assert(ps->refcount);
       assert(ps->winsys);
-      pipe_buffer_reference(pipe->winsys, &ps->buffer, tex->buffer);
+      pipe_buffer_reference(ws, &ps->buffer, tex->buffer);
       ps->format = pt->format;
       ps->cpp = pt->cpp;
       ps->width = pt->width[level];
@@ -585,12 +590,17 @@ i915_get_tex_surface(struct pipe_context *pipe,
 }
 
 
-
 void
 i915_init_texture_functions(struct i915_context *i915)
 {
-   i915->pipe.texture_create = i915_texture_create;
-   i915->pipe.texture_release = i915_texture_release;
    i915->pipe.texture_update = i915_texture_update;
-   i915->pipe.get_tex_surface = i915_get_tex_surface;
+}
+
+
+void
+i915_init_screen_texture_functions(struct pipe_screen *screen)
+{
+   screen->texture_create = i915_texture_create_screen;
+   screen->texture_release = i915_texture_release_screen;
+   screen->get_tex_surface = i915_get_tex_surface_screen;
 }
index 6d8d41178f728a7616210ecd1452089c32317c40..7225016a9f4837ebe8d4da7a722c7ec583b84e53 100644 (file)
 #ifndef I915_TEXTURE_H
 #define I915_TEXTURE_H
 
-struct pipe_context;
+struct i915_context;
+struct pipe_screen;
 
 
 extern void
 i915_init_texture_functions(struct i915_context *i915);
 
 
+extern void
+i915_init_screen_texture_functions(struct pipe_screen *screen);
+
+
 #endif /* I915_TEXTURE_H */
index fe49710852bf68a96b02b39bf0c4d819dcd9e54f..aea300328180aa5edafe11078989bb40926f78d3 100644 (file)
 #include "pipe/p_defines.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+   
 /* Pipe drivers are (meant to be!) independent of both GL and the
  * window system.  The window system provides a buffer manager and a
  * set of additional hooks for things like command buffer submission,
@@ -52,6 +57,7 @@
 
 struct pipe_buffer;
 struct pipe_winsys;
+struct pipe_screen;
 
 
 /**
@@ -107,9 +113,12 @@ struct i915_winsys {
 #define I915_BUFFER_USAGE_LIT_VERTEX  (PIPE_BUFFER_USAGE_CUSTOM << 0)
 
 
-struct pipe_context *i915_create( struct pipe_winsys *,
-                                 struct i915_winsys *,
-                                 unsigned pci_id );
+struct pipe_context *i915_create_context( struct pipe_screen *,
+                                          struct pipe_winsys *,
+                                          struct i915_winsys * );
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif 
index cc8580836cec86199f3b1d1f7aa424be6237cf47..e97146e57ca7c0d0c481610b86f06fe2e1347469 100644 (file)
@@ -6,7 +6,7 @@ LIBNAME = i965simple
 C_SOURCES = \
        brw_blit.c \
        brw_flush.c \
-       brw_strings.c \
+       brw_screen.c \
        brw_surface.c \
        brw_cc.c \
        brw_clip.c \
@@ -30,7 +30,6 @@ C_SOURCES = \
        brw_sf.c \
        brw_sf_emit.c \
        brw_sf_state.c \
-       brw_shader_info.c \
        brw_state.c \
        brw_state_batch.c \
        brw_state_cache.c \
index 74621de84c94cfe5aaf3f89cacbc4468fe477984..c0825c4de37f2231ee1e4d329b62ca82630dec74 100644 (file)
@@ -29,13 +29,11 @@ i965simple = env.ConvenienceLibrary(
                'brw_sf.c',
                'brw_sf_emit.c',
                'brw_sf_state.c',
-               'brw_shader_info.c',
                'brw_state.c',
                'brw_state_batch.c',
                'brw_state_cache.c',
                'brw_state_pool.c',
                'brw_state_upload.c',
-               'brw_strings.c',
                'brw_surface.c',
                'brw_tex_layout.c',
                'brw_urb.c',
index 6fb840708e5790fa9c7b5fc7d8b51e9e311496fa..7c908da67262fabbbb9a1aabf69159721c714123 100644 (file)
 #include "pipe/p_winsys.h"
 #include "pipe/p_context.h"
 #include "pipe/p_util.h"
+#include "pipe/p_screen.h"
 
-/***************************************
- * Mesa's Driver Functions
- ***************************************/
 
 #ifndef BRW_DEBUG
 int BRW_DEBUG = (0);
 #endif
 
+
 static void brw_destroy(struct pipe_context *pipe)
 {
    struct brw_context *brw = brw_context(pipe);
@@ -56,6 +55,7 @@ static void brw_destroy(struct pipe_context *pipe)
    FREE(brw);
 }
 
+
 static void brw_clear(struct pipe_context *pipe, struct pipe_surface *ps,
                       unsigned clearValue)
 {
@@ -71,163 +71,31 @@ static void brw_clear(struct pipe_context *pipe, struct pipe_surface *ps,
 }
 
 
-static int
-brw_get_param(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
-      return 8;
-   case PIPE_CAP_NPOT_TEXTURES:
-      return 1;
-   case PIPE_CAP_TWO_SIDED_STENCIL:
-      return 1;
-   case PIPE_CAP_GLSL:
-      return 0;
-   case PIPE_CAP_S3TC:
-      return 0;
-   case PIPE_CAP_ANISOTROPIC_FILTER:
-      return 0;
-   case PIPE_CAP_POINT_SPRITE:
-      return 0;
-   case PIPE_CAP_MAX_RENDER_TARGETS:
-      return 1;
-   case PIPE_CAP_OCCLUSION_QUERY:
-      return 0;
-   case PIPE_CAP_TEXTURE_SHADOW_MAP:
-      return 1;
-   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
-      return 11; /* max 1024x1024 */
-   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
-      return 8;  /* max 128x128x128 */
-   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return 11; /* max 1024x1024 */
-   default:
-      return 0;
-   }
-}
-
-
-static float
-brw_get_paramf(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_LINE_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_LINE_WIDTH_AA:
-      return 7.5;
-
-   case PIPE_CAP_MAX_POINT_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_POINT_WIDTH_AA:
-      return 255.0;
-
-   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
-      return 4.0;
-
-   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
-      return 16.0;
-
-   default:
-      return 0;
-   }
-}
-
-static boolean
-brw_is_format_supported( struct pipe_context *pipe,
-                          enum pipe_format format, uint type )
-{
-#if 0
-   /* XXX: This is broken -- rewrite if still needed. */
-   static const unsigned tex_supported[] = {
-      PIPE_FORMAT_U_R8_G8_B8_A8,
-      PIPE_FORMAT_U_A8_R8_G8_B8,
-      PIPE_FORMAT_U_R5_G6_B5,
-      PIPE_FORMAT_U_L8,
-      PIPE_FORMAT_U_A8,
-      PIPE_FORMAT_U_I8,
-      PIPE_FORMAT_U_L8_A8,
-      PIPE_FORMAT_YCBCR,
-      PIPE_FORMAT_YCBCR_REV,
-      PIPE_FORMAT_S8_Z24,
-   };
-
-
-   /* Actually a lot more than this - add later:
-    */
-   static const unsigned render_supported[] = {
-      PIPE_FORMAT_U_A8_R8_G8_B8,
-      PIPE_FORMAT_U_R5_G6_B5,
-   };
-
-   /*
-    */
-   static const unsigned z_stencil_supported[] = {
-      PIPE_FORMAT_U_Z16,
-      PIPE_FORMAT_U_Z32,
-      PIPE_FORMAT_S8_Z24,
-   };
-
-   switch (type) {
-   case PIPE_RENDER_FORMAT:
-      *numFormats = Elements(render_supported);
-      return render_supported;
-
-   case PIPE_TEX_FORMAT:
-      *numFormats = Elements(tex_supported);
-      return render_supported;
-
-   case PIPE_Z_STENCIL_FORMAT:
-      *numFormats = Elements(render_supported);
-      return render_supported;
-
-   default:
-      *numFormats = 0;
-      return NULL;
-   }
-#else
-   switch (format) {
-   case PIPE_FORMAT_A8R8G8B8_UNORM:
-   case PIPE_FORMAT_R5G6B5_UNORM:
-   case PIPE_FORMAT_S8Z24_UNORM:
-      return TRUE;
-   default:
-      return FALSE;
-   };
-   return FALSE;
-#endif
-}
-
-
-
-
-struct pipe_context *brw_create(struct pipe_winsys *pipe_winsys,
+struct pipe_context *brw_create(struct pipe_screen *screen,
                                 struct brw_winsys *brw_winsys,
                                 unsigned pci_id)
 {
    struct brw_context *brw;
 
-   pipe_winsys->printf(pipe_winsys,
-                       "%s: creating brw_context with pci id 0x%x\n",
-                       __FUNCTION__, pci_id);
+   screen->winsys->printf(screen->winsys,
+                          "%s: creating brw_context with pci id 0x%x\n",
+                          __FUNCTION__, pci_id);
 
    brw = CALLOC_STRUCT(brw_context);
    if (brw == NULL)
       return NULL;
 
    brw->winsys = brw_winsys;
-   brw->pipe.winsys = pipe_winsys;
+   brw->pipe.winsys = screen->winsys;
+   brw->pipe.screen = screen;
 
    brw->pipe.destroy = brw_destroy;
-   brw->pipe.is_format_supported = brw_is_format_supported;
-   brw->pipe.get_param = brw_get_param;
-   brw->pipe.get_paramf = brw_get_paramf;
    brw->pipe.clear = brw_clear;
 
    brw_init_surface_functions(brw);
    brw_init_texture_functions(brw);
    brw_init_state_functions(brw);
    brw_init_flush_functions(brw);
-   brw_init_string_functions(brw);
    brw_init_draw_functions( brw );
 
 
index 65664d853ddb0b3f97a02fecb82af26261bf3af4..4da3a8cffcf180dd0cf02ce465d6de63cda27e7d 100644 (file)
@@ -38,6 +38,8 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
 
+#include "tgsi/util/tgsi_scan.h"
+
 #include "brw_structs.h"
 #include "brw_winsys.h"
 
@@ -195,33 +197,22 @@ struct brw_state_flags {
 };
 
 
-struct brw_shader_info {
-   int nr_regs[8];             /* TGSI_FILE_* */
-};
-   
-
-
 struct brw_vertex_program {
    struct pipe_shader_state program;
-   struct brw_shader_info info;
+   struct tgsi_shader_info info;
    int id;
 };
 
 
-
 struct brw_fragment_program {
    struct pipe_shader_state program;
-   struct brw_shader_info info;
+   struct tgsi_shader_info info;
    
-   boolean UsesDepth;
-   boolean UsesKill;
-   boolean ComputesDepth;
+   boolean UsesDepth; /* XXX add this to tgsi_shader_info? */
    int id;
 };
 
 
-
-
 struct pipe_setup_linkage {
    struct {
       unsigned vp_output:5;
@@ -502,7 +493,7 @@ struct brw_context
       /* Arrays with buffer objects to copy non-bufferobj arrays into
        * for upload:
        */
-      struct pipe_vertex_buffer *vbo_array[PIPE_ATTRIB_MAX];
+      const struct pipe_vertex_buffer *vbo_array[PIPE_ATTRIB_MAX];
 
       struct brw_vertex_element_state inputs[PIPE_ATTRIB_MAX];
 
index aa85d93866a3ee17f5e0322a3b5aa0e9cd7a0263..9c0c78c2369a7aa8075186f215a4b409aaeefa4d 100644 (file)
@@ -256,7 +256,7 @@ boolean brw_upload_vertex_elements( struct brw_context *brw )
    struct brw_vertex_element_packet vep;
 
    unsigned i;
-   unsigned nr_enabled = brw->attribs.VertexProgram->program.num_inputs;
+   unsigned nr_enabled = brw->attribs.VertexProgram->info.num_inputs;
 
    memset(&vep, 0, sizeof(vep));
 
diff --git a/src/gallium/drivers/i965simple/brw_screen.c b/src/gallium/drivers/i965simple/brw_screen.c
new file mode 100644 (file)
index 0000000..5be369f
--- /dev/null
@@ -0,0 +1,235 @@
+/**************************************************************************
+ * 
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
+ **************************************************************************/
+
+
+#include "pipe/p_util.h"
+#include "pipe/p_winsys.h"
+
+#include "brw_context.h"
+#include "brw_screen.h"
+#include "brw_tex_layout.h"
+
+
+static const char *
+brw_get_vendor( struct pipe_screen *screen )
+{
+   return "Tungsten Graphics, Inc.";
+}
+
+
+static const char *
+brw_get_name( struct pipe_screen *screen )
+{
+   static char buffer[128];
+   const char *chipset;
+
+   switch (brw_screen(screen)->pci_id) {
+   case PCI_CHIP_I965_Q:
+      chipset = "Intel(R) 965Q";
+      break;
+   case PCI_CHIP_I965_G:
+   case PCI_CHIP_I965_G_1:
+      chipset = "Intel(R) 965G";
+      break;
+   case PCI_CHIP_I965_GM:
+      chipset = "Intel(R) 965GM";
+      break;
+   case PCI_CHIP_I965_GME:
+      chipset = "Intel(R) 965GME/GLE";
+      break;
+   default:
+      chipset = "unknown";
+      break;
+   }
+
+   sprintf(buffer, "i965 (chipset: %s)", chipset);
+   return buffer;
+}
+
+
+static int
+brw_get_param(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
+      return 8;
+   case PIPE_CAP_NPOT_TEXTURES:
+      return 1;
+   case PIPE_CAP_TWO_SIDED_STENCIL:
+      return 1;
+   case PIPE_CAP_GLSL:
+      return 0;
+   case PIPE_CAP_S3TC:
+      return 0;
+   case PIPE_CAP_ANISOTROPIC_FILTER:
+      return 0;
+   case PIPE_CAP_POINT_SPRITE:
+      return 0;
+   case PIPE_CAP_MAX_RENDER_TARGETS:
+      return 1;
+   case PIPE_CAP_OCCLUSION_QUERY:
+      return 0;
+   case PIPE_CAP_TEXTURE_SHADOW_MAP:
+      return 1;
+   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+      return 11; /* max 1024x1024 */
+   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
+      return 8;  /* max 128x128x128 */
+   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
+      return 11; /* max 1024x1024 */
+   default:
+      return 0;
+   }
+}
+
+
+static float
+brw_get_paramf(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_LINE_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_LINE_WIDTH_AA:
+      return 7.5;
+
+   case PIPE_CAP_MAX_POINT_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_POINT_WIDTH_AA:
+      return 255.0;
+
+   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
+      return 4.0;
+
+   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
+      return 16.0;
+
+   default:
+      return 0;
+   }
+}
+
+
+static boolean
+brw_is_format_supported( struct pipe_screen *screen,
+                         enum pipe_format format, uint type )
+{
+#if 0
+   /* XXX: This is broken -- rewrite if still needed. */
+   static const unsigned tex_supported[] = {
+      PIPE_FORMAT_U_R8_G8_B8_A8,
+      PIPE_FORMAT_U_A8_R8_G8_B8,
+      PIPE_FORMAT_U_R5_G6_B5,
+      PIPE_FORMAT_U_L8,
+      PIPE_FORMAT_U_A8,
+      PIPE_FORMAT_U_I8,
+      PIPE_FORMAT_U_L8_A8,
+      PIPE_FORMAT_YCBCR,
+      PIPE_FORMAT_YCBCR_REV,
+      PIPE_FORMAT_S8_Z24,
+   };
+
+
+   /* Actually a lot more than this - add later:
+    */
+   static const unsigned render_supported[] = {
+      PIPE_FORMAT_U_A8_R8_G8_B8,
+      PIPE_FORMAT_U_R5_G6_B5,
+   };
+
+   /*
+    */
+   static const unsigned z_stencil_supported[] = {
+      PIPE_FORMAT_U_Z16,
+      PIPE_FORMAT_U_Z32,
+      PIPE_FORMAT_S8_Z24,
+   };
+
+   switch (type) {
+   case PIPE_RENDER_FORMAT:
+      *numFormats = Elements(render_supported);
+      return render_supported;
+
+   case PIPE_TEX_FORMAT:
+      *numFormats = Elements(tex_supported);
+      return render_supported;
+
+   case PIPE_Z_STENCIL_FORMAT:
+      *numFormats = Elements(render_supported);
+      return render_supported;
+
+   default:
+      *numFormats = 0;
+      return NULL;
+   }
+#else
+   switch (format) {
+   case PIPE_FORMAT_A8R8G8B8_UNORM:
+   case PIPE_FORMAT_R5G6B5_UNORM:
+   case PIPE_FORMAT_S8Z24_UNORM:
+      return TRUE;
+   default:
+      return FALSE;
+   };
+   return FALSE;
+#endif
+}
+
+
+static void
+brw_destroy_screen( struct pipe_screen *screen )
+{
+   FREE(screen);
+}
+
+
+/**
+ * Create a new brw_screen object
+ */
+struct pipe_screen *
+brw_create_screen(struct pipe_winsys *winsys, uint pci_id)
+{
+   struct brw_screen *brwscreen = CALLOC_STRUCT(brw_screen);
+
+   if (!brwscreen)
+      return NULL;
+
+   brwscreen->pci_id = pci_id;
+
+   brwscreen->screen.winsys = winsys;
+
+   brwscreen->screen.destroy = brw_destroy_screen;
+
+   brwscreen->screen.get_name = brw_get_name;
+   brwscreen->screen.get_vendor = brw_get_vendor;
+   brwscreen->screen.get_param = brw_get_param;
+   brwscreen->screen.get_paramf = brw_get_paramf;
+   brwscreen->screen.is_format_supported = brw_is_format_supported;
+
+   brw_init_screen_texture_funcs(&brwscreen->screen);
+
+   return &brwscreen->screen;
+}
diff --git a/src/gallium/drivers/i965simple/brw_screen.h b/src/gallium/drivers/i965simple/brw_screen.h
new file mode 100644 (file)
index 0000000..d3c7038
--- /dev/null
@@ -0,0 +1,68 @@
+/**************************************************************************
+ * 
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ **************************************************************************/
+
+
+#ifndef BRW_SCREEN_H
+#define BRW_SCREEN_H
+
+
+#include "pipe/p_screen.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Subclass of pipe_screen
+ */
+struct brw_screen
+{
+   struct pipe_screen screen;
+
+   uint pci_id;
+};
+
+
+/** cast wrapper */
+static INLINE struct brw_screen *
+brw_screen(struct pipe_screen *pscreen)
+{
+   return (struct brw_screen *) pscreen;
+}
+
+
+extern struct pipe_screen *
+brw_create_screen(struct pipe_winsys *winsys, uint pci_id);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BRW_SCREEN_H */
index 7c83b81c858f2fb619967048d1ef86adcdcbbd95..c3b815a82be2be6eb35792f5bf43915fbcf4aa7b 100644 (file)
@@ -133,7 +133,7 @@ static void upload_sf_prog( struct brw_context *brw )
    key.vp_output_count = brw->vs.prog_data->outputs_written;
 
    /* BRW_NEW_FS */
-   key.fp_input_count = brw->attribs.FragmentProgram->info.nr_regs[TGSI_FILE_INPUT];
+   key.fp_input_count = brw->attribs.FragmentProgram->info.file_max[TGSI_FILE_INPUT] + 1;
 
 
    /* BRW_NEW_REDUCED_PRIMITIVE */
index a762a870fe94548aec584b265b0071126fed6575..f4694a4433b212cfb91b39c3ac338d8988c02cc7 100644 (file)
@@ -6,8 +6,9 @@
 #include "tgsi/util/tgsi_parse.h"
 
 
-
-
+/**
+ * XXX this obsolete new and no longer compiled.
+ */
 void brw_shader_info(const struct tgsi_token *tokens,
                     struct brw_shader_info *info )
 {
index 2fc048bde00ea796743845d501db6c7ce579822d..6744a8aa4f7620962e338c20ecba4c61ea5d1c41 100644 (file)
@@ -175,8 +175,12 @@ static void * brw_create_fs_state(struct pipe_context *pipe,
    brw_fp->program = *shader;
    brw_fp->id = brw_context(pipe)->program_id++;
 
+   tgsi_scan_shader(shader->tokens, &brw_fp->info);
+
+#if 0
    brw_shader_info(shader->tokens,
-                  &brw_fp->info);
+                  &brw_fp->info2);
+#endif
 
    tgsi_dump(shader->tokens, 0);
 
@@ -211,9 +215,13 @@ static void *brw_create_vs_state(struct pipe_context *pipe,
     */
    brw_vp->program = *shader;
    brw_vp->id = brw_context(pipe)->program_id++;
-   brw_shader_info(shader->tokens,
-                  &brw_vp->info);
 
+   tgsi_scan_shader(shader->tokens, &brw_vp->info);
+
+#if 0
+   brw_shader_info(shader->tokens,
+                  &brw_vp->info2);
+#endif
    tgsi_dump(shader->tokens, 0);
 
    return (void *)brw_vp;
@@ -328,8 +336,7 @@ static void brw_set_sampler_texture(struct pipe_context *pipe,
 {
    struct brw_context *brw = brw_context(pipe);
 
-   pipe_texture_reference(pipe,
-                          (struct pipe_texture **) &brw->attribs.Texture[unit],
+   pipe_texture_reference((struct pipe_texture **) &brw->attribs.Texture[unit],
                           texture);
 
    brw->state.dirty.brw |= BRW_NEW_TEXTURE;
index 258e9a556e2db74eb6fcb7aa212721b3746dd3f7..de0a6371b84e029e40b243e4e8724d695d9d3aef 100644 (file)
@@ -148,11 +148,4 @@ void brw_invalidate_pools( struct brw_context *brw );
 void brw_clear_batch_cache_flush( struct brw_context *brw );
 
 
-/* brw_shader_info.c
- */
-
-void brw_shader_info(const struct tgsi_token *tokens,
-                    struct brw_shader_info *info );
-
-
 #endif
diff --git a/src/gallium/drivers/i965simple/brw_strings.c b/src/gallium/drivers/i965simple/brw_strings.c
deleted file mode 100644 (file)
index 3d9c509..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/**************************************************************************
- * 
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * 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, sub license, 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 (including the
- * next paragraph) 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 NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
- * 
- **************************************************************************/
-
-#include "brw_context.h"
-#include "brw_reg.h"
-
-
-static const char *brw_get_vendor( struct pipe_context *pipe )
-{
-   return "Tungsten Graphics, Inc.";
-}
-
-
-static const char *brw_get_name( struct pipe_context *pipe )
-{
-   static char buffer[128];
-   const char *chipset;
-
-   switch (brw_context(pipe)->pci_id) {
-   case PCI_CHIP_I965_Q:
-      chipset = "Intel(R) 965Q";
-      break;
-   case PCI_CHIP_I965_G:
-   case PCI_CHIP_I965_G_1:
-      chipset = "Intel(R) 965G";
-      break;
-   case PCI_CHIP_I965_GM:
-      chipset = "Intel(R) 965GM";
-      break;
-   case PCI_CHIP_I965_GME:
-      chipset = "Intel(R) 965GME/GLE";
-      break;
-   default:
-      chipset = "unknown";
-      break;
-   }
-
-   sprintf(buffer, "i965 (chipset: %s)", chipset);
-   return buffer;
-}
-
-
-void
-brw_init_string_functions(struct brw_context *brw)
-{
-   brw->pipe.get_name = brw_get_name;
-   brw->pipe.get_vendor = brw_get_vendor;
-}
index dc4846d39fc5287a84dca5607182cfc0aea83104..c99a91dcf76478f61ddf83af81f40a2309edbe56 100644 (file)
@@ -164,6 +164,7 @@ brw_surface_fill(struct pipe_context *pipe,
 void
 brw_init_surface_functions(struct brw_context *brw)
 {
+   (void) brw_surface_data; /* silence warning */
    brw->pipe.surface_copy  = brw_surface_copy;
    brw->pipe.surface_fill  = brw_surface_fill;
 }
index 86ce3d0cc38da6cd5f842e183eecc26c99da8440..b24ac87c378e26643b71ea14d01ecf945a255e88 100644 (file)
@@ -71,8 +71,6 @@ static unsigned minify( unsigned d )
 }
 
 
-static boolean brw_miptree_layout(struct pipe_context *, struct brw_texture *);
-
 static void intel_miptree_set_image_offset(struct brw_texture *tex,
                                            unsigned level,
                                            unsigned img,
@@ -199,7 +197,7 @@ static void i945_miptree_layout_2d(struct brw_texture *tex)
    }
 }
 
-static boolean brw_miptree_layout(struct pipe_context *pipe, struct brw_texture *tex)
+static boolean brw_miptree_layout(struct brw_texture *tex)
 {
    struct pipe_texture *pt = &tex->base;
    /* XXX: these vary depending on image format:
@@ -301,20 +299,21 @@ static boolean brw_miptree_layout(struct pipe_context *pipe, struct brw_texture
 
 
 static struct pipe_texture *
-brw_texture_create(struct pipe_context *pipe,
-                   const struct pipe_texture *templat)
+brw_texture_create_screen(struct pipe_screen *screen,
+                          const struct pipe_texture *templat)
 {
+   struct pipe_winsys *ws = screen->winsys;
    struct brw_texture *tex = CALLOC_STRUCT(brw_texture);
 
    if (tex) {
       tex->base = *templat;
       tex->base.refcount = 1;
 
-      if (brw_miptree_layout(pipe, tex))
-        tex->buffer = pipe->winsys->buffer_create(pipe->winsys, 64,
-                                                   PIPE_BUFFER_USAGE_PIXEL,
-                                                   tex->pitch * tex->base.cpp *
-                                                   tex->total_height);
+      if (brw_miptree_layout(tex))
+        tex->buffer = ws->buffer_create(ws, 64,
+                                         PIPE_BUFFER_USAGE_PIXEL,
+                                         tex->pitch * tex->base.cpp *
+                                         tex->total_height);
 
       if (!tex->buffer) {
         FREE(tex);
@@ -327,7 +326,8 @@ brw_texture_create(struct pipe_context *pipe,
 
 
 static void
-brw_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
+brw_texture_release_screen(struct pipe_screen *screen,
+                           struct pipe_texture **pt)
 {
    if (!*pt)
       return;
@@ -337,6 +337,7 @@ brw_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
        __FUNCTION__, (void *) *pt, (*pt)->refcount - 1);
    */
    if (--(*pt)->refcount <= 0) {
+      struct pipe_winsys *ws = screen->winsys;
       struct brw_texture *tex = (struct brw_texture *)*pt;
       uint i;
 
@@ -344,7 +345,7 @@ brw_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
       DBG("%s deleting %p\n", __FUNCTION__, (void *) tex);
       */
 
-      pipe_buffer_reference(pipe->winsys, &tex->buffer, NULL);
+      pipe_buffer_reference(ws, &tex->buffer, NULL);
 
       for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++)
          if (tex->image_offset[i])
@@ -363,14 +364,12 @@ brw_texture_update(struct pipe_context *pipe, struct pipe_texture *texture)
 }
 
 
-/*
- * XXX note: same as code in sp_surface.c
- */
 static struct pipe_surface *
-brw_get_tex_surface(struct pipe_context *pipe,
-                     struct pipe_texture *pt,
-                     unsigned face, unsigned level, unsigned zslice)
+brw_get_tex_surface_screen(struct pipe_screen *screen,
+                           struct pipe_texture *pt,
+                           unsigned face, unsigned level, unsigned zslice)
 {
+   struct pipe_winsys *ws = screen->winsys;
    struct brw_texture *tex = (struct brw_texture *)pt;
    struct pipe_surface *ps;
    unsigned offset;  /* in bytes */
@@ -388,11 +387,11 @@ brw_get_tex_surface(struct pipe_context *pipe,
       assert(zslice == 0);
    }
 
-   ps = pipe->winsys->surface_alloc(pipe->winsys);
+   ps = ws->surface_alloc(ws);
    if (ps) {
       assert(ps->format);
       assert(ps->refcount);
-      pipe_buffer_reference(pipe->winsys, &ps->buffer, tex->buffer);
+      pipe_buffer_reference(ws, &ps->buffer, tex->buffer);
       ps->format = pt->format;
       ps->cpp = pt->cpp;
       ps->width = pt->width[level];
@@ -407,8 +406,15 @@ brw_get_tex_surface(struct pipe_context *pipe,
 void
 brw_init_texture_functions(struct brw_context *brw)
 {
-   brw->pipe.texture_create  = brw_texture_create;
-   brw->pipe.texture_release = brw_texture_release;
    brw->pipe.texture_update = brw_texture_update;
-   brw->pipe.get_tex_surface = brw_get_tex_surface;
 }
+
+
+void
+brw_init_screen_texture_funcs(struct pipe_screen *screen)
+{
+   screen->texture_create  = brw_texture_create_screen;
+   screen->texture_release = brw_texture_release_screen;
+   screen->get_tex_surface = brw_get_tex_surface_screen;
+}
+
index ed49baeef8027ce5aeac971d024fd070664b9c6e..a6b6ba81460ab1e7a82b8877f5201899f32907c5 100644 (file)
@@ -1,12 +1,44 @@
+/*
+ Copyright (C) Intel Corp.  2006.  All Rights Reserved.
+ Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
+ develop this 3D driver.
+
+ 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 (including the
+ next paragraph) 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 THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ **********************************************************************/
+
+
 #ifndef BRW_TEX_LAYOUT_H
 #define BRW_TEX_LAYOUT_H
 
 
 struct brw_context;
+struct pipe_screen;
 
 
 extern void
 brw_init_texture_functions(struct brw_context *brw);
 
+extern void
+brw_init_screen_texture_funcs(struct pipe_screen *screen);
+
 
 #endif
index 738c6346d5e13e6960047acb08d0dc42c72362e5..92327e896db8312cf9b0242e8309718eb4d4ac46 100644 (file)
@@ -50,8 +50,8 @@ static void do_vs_prog( struct brw_context *brw,
    brw_init_compile(&c.func);
    c.vp = vp;
 
-   c.prog_data.outputs_written = vp->program.num_outputs;
-   c.prog_data.inputs_read = vp->program.num_inputs;
+   c.prog_data.outputs_written = vp->info.num_outputs;
+   c.prog_data.inputs_read = vp->info.num_inputs;
 
 #if 0
    if (c.key.copy_edgeflag) {
index 0e58f043b026441f98c8e6ede46e5a130ca6c6a1..070f9dfcaef2b50cfe44d1d3c8a0acbf1fe60041 100644 (file)
@@ -52,7 +52,7 @@ struct brw_vs_compile {
    struct brw_vs_prog_key key;
    struct brw_vs_prog_data prog_data;
 
-   struct brw_vertex_program *vp;
+   const struct brw_vertex_program *vp;
 
    unsigned nr_inputs;
 
index 05df4860edab32492534b6c9cd3847ee57f80e90..9020fcc001244aab40871c86886762d086546f34 100644 (file)
@@ -86,7 +86,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c,
 
    /* Allocate input regs:
     */
-   c->nr_inputs = c->vp->program.num_inputs;
+   c->nr_inputs = c->vp->info.num_inputs;
    for (i = 0; i < c->nr_inputs; i++) {
         c->regs[TGSI_FILE_INPUT][i] = brw_vec8_grf(reg, 0);
         reg++;
@@ -99,7 +99,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c,
    c->nr_outputs = 0;
    c->first_output = reg;
    mrf = 4;
-   for (i = 0; i < c->vp->program.num_outputs; i++) {
+   for (i = 0; i < c->vp->info.num_outputs; i++) {
       c->nr_outputs++;
 #if 0
       if (i == VERT_RESULT_HPOS) {
@@ -1051,7 +1051,7 @@ static void process_instruction(struct brw_vs_compile *c,
 {
    struct brw_reg args[3], dst;
    struct brw_compile *p = &c->func;
-   struct brw_indirect stack_index = brw_indirect(0, 0);
+   /*struct brw_indirect stack_index = brw_indirect(0, 0);*/
    unsigned i;
    unsigned index;
    unsigned file;
index 3523a58614f2df0625bba7e61701df55d1259878..b67bd737502940e0041b9601b9b990832d71cf21 100644 (file)
@@ -53,6 +53,8 @@
 struct pipe_buffer;
 struct pipe_fence_handle;
 struct pipe_winsys;
+struct pipe_screen;
+
 
 /* The pipe driver currently understands the following chipsets:
  */
@@ -181,7 +183,7 @@ struct brw_winsys {
 #define BRW_BUFFER_USAGE_LIT_VERTEX  (PIPE_BUFFER_USAGE_CUSTOM << 0)
 
 
-struct pipe_context *brw_create(struct pipe_winsys *,
+struct pipe_context *brw_create(struct pipe_screen *,
                                 struct brw_winsys *,
                                 unsigned pci_id);
 
index 539b17074441e1507d07af1cccdfb8c3e17788f8..1c4b5b5ede2b4bc26048ad2a22db41eae687a477 100644 (file)
@@ -94,11 +94,11 @@ static void brw_wm_populate_key( struct brw_context *brw,
    /* Build the index for table lookup
     */
    /* BRW_NEW_DEPTH_STENCIL */
-   if (fp->UsesKill ||
+   if (fp->info.uses_kill ||
        brw->attribs.DepthStencil->alpha.enabled)
       lookup |= IZ_PS_KILL_ALPHATEST_BIT;
 
-   if (fp->ComputesDepth)
+   if (fp->info.writes_z)
       lookup |= IZ_PS_COMPUTES_DEPTH_BIT;
 
    if (brw->attribs.DepthStencil->depth.enabled)
index 97418a52e7f41ec8ade43798c7d78da64f1dd5e4..74ccfd494a4abc9d10a755b3585fda96494de62f 100644 (file)
@@ -259,9 +259,12 @@ static void prealloc_reg(struct brw_wm_compile *c)
    /* Then a copy of our part of the CURBE entry:
     */
    {
-      int nr_constants = c->fp->info.nr_regs[TGSI_FILE_CONSTANT];
+      int nr_constants = c->fp->info.file_max[TGSI_FILE_CONSTANT] + 1;
       int index = 0;
 
+      /* XXX number of constants, or highest numbered constant? */
+      assert(nr_constants == c->fp->info.file_count[TGSI_FILE_CONSTANT]);
+
       c->prog_data.max_const = 4*nr_constants;
       for (i = 0; i < nr_constants; i++) {
         for (j = 0; j < 4; j++, index++) 
@@ -282,13 +285,14 @@ static void prealloc_reg(struct brw_wm_compile *c)
    /* Next we receive the plane coefficients for parameter
     * interpolation:
     */
-   for (i = 0; i < c->fp->info.nr_regs[TGSI_FILE_INPUT]; i++) {
+   assert(c->fp->info.file_max[TGSI_FILE_INPUT] == c->fp->info.num_inputs);
+   for (i = 0; i < c->fp->info.file_max[TGSI_FILE_INPUT] + 1; i++) {
       c->payload_coef[i] = brw_vec8_grf(c->reg_index, 0);
       c->reg_index += 2;
    }
 
    c->prog_data.first_curbe_grf = c->key.nr_depth_regs * 2;
-   c->prog_data.urb_read_length = (c->fp->program.num_inputs + 1) * 2;
+   c->prog_data.urb_read_length = (c->fp->info.num_inputs + 1) * 2;
    c->prog_data.curb_read_length = nr_curbe_regs;
 
    /* That's the end of the payload, now we can start allocating registers.
@@ -302,11 +306,17 @@ static void prealloc_reg(struct brw_wm_compile *c)
    /* Now allocate room for the interpolated inputs and staging
     * registers for the outputs:
     */
-   for (i = 0; i < c->fp->info.nr_regs[TGSI_FILE_INPUT]; i++) 
+   /* XXX do we want to loop over the _number_ of inputs/outputs or loop
+    * to the highest input/output index that's used?
+    *  Probably the same, actually.
+    */
+   assert(c->fp->info.file_max[TGSI_FILE_INPUT] + 1 == c->fp->info.num_inputs);
+   assert(c->fp->info.file_max[TGSI_FILE_OUTPUT] + 1 == c->fp->info.num_outputs);
+   for (i = 0; i < c->fp->info.file_max[TGSI_FILE_INPUT] + 1; i++) 
       for (j = 0; j < 4; j++)
         c->wm_regs[TGSI_FILE_INPUT][i][j] = brw_vec8_grf( c->reg_index++, 0 );
 
-   for (i = 0; i < c->fp->info.nr_regs[TGSI_FILE_OUTPUT]; i++) 
+   for (i = 0; i < c->fp->info.file_max[TGSI_FILE_OUTPUT] + 1; i++) 
       for (j = 0; j < 4; j++)
         c->wm_regs[TGSI_FILE_OUTPUT][i][j] = brw_vec8_grf( c->reg_index++, 0 );
 
index 5ccd4888423d3734f9512690cc921947dff4d716..f3aa36b07f8b1969c70f3ec5821c220b3a320193 100644 (file)
@@ -117,11 +117,11 @@ static void upload_wm_unit(struct brw_context *brw )
       if (fp->UsesDepth)
         wm.wm5.program_uses_depth = 1; /* as far as we can tell */
 
-      if (fp->ComputesDepth)
+      if (fp->info.writes_z)
         wm.wm5.program_computes_depth = 1;
 
       /* BRW_NEW_ALPHA_TEST */
-      if (fp->UsesKill ||
+      if (fp->info.uses_kill ||
          brw->attribs.DepthStencil->alpha.enabled)
         wm.wm5.program_uses_killpixel = 1;
 
index 539ffb77f55ec5ef18c71dbf48b7414774668435..f32db35d587f2f6a9379ad97c3e96fb1bdc654d8 100644 (file)
@@ -27,6 +27,7 @@ C_SOURCES = \
        sp_quad_output.c \
        sp_quad_stencil.c \
        sp_quad_stipple.c \
+       sp_screen.c \
        sp_state_blend.c \
        sp_state_clip.c \
        sp_state_derived.c \
index 2cdf3c75bf37519ef53bb0466707d059836697e7..fa16ed94e8d74d34dbe9e880f037089a8369d3a6 100644 (file)
 
 
 
-/**
- * Query format support for creating a texture, drawing surface, etc.
- * \param format  the format to test
- * \param type  one of PIPE_TEXTURE, PIPE_SURFACE
- */
-static boolean
-softpipe_is_format_supported( struct pipe_context *pipe,
-                              enum pipe_format format, uint type )
-{
-   switch (type) {
-   case PIPE_TEXTURE:
-      /* softpipe supports all texture formats */
-      return TRUE;
-   case PIPE_SURFACE:
-      /* softpipe supports all (off-screen) surface formats */
-      return TRUE;
-   default:
-      assert(0);
-      return FALSE;
-   }
-}
-
-
 /**
  * Map any drawing surfaces which aren't already mapped
  */
@@ -143,76 +120,10 @@ static void softpipe_destroy( struct pipe_context *pipe )
 }
 
 
-static const char *softpipe_get_name( struct pipe_context *pipe )
-{
-   return "softpipe";
-}
-
-static const char *softpipe_get_vendor( struct pipe_context *pipe )
-{
-   return "Tungsten Graphics, Inc.";
-}
-
-static int softpipe_get_param(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
-      return 8;
-   case PIPE_CAP_NPOT_TEXTURES:
-      return 1;
-   case PIPE_CAP_TWO_SIDED_STENCIL:
-      return 1;
-   case PIPE_CAP_GLSL:
-      return 1;
-   case PIPE_CAP_S3TC:
-      return 0;
-   case PIPE_CAP_ANISOTROPIC_FILTER:
-      return 0;
-   case PIPE_CAP_POINT_SPRITE:
-      return 1;
-   case PIPE_CAP_MAX_RENDER_TARGETS:
-      return 1;
-   case PIPE_CAP_OCCLUSION_QUERY:
-      return 1;
-   case PIPE_CAP_TEXTURE_SHADOW_MAP:
-      return 1;
-   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
-      return 12; /* max 2Kx2K */
-   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
-      return 8;  /* max 128x128x128 */
-   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return 12; /* max 2Kx2K */
-   default:
-      return 0;
-   }
-}
-
-static float softpipe_get_paramf(struct pipe_context *pipe, int param)
-{
-   switch (param) {
-   case PIPE_CAP_MAX_LINE_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_LINE_WIDTH_AA:
-      return 255.0; /* arbitrary */
-
-   case PIPE_CAP_MAX_POINT_WIDTH:
-      /* fall-through */
-   case PIPE_CAP_MAX_POINT_WIDTH_AA:
-      return 255.0; /* arbitrary */
-
-   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
-      return 0.0;
-
-   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
-      return 16.0; /* arbitrary */
-
-   default:
-      return 0;
-   }
-}
-
-struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
-                                     struct softpipe_winsys *softpipe_winsys )
+struct pipe_context *
+softpipe_create( struct pipe_screen *screen,
+                 struct pipe_winsys *pipe_winsys,
+                 struct softpipe_winsys *softpipe_winsys )
 {
    struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context);
    uint i;
@@ -226,15 +137,9 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
    softpipe->dump_fs = GETENV( "GALLIUM_DUMP_FS" ) != NULL;
 
    softpipe->pipe.winsys = pipe_winsys;
+   softpipe->pipe.screen = screen;
    softpipe->pipe.destroy = softpipe_destroy;
 
-   /* queries */
-   softpipe->pipe.is_format_supported = softpipe_is_format_supported;
-   softpipe->pipe.get_name = softpipe_get_name;
-   softpipe->pipe.get_vendor = softpipe_get_vendor;
-   softpipe->pipe.get_param = softpipe_get_param;
-   softpipe->pipe.get_paramf = softpipe_get_paramf;
-
    /* state setters */
    softpipe->pipe.create_blend_state = softpipe_create_blend_state;
    softpipe->pipe.bind_blend_state   = softpipe_bind_blend_state;
@@ -279,12 +184,7 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
    softpipe->pipe.flush = softpipe_flush;
 
    softpipe_init_query_funcs( softpipe );
-
-   /* textures */
-   softpipe->pipe.texture_create = softpipe_texture_create;
-   softpipe->pipe.texture_release = softpipe_texture_release;
-   softpipe->pipe.texture_update = softpipe_texture_update;
-   softpipe->pipe.get_tex_surface = softpipe_get_tex_surface;
+   softpipe_init_texture_funcs( softpipe );
 
    /*
     * Alloc caches for accessing drawing surfaces and textures.
@@ -337,9 +237,6 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
    draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe);
 #endif
 
-   /* sp_prim_setup can do wide points (don't convert to quads) */
-   draw_convert_wide_points(softpipe->draw, FALSE);
-
    sp_init_surface_functions(softpipe);
 
    return &softpipe->pipe;
index 34b2b7d4e243db53c519a322eee84d5e6033495e..07d058155f22939363a02a532ec65eb5a5002d3f 100644 (file)
@@ -96,7 +96,7 @@ shade_quad_llvm(struct quad_stage *qs,
    if (qss->colorOutSlot >= 0) {
       unsigned i;
       /* XXX need to handle multiple color outputs someday */
-      allvmrt(qss->stage.softpipe->fs->shader.output_semantic_name[qss->colorOutSlot]
+      allvmrt(qss->stage.softpipe->fs->info.output_semantic_name[qss->colorOutSlot]
              == TGSI_SEMANTIC_COLOR);
       for (i = 0; i < QUAD_SIZE; ++i) {
          quad->outputs.color[0][i] = dests[i][qss->colorOutSlot][0];
index b6a3fddb29c9acc1fd42ec02f9c6c03e91dbb9d2..2feee5c485e51a698d827ce3e949a456b4a34eb3 100644 (file)
@@ -514,7 +514,7 @@ setup_fragcoord_coeff(struct setup_stage *setup, uint slot)
 static void setup_tri_coefficients( struct setup_stage *setup )
 {
    struct softpipe_context *softpipe = setup->softpipe;
-   const struct pipe_shader_state *fs = &softpipe->fs->shader;
+   const struct sp_fragment_shader *spfs = softpipe->fs;
    const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe);
    uint fragSlot;
 
@@ -525,7 +525,7 @@ static void setup_tri_coefficients( struct setup_stage *setup )
 
    /* setup interpolation for all the remaining attributes:
     */
-   for (fragSlot = 0; fragSlot < fs->num_inputs; fragSlot++) {
+   for (fragSlot = 0; fragSlot < spfs->info.num_inputs; fragSlot++) {
       const uint vertSlot = vinfo->src_index[fragSlot];
       uint j;
 
@@ -549,7 +549,7 @@ static void setup_tri_coefficients( struct setup_stage *setup )
          assert(0);
       }
 
-      if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
+      if (spfs->info.input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
          /* FOG.y = front/back facing  XXX fix this */
          setup->coef[fragSlot].a0[1] = 1.0f - setup->quad.facing;
          setup->coef[fragSlot].dadx[1] = 0.0;
@@ -757,7 +757,7 @@ static INLINE void
 setup_line_coefficients(struct setup_stage *setup, struct prim_header *prim)
 {
    struct softpipe_context *softpipe = setup->softpipe;
-   const struct pipe_shader_state *fs = &setup->softpipe->fs->shader;
+   const struct sp_fragment_shader *spfs = softpipe->fs;
    const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe);
    uint fragSlot;
 
@@ -779,7 +779,7 @@ setup_line_coefficients(struct setup_stage *setup, struct prim_header *prim)
 
    /* setup interpolation for all the remaining attributes:
     */
-   for (fragSlot = 0; fragSlot < fs->num_inputs; fragSlot++) {
+   for (fragSlot = 0; fragSlot < spfs->info.num_inputs; fragSlot++) {
       const uint vertSlot = vinfo->src_index[fragSlot];
       uint j;
 
@@ -803,7 +803,7 @@ setup_line_coefficients(struct setup_stage *setup, struct prim_header *prim)
          assert(0);
       }
 
-      if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
+      if (spfs->info.input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
          /* FOG.y = front/back facing  XXX fix this */
          setup->coef[fragSlot].a0[1] = 1.0f - setup->quad.facing;
          setup->coef[fragSlot].dadx[1] = 0.0;
@@ -967,7 +967,7 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
 {
    struct setup_stage *setup = setup_stage( stage );
    struct softpipe_context *softpipe = setup->softpipe;
-   const struct pipe_shader_state *fs = &softpipe->fs->shader;
+   const struct sp_fragment_shader *spfs = softpipe->fs;
    const struct vertex_header *v0 = prim->v[0];
    const int sizeAttr = setup->softpipe->psize_slot;
    const float size
@@ -1002,7 +1002,7 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
    const_coeff(setup, &setup->posCoef, 0, 2);
    const_coeff(setup, &setup->posCoef, 0, 3);
 
-   for (fragSlot = 0; fragSlot < fs->num_inputs; fragSlot++) {
+   for (fragSlot = 0; fragSlot < spfs->info.num_inputs; fragSlot++) {
       const uint vertSlot = vinfo->src_index[fragSlot];
       uint j;
 
@@ -1025,7 +1025,7 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
          assert(0);
       }
 
-      if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
+      if (spfs->info.input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
          /* FOG.y = front/back facing  XXX fix this */
          setup->coef[fragSlot].a0[1] = 1.0f - setup->quad.facing;
          setup->coef[fragSlot].dadx[1] = 0.0;
@@ -1163,13 +1163,13 @@ static void setup_begin( struct draw_stage *stage )
 {
    struct setup_stage *setup = setup_stage(stage);
    struct softpipe_context *sp = setup->softpipe;
-   const struct pipe_shader_state *fs = &setup->softpipe->fs->shader;
+   const struct sp_fragment_shader *fs = setup->softpipe->fs;
 
    if (sp->dirty) {
       softpipe_update_derived(sp);
    }
 
-   setup->quad.nr_attrs = fs->num_inputs;
+   setup->quad.nr_attrs = fs->info.num_inputs;
 
    sp->quad.first->begin(sp->quad.first);
 
index 142dbcc77106c97cffed3772287ff892362aeaaa..8603c1a3677d984a89d4a290623f609b2f9eb966 100644 (file)
@@ -60,8 +60,8 @@ sp_build_quad_pipeline(struct softpipe_context *sp)
                sp->depth_stencil->depth.enabled &&
                sp->framebuffer.zsbuf &&
                !sp->depth_stencil->alpha.enabled &&
-               !sp->fs->uses_kill &&
-               !sp->fs->writes_z;
+               !sp->fs->info.uses_kill &&
+               !sp->fs->info.writes_z;
 
    /* build up the pipeline in reverse order... */
 
index 2f40e09d5c202d82e90fec6dc6295c240370a892..1fbb2e38c4ecd10316e54cae39835962e2857842 100644 (file)
@@ -91,7 +91,7 @@ shade_quad(
    /* store result color */
    if (qss->colorOutSlot >= 0) {
       /* XXX need to handle multiple color outputs someday */
-      assert(qss->stage.softpipe->fs->shader.output_semantic_name[qss->colorOutSlot]
+      assert(qss->stage.softpipe->fs->info.output_semantic_name[qss->colorOutSlot]
              == TGSI_SEMANTIC_COLOR);
       memcpy(
              quad->outputs.color,
@@ -148,8 +148,8 @@ static void shade_begin(struct quad_stage *qs)
    /* find output slots for depth, color */
    qss->colorOutSlot = -1;
    qss->depthOutSlot = -1;
-   for (i = 0; i < qss->stage.softpipe->fs->shader.num_outputs; i++) {
-      switch (qss->stage.softpipe->fs->shader.output_semantic_name[i]) {
+   for (i = 0; i < qss->stage.softpipe->fs->info.num_outputs; i++) {
+      switch (qss->stage.softpipe->fs->info.output_semantic_name[i]) {
       case TGSI_SEMANTIC_POSITION:
          qss->depthOutSlot = i;
          break;
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
new file mode 100644 (file)
index 0000000..1850a1c
--- /dev/null
@@ -0,0 +1,165 @@
+/**************************************************************************
+ * 
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
+ **************************************************************************/
+
+
+#include "pipe/p_util.h"
+#include "pipe/p_winsys.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_screen.h"
+
+#include "sp_texture.h"
+#include "sp_winsys.h"
+
+
+static const char *
+softpipe_get_vendor(struct pipe_screen *screen)
+{
+   return "Tungsten Graphics, Inc.";
+}
+
+
+static const char *
+softpipe_get_name(struct pipe_screen *screen)
+{
+   return "softpipe";
+}
+
+
+static int
+softpipe_get_param(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
+      return 8;
+   case PIPE_CAP_NPOT_TEXTURES:
+      return 1;
+   case PIPE_CAP_TWO_SIDED_STENCIL:
+      return 1;
+   case PIPE_CAP_GLSL:
+      return 1;
+   case PIPE_CAP_S3TC:
+      return 0;
+   case PIPE_CAP_ANISOTROPIC_FILTER:
+      return 0;
+   case PIPE_CAP_POINT_SPRITE:
+      return 1;
+   case PIPE_CAP_MAX_RENDER_TARGETS:
+      return 1;
+   case PIPE_CAP_OCCLUSION_QUERY:
+      return 1;
+   case PIPE_CAP_TEXTURE_SHADOW_MAP:
+      return 1;
+   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+      return 12; /* max 2Kx2K */
+   case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
+      return 8;  /* max 128x128x128 */
+   case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
+      return 12; /* max 2Kx2K */
+   default:
+      return 0;
+   }
+}
+
+
+static float
+softpipe_get_paramf(struct pipe_screen *screen, int param)
+{
+   switch (param) {
+   case PIPE_CAP_MAX_LINE_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_LINE_WIDTH_AA:
+      return 255.0; /* arbitrary */
+   case PIPE_CAP_MAX_POINT_WIDTH:
+      /* fall-through */
+   case PIPE_CAP_MAX_POINT_WIDTH_AA:
+      return 255.0; /* arbitrary */
+   case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
+      return 0.0;
+   case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
+      return 16.0; /* arbitrary */
+   default:
+      return 0;
+   }
+}
+
+
+/**
+ * Query format support for creating a texture, drawing surface, etc.
+ * \param format  the format to test
+ * \param type  one of PIPE_TEXTURE, PIPE_SURFACE
+ */
+static boolean
+softpipe_is_format_supported( struct pipe_screen *screen,
+                              enum pipe_format format, uint type )
+{
+   switch (type) {
+   case PIPE_TEXTURE:
+      /* softpipe supports all texture formats */
+      return TRUE;
+   case PIPE_SURFACE:
+      /* softpipe supports all (off-screen) surface formats */
+      return TRUE;
+   default:
+      assert(0);
+      return FALSE;
+   }
+}
+
+
+static void
+softpipe_destroy_screen( struct pipe_screen *screen )
+{
+   FREE(screen);
+}
+
+
+/**
+ * Create a new pipe_screen object
+ * Note: we're not presently subclassing pipe_screen (no softpipe_screen).
+ */
+struct pipe_screen *
+softpipe_create_screen(struct pipe_winsys *winsys)
+{
+   struct pipe_screen *screen = CALLOC_STRUCT(pipe_screen);
+
+   if (!screen)
+      return NULL;
+
+   screen->winsys = winsys;
+
+   screen->destroy = softpipe_destroy_screen;
+
+   screen->get_name = softpipe_get_name;
+   screen->get_vendor = softpipe_get_vendor;
+   screen->get_param = softpipe_get_param;
+   screen->get_paramf = softpipe_get_paramf;
+   screen->is_format_supported = softpipe_is_format_supported;
+
+   softpipe_init_screen_texture_funcs(screen);
+
+   return screen;
+}
index 5aaa9e346bcfb5d94d9752e5b6f728faf0e373cd..3943d4ed2b5ca56aca71a3da59ac44eb3df3d873 100644 (file)
@@ -32,6 +32,7 @@
 #define SP_STATE_H
 
 #include "pipe/p_state.h"
+#include "tgsi/util/tgsi_scan.h"
 
 
 #define SP_NEW_VIEWPORT      0x1
@@ -52,7 +53,6 @@
 
 
 struct tgsi_sampler;
-struct tgsi_interp_coef;
 struct tgsi_exec_machine;
 
 
@@ -61,10 +61,9 @@ struct tgsi_exec_machine;
  * This is starting to look an awful lot like a quad pipeline stage...
  */
 struct sp_fragment_shader {
-   struct pipe_shader_state   shader;
+   struct pipe_shader_state shader;
 
-   boolean uses_kill;
-   boolean writes_z;
+   struct tgsi_shader_info info;
 
    void (*prepare)( const struct sp_fragment_shader *shader,
                    struct tgsi_exec_machine *machine,
index 4c6313001f4c5ddeba51f0d8170d74c6da3d8fef..eafbaed4b94e12ba1840c4c01ac42e97c4be5b11 100644 (file)
@@ -61,8 +61,7 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
 
    if (vinfo->num_attribs == 0) {
       /* compute vertex layout now */
-      const struct pipe_shader_state *vs = &softpipe->vs->shader;
-      const struct pipe_shader_state *fs = &softpipe->fs->shader;
+      const struct sp_fragment_shader *spfs = softpipe->fs;
       const enum interp_mode colorInterp
          = softpipe->rasterizer->flatshade ? INTERP_CONSTANT : INTERP_LINEAR;
       uint i;
@@ -74,7 +73,8 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
          struct vertex_info *vinfo_vbuf = &softpipe->vertex_info_vbuf;
          vinfo_vbuf->num_attribs = 0;
          draw_emit_vertex_attr(vinfo_vbuf, EMIT_ALL, INTERP_NONE, 0);
-         vinfo_vbuf->size = 4 * vs->num_outputs
+         /* size in dwords or floats */
+         vinfo_vbuf->size = 4 * draw_num_vs_outputs(softpipe->draw)
                           + sizeof(struct vertex_header) / 4;
       }
 
@@ -83,9 +83,9 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
        * from the vertex shader.
        */
       vinfo->num_attribs = 0;
-      for (i = 0; i < fs->num_inputs; i++) {
+      for (i = 0; i < spfs->info.num_inputs; i++) {
          int src;
-         switch (fs->input_semantic_name[i]) {
+         switch (spfs->info.input_semantic_name[i]) {
          case TGSI_SEMANTIC_POSITION:
             src = draw_find_vs_output(softpipe->draw,
                                       TGSI_SEMANTIC_POSITION, 0);
@@ -94,7 +94,7 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
 
          case TGSI_SEMANTIC_COLOR:
             src = draw_find_vs_output(softpipe->draw, TGSI_SEMANTIC_COLOR, 
-                                 fs->input_semantic_index[i]);
+                                 spfs->info.input_semantic_index[i]);
             draw_emit_vertex_attr(vinfo, EMIT_4F, colorInterp, src);
             break;
 
@@ -106,7 +106,7 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
          case TGSI_SEMANTIC_GENERIC:
             /* this includes texcoords and varying vars */
             src = draw_find_vs_output(softpipe->draw, TGSI_SEMANTIC_GENERIC,
-                                 fs->input_semantic_index[i]);
+                                      spfs->info.input_semantic_index[i]);
             draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_PERSPECTIVE, src);
             break;
 
index b184ac61bb9957f0b775063ce893e5b03a05fe1a..eb641ed321df964bedc555b93de8c153451cdbc6 100644 (file)
@@ -45,13 +45,12 @@ softpipe_create_fs_state(struct pipe_context *pipe,
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
    struct sp_fragment_shader *state;
-   struct tgsi_shader_info info;
-
-   tgsi_scan_shader(templ->tokens, &info);
 
+   /* debug */
    if (softpipe->dump_fs) 
       tgsi_dump(templ->tokens, 0);
 
+   /* codegen */
    state = softpipe_create_fs_llvm( softpipe, templ );
    if (!state) {
       state = softpipe_create_fs_sse( softpipe, templ );
@@ -59,10 +58,12 @@ softpipe_create_fs_state(struct pipe_context *pipe,
          state = softpipe_create_fs_exec( softpipe, templ );
       }
    }
+
    assert(state);
-   state->uses_kill = (info.opcode_count[TGSI_OPCODE_KIL] ||
-                       info.opcode_count[TGSI_OPCODE_KILP]);
-   state->writes_z = info.writes_z;
+
+   /* get/save the summary info for this shader */
+   tgsi_scan_shader(templ->tokens, &state->info);
+
    return state;
 }
 
index 18669a1c6ef9445417f2ff5c7ee4015e69574d75..1d6dd17d1d979d393e2a35784a021048c6f0f9f2 100644 (file)
@@ -83,7 +83,7 @@ softpipe_set_sampler_texture(struct pipe_context *pipe,
    draw_flush(softpipe->draw);
 
    assert(unit < PIPE_MAX_SAMPLERS);
-   pipe_texture_reference(pipe, &softpipe->texture[unit], texture);
+   pipe_texture_reference(&softpipe->texture[unit], texture);
 
    sp_tile_cache_set_texture(pipe, softpipe->tex_cache[unit], texture);
 
index 6ba0f09e0a1269b00b7bec6eb52b6a2aa58d1a26..c605ed925b2b6a52dfe8723869d8504cb2368fdb 100644 (file)
@@ -80,22 +80,24 @@ softpipe_texture_layout(struct softpipe_texture * spt)
 }
 
 
-struct pipe_texture *
-softpipe_texture_create(struct pipe_context *pipe,
-                        const struct pipe_texture *templat)
+static struct pipe_texture *
+softpipe_texture_create_screen(struct pipe_screen *screen,
+                               const struct pipe_texture *templat)
 {
+   struct pipe_winsys *ws = screen->winsys;
    struct softpipe_texture *spt = CALLOC_STRUCT(softpipe_texture);
    if (!spt)
       return NULL;
 
    spt->base = *templat;
    spt->base.refcount = 1;
+   spt->base.screen = screen;
 
    softpipe_texture_layout(spt);
 
-   spt->buffer = pipe->winsys->buffer_create(pipe->winsys, 32,
-                                             PIPE_BUFFER_USAGE_PIXEL,
-                                             spt->buffer_size);
+   spt->buffer = ws->buffer_create(ws, 32,
+                                   PIPE_BUFFER_USAGE_PIXEL,
+                                   spt->buffer_size);
    if (!spt->buffer) {
       FREE(spt);
       return NULL;
@@ -107,8 +109,9 @@ softpipe_texture_create(struct pipe_context *pipe,
 }
 
 
-void
-softpipe_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
+static void
+softpipe_texture_release_screen(struct pipe_screen *screen,
+                                struct pipe_texture **pt)
 {
    if (!*pt)
       return;
@@ -124,7 +127,7 @@ softpipe_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
       DBG("%s deleting %p\n", __FUNCTION__, (void *) spt);
       */
 
-      pipe_buffer_reference(pipe->winsys, &spt->buffer, NULL);
+      pipe_buffer_reference(screen->winsys, &spt->buffer, NULL);
 
       FREE(spt);
    }
@@ -132,38 +135,22 @@ softpipe_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
 }
 
 
-void
-softpipe_texture_update(struct pipe_context *pipe,
-                        struct pipe_texture *texture)
-{
-   struct softpipe_context *softpipe = softpipe_context(pipe);
-   uint unit;
-   for (unit = 0; unit < PIPE_MAX_SAMPLERS; unit++) {
-      if (softpipe->texture[unit] == texture) {
-         sp_flush_tile_cache(softpipe, softpipe->tex_cache[unit]);
-      }
-   }
-}
-
-
-/**
- * Called via pipe->get_tex_surface()
- */
-struct pipe_surface *
-softpipe_get_tex_surface(struct pipe_context *pipe,
-                         struct pipe_texture *pt,
-                         unsigned face, unsigned level, unsigned zslice)
+static struct pipe_surface *
+softpipe_get_tex_surface_screen(struct pipe_screen *screen,
+                                struct pipe_texture *pt,
+                                unsigned face, unsigned level, unsigned zslice)
 {
+   struct pipe_winsys *ws = screen->winsys;
    struct softpipe_texture *spt = softpipe_texture(pt);
    struct pipe_surface *ps;
 
    assert(level <= pt->last_level);
 
-   ps = pipe->winsys->surface_alloc(pipe->winsys);
+   ps = ws->surface_alloc(ws);
    if (ps) {
       assert(ps->refcount);
       assert(ps->winsys);
-      pipe_buffer_reference(pipe->winsys, &ps->buffer, spt->buffer);
+      pipe_buffer_reference(ws, &ps->buffer, spt->buffer);
       ps->format = pt->format;
       ps->cpp = pt->cpp;
       ps->width = pt->width[level];
@@ -175,10 +162,41 @@ softpipe_get_tex_surface(struct pipe_context *pipe,
         ps->offset += ((pt->target == PIPE_TEXTURE_CUBE) ? face : zslice) *
                       (pt->compressed ? ps->height/4 : ps->height) *
                       ps->width * ps->cpp;
-      } else {
+      }
+      else {
         assert(face == 0);
         assert(zslice == 0);
       }
    }
    return ps;
 }
+
+
+static void
+softpipe_texture_update(struct pipe_context *pipe,
+                        struct pipe_texture *texture)
+{
+   struct softpipe_context *softpipe = softpipe_context(pipe);
+   uint unit;
+   for (unit = 0; unit < PIPE_MAX_SAMPLERS; unit++) {
+      if (softpipe->texture[unit] == texture) {
+         sp_flush_tile_cache(softpipe, softpipe->tex_cache[unit]);
+      }
+   }
+}
+
+
+void
+softpipe_init_texture_funcs( struct softpipe_context *softpipe )
+{
+   softpipe->pipe.texture_update = softpipe_texture_update;
+}
+
+
+void
+softpipe_init_screen_texture_funcs(struct pipe_screen *screen)
+{
+   screen->texture_create = softpipe_texture_create_screen;
+   screen->texture_release = softpipe_texture_release_screen;
+   screen->get_tex_surface = softpipe_get_tex_surface_screen;
+}
index 50fc10042747f9e315f87a539be1b6c1d521c511..a7322144e6f7f857567747c68c537b753dc5350c 100644 (file)
 #define SP_TEXTURE_H
 
 
+#include "pipe/p_state.h"
+
+
 struct pipe_context;
-struct pipe_texture;
+struct pipe_screen;
+struct softpipe_context;
 
 
 struct softpipe_texture
@@ -54,22 +58,12 @@ softpipe_texture(struct pipe_texture *pt)
 }
 
 
-
-extern struct pipe_texture *
-softpipe_texture_create(struct pipe_context *pipe,
-                        const struct pipe_texture *templat);
-
 extern void
-softpipe_texture_release(struct pipe_context *pipe, struct pipe_texture **pt);
+softpipe_init_texture_funcs( struct softpipe_context *softpipe );
 
-extern void
-softpipe_texture_update(struct pipe_context *pipe,
-                        struct pipe_texture *texture);
 
-extern struct pipe_surface *
-softpipe_get_tex_surface(struct pipe_context *pipe,
-                         struct pipe_texture *pt,
-                         unsigned face, unsigned level, unsigned zslice);
+extern void
+softpipe_init_screen_texture_funcs(struct pipe_screen *screen);
 
 
 #endif /* SP_TEXTURE */
index da30dd6c4847f8ebbf2c901cf0fe995b08ff327f..4caf2dd3fc97eff45d47bcf3a83f20781fb0bf37 100644 (file)
@@ -220,7 +220,7 @@ sp_tile_cache_set_texture(struct pipe_context *pipe,
 
    assert(!tc->surface);
 
-   pipe_texture_reference(pipe, &tc->texture, texture);
+   pipe_texture_reference(&tc->texture, texture);
 
    if (tc->tex_surf_map) {
       pipe_surface_unmap(tc->tex_surf);
@@ -489,6 +489,7 @@ sp_get_cached_tile_tex(struct pipe_context *pipe,
                        struct softpipe_tile_cache *tc, int x, int y, int z,
                        int face, int level)
 {
+   struct pipe_screen *screen = pipe->screen;
    /* tile pos in framebuffer: */
    const int tile_x = x & ~(TILE_SIZE - 1);
    const int tile_y = y & ~(TILE_SIZE - 1);
@@ -514,7 +515,7 @@ sp_get_cached_tile_tex(struct pipe_context *pipe,
         if (tc->tex_surf_map)
             pipe_surface_unmap(tc->tex_surf);
 
-         tc->tex_surf = pipe->get_tex_surface(pipe, tc->texture, face, level, z);
+         tc->tex_surf = screen->get_tex_surface(screen, tc->texture, face, level, z);
          tc->tex_surf_map = pipe_surface_map(tc->tex_surf);
 
          tc->tex_face = face;
index d6b379f58c6416fce1cf5e960a16f731694be3c0..fc372dba27b48585f079a6a963a231ce157f0edd 100644 (file)
@@ -46,12 +46,18 @@ struct softpipe_winsys {
 
 };
 
+struct pipe_screen;
 struct pipe_winsys;
 struct pipe_context;
 
 
-struct pipe_context *softpipe_create( struct pipe_winsys *,
+struct pipe_context *softpipe_create( struct pipe_screen *,
+                                      struct pipe_winsys *,
                                      struct softpipe_winsys * );
 
 
+struct pipe_screen *
+softpipe_create_screen(struct pipe_winsys *);
+
+
 #endif /* SP_WINSYS_H */
index f69b52f5e3f049dfd15cc1dc7ce0fc6be3382c53..d0f25d7d4670896333c6bb42aac1161b7ef086ee 100644 (file)
@@ -36,6 +36,8 @@ extern "C" {
 #endif
 
    
+struct pipe_screen;
+
 struct pipe_state_cache;
 
 /* Opaque driver handles:
@@ -51,26 +53,12 @@ struct pipe_query;
  */
 struct pipe_context {
    struct pipe_winsys *winsys;
+   struct pipe_screen *screen;
 
    void *priv;  /** context private data (for DRI for example) */
 
    void (*destroy)( struct pipe_context * );
 
-   /*
-    * Queries
-    */
-   /** type is one of PIPE_SURFACE, PIPE_TEXTURE, etc. */
-   boolean (*is_format_supported)( struct pipe_context *pipe,
-                                   enum pipe_format format, uint type );
-
-   const char *(*get_name)( struct pipe_context *pipe );
-
-   const char *(*get_vendor)( struct pipe_context *pipe );
-
-   int (*get_param)( struct pipe_context *pipe, int param );
-   float (*get_paramf)( struct pipe_context *pipe, int param );
-
-
    /*
     * Drawing.  
     * Return false on fallbacks (temporary??)
@@ -201,29 +189,16 @@ struct pipe_context {
                 struct pipe_surface *ps,
                 unsigned clearValue);
 
-
-   /*
-    * Texture functions
-    */
-   struct pipe_texture * (*texture_create)(struct pipe_context *pipe,
-                                           const struct pipe_texture *templat);
-
-   void (*texture_release)(struct pipe_context *pipe,
-                          struct pipe_texture **pt);
-
    /**
     * Called when texture data is changed.
     * Note: we could pass some hints about which mip levels or cube faces
     * have changed...
+    * XXX this may go away - could pass a 'write' flag to get_tex_surface()
     */
    void (*texture_update)(struct pipe_context *pipe,
                           struct pipe_texture *texture);
 
-   /** Get a surface which is a "view" into a texture */
-   struct pipe_surface *(*get_tex_surface)(struct pipe_context *pipe,
-                                           struct pipe_texture *texture,
-                                           unsigned face, unsigned level,
-                                           unsigned zslice);
+
 
    /* Flush rendering:
     */
index d84ddbc27aca975dc267f6b4bcca5d9dbf9998bd..0c662d651795618ffb7a3df1453b16b84b9cd6bc 100644 (file)
@@ -152,7 +152,7 @@ enum pipe_texture_target {
  */
 #define PIPE_TEX_FILTER_NEAREST      0
 #define PIPE_TEX_FILTER_LINEAR       1
-//#define PIPE_TEX_FILTER_ANISO        2
+/* #define PIPE_TEX_FILTER_ANISO        2 */
 
 
 #define PIPE_TEX_COMPARE_NONE          0
index 561d2e59210e2cbca76c6e2f9a13b90f0c5d7384..f90087b3c9398e12ee54dfcc19b83fa084f27a37 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef PIPE_FORMAT_H
 #define PIPE_FORMAT_H
 
-#include <stdio.h> // for sprintf
+#include <stdio.h> /* for sprintf */
 
 #include "p_compiler.h"
 #include "p_debug.h"
index de3fa555c5c310e863d33a89ba73cb4a21796e66..274f76a383f3d51b9f389e2d77ffb04117fad84c 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "p_context.h"
 #include "p_defines.h"
+#include "p_screen.h"
 #include "p_winsys.h"
 
 
@@ -97,7 +98,7 @@ pipe_buffer_reference(struct pipe_winsys *winsys,
  * \sa pipe_surface_reference
  */
 static INLINE void
-pipe_texture_reference(struct pipe_context *pipe, struct pipe_texture **ptr,
+pipe_texture_reference(struct pipe_texture **ptr,
                       struct pipe_texture *pt)
 {
    assert(ptr);
@@ -106,7 +107,10 @@ pipe_texture_reference(struct pipe_context *pipe, struct pipe_texture **ptr,
       pt->refcount++;
 
    if (*ptr) {
-      pipe->texture_release(pipe, ptr);
+      struct pipe_screen *screen = (*ptr)->screen;
+      assert(screen);
+      screen->texture_release(screen, ptr);
+
       assert(!*ptr);
    }
 
@@ -114,6 +118,17 @@ pipe_texture_reference(struct pipe_context *pipe, struct pipe_texture **ptr,
 }
 
 
+static INLINE void
+pipe_texture_release(struct pipe_texture **ptr)
+{
+   struct pipe_screen *screen;
+   assert(ptr);
+   screen = (*ptr)->screen;
+   screen->texture_release(screen, ptr);
+   *ptr = NULL;
+}
+
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
new file mode 100644 (file)
index 0000000..6be9a82
--- /dev/null
@@ -0,0 +1,98 @@
+/**************************************************************************
+ * 
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
+ * 
+ **************************************************************************/
+
+/**
+ * Screen, Adapter or GPU
+ *
+ * These are driver functions/facilities that are context independent.
+ */
+
+
+#ifndef P_SCREEN_H
+#define P_SCREEN_H
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+/**
+ * Gallium screen/adapter context.  Basically everything
+ * hardware-specific that doesn't actually require a rendering
+ * context.
+ */
+struct pipe_screen {
+   struct pipe_winsys *winsys;
+
+   void (*destroy)( struct pipe_screen * );
+
+
+   /* 
+    * Capability queries
+    */
+   const char *(*get_name)( struct pipe_screen * );
+
+   const char *(*get_vendor)( struct pipe_screen * );
+
+   int (*get_param)( struct pipe_screen *, int param );
+
+   float (*get_paramf)( struct pipe_screen *, int param );
+
+   boolean (*is_format_supported)( struct pipe_screen *,
+                                   enum pipe_format format, 
+                                   uint type );
+
+
+   /*
+    * Texture functions
+    */
+   struct pipe_texture * (*texture_create)(struct pipe_screen *,
+                                           const struct pipe_texture *templat);
+
+   void (*texture_release)(struct pipe_screen *,
+                           struct pipe_texture **pt);
+
+   /** Get a surface which is a "view" into a texture */
+   struct pipe_surface *(*get_tex_surface)(struct pipe_screen *,
+                                           struct pipe_texture *texture,
+                                           unsigned face, unsigned level,
+                                           unsigned zslice);
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* P_SCREEN_H */
index 1806877f6cc51178506bb6208d4c7b89e503a66f..0a6145a6bfde8fc9cd50c78a6badfb6f90cc641f 100644 (file)
@@ -1,9 +1,9 @@
 #if !defined TGSI_TOKEN_H
 #define TGSI_TOKEN_H
 
-#if defined __cplusplus
+#ifdef __cplusplus
 extern "C" {
-#endif // defined __cplusplus
+#endif
 
 #include "p_compiler.h"
 
@@ -802,9 +802,9 @@ struct tgsi_dst_register_ext_predicate
 };
 
 
-#if defined __cplusplus
-} // extern "C"
-#endif // defined __cplusplus
+#ifdef __cplusplus
+}
+#endif
 
-#endif // !defined TGSI_TOKEN_H
+#endif /* TGSI_TOKEN_H */
 
index 15c88881eb23e38e97d61671f3cf2a4b3fe2d1ed..5fab41acbd4d8846e58987f8905118751381eacd 100644 (file)
@@ -63,6 +63,7 @@ extern "C" {
 
 
 /* fwd decls */
+struct pipe_screen;
 struct pipe_surface;
 struct pipe_winsys;
 
@@ -160,9 +161,9 @@ struct pipe_constant_buffer
 struct pipe_shader_state
 {
    const struct tgsi_token *tokens;
+   /* XXX these are going away */
    ubyte num_inputs;
    ubyte num_outputs;
-   ubyte input_map[PIPE_MAX_SHADER_INPUTS]; /* XXX this may be temporary */
    ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
    ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
    ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
@@ -276,8 +277,7 @@ struct pipe_surface
 
 
 /**
- * Texture. Represents one or several texture images on one or several mipmap
- * levels.
+ * Texture object.
  */
 struct pipe_texture
 { 
@@ -297,6 +297,8 @@ struct pipe_texture
    /* These are also refcounted:
     */
    unsigned refcount;
+
+   struct pipe_screen *screen; /**< screen that this texture belongs to */
 };
 
 
index b01370c049c5a08d3cab25c285172bd9cc9aa186..45430984d8fb1e36b280572c885a49b12b086ac1 100644 (file)
@@ -30,6 +30,9 @@
 
 
 #include "drm.h"
+
+#include "pipe/p_debug.h"
+
 #include "intel_screen.h"
 #include "i915_drm.h"
 
index 0ed3890e936fa95d81fa5624c87117e3261595d0..2def1afc31efdb15a435b6d77567c891d460f8f6 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "pipe/p_util.h"
 #include "i915simple/i915_winsys.h"
+#include "i915simple/i915_screen.h"
 
 
 struct intel_i915_winsys {
@@ -135,6 +136,7 @@ intel_create_i915simple( struct intel_context *intel,
                          struct pipe_winsys *winsys )
 {
    struct intel_i915_winsys *iws = CALLOC_STRUCT( intel_i915_winsys );
+   struct pipe_screen *screen;
    
    /* Fill in this struct with callbacks that i915simple will need to
     * communicate with the window system, buffer manager, etc. 
@@ -146,9 +148,11 @@ intel_create_i915simple( struct intel_context *intel,
    iws->winsys.batch_finish = intel_i915_batch_finish;
    iws->intel = intel;
 
+   screen = i915_create_screen(winsys, intel->intelScreen->deviceID);
+
    /* Create the i915simple context:
     */
-   return i915_create( winsys,
-                      &iws->winsys,
-                      intel->intelScreen->deviceID );
+   return i915_create_context( screen,
+                               winsys,
+                               &iws->winsys );
 }
index 9e483bdc9f58c333eb4a708245dfa7d8718baa1f..0bc2dc40025d7e202c2fe2b1d9a68e5cd06965c2 100644 (file)
@@ -68,6 +68,7 @@ intel_create_softpipe( struct intel_context *intel,
                        struct pipe_winsys *winsys )
 {
    struct intel_softpipe_winsys *isws = CALLOC_STRUCT( intel_softpipe_winsys );
+   struct pipe_screen *screen = softpipe_create_screen(winsys);
    
    /* Fill in this struct with callbacks that softpipe will need to
     * communicate with the window system, buffer manager, etc. 
@@ -77,5 +78,5 @@ intel_create_softpipe( struct intel_context *intel,
 
    /* Create the softpipe context:
     */
-   return softpipe_create( winsys, &isws->sws );
+   return softpipe_create( screen, winsys, &isws->sws );
 }
index 8da596d419e7d8ec726d007e835a36f58401c7f5..018cf01cd6d369cdb1250d9d2c336abb4dad632e 100644 (file)
@@ -36,6 +36,8 @@
 #include "glxheader.h"
 #include "xmesaP.h"
 
+#undef ASSERT
+
 #include "pipe/p_winsys.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
@@ -45,6 +47,7 @@
 
 #ifdef GALLIUM_CELL
 #include "cell/ppu/cell_context.h"
+#include "cell/ppu/cell_screen.h"
 #include "cell/ppu/cell_winsys.h"
 #else
 #define TILE_SIZE 32  /* avoid compilation errors */
@@ -448,7 +451,8 @@ xmesa_create_pipe_context(XMesaContext xmesa, uint pixelformat)
 #ifdef GALLIUM_CELL
    if (!getenv("GALLIUM_NOCELL")) {
       struct cell_winsys *cws = cell_get_winsys(pixelformat);
-      pipe = cell_create_context(pws, cws);
+      struct pipe_screen *screen = cell_create_screen(pws);
+      pipe = cell_create_context(screen, cws);
       if (pipe)
          pipe->priv = xmesa;
       return pipe;
@@ -457,7 +461,8 @@ xmesa_create_pipe_context(XMesaContext xmesa, uint pixelformat)
 #endif
    {
       struct softpipe_winsys *spws = xmesa_get_softpipe_winsys(pixelformat);
-      pipe = softpipe_create( pws, spws );
+      struct pipe_screen *screen = softpipe_create_screen(pws);
+      pipe = softpipe_create( screen, pws, spws );
       if (pipe)
          pipe->priv = xmesa;
 
index dbfd37bda29e96904c9a9631c16bb24950209c7e..d55d8c39eb5467ecfabd035f96a096afbabbb70d 100644 (file)
@@ -40,6 +40,7 @@
 #include "pipe/p_util.h"
 #include "pipe/p_inlines.h"
 #include "i965simple/brw_winsys.h"
+#include "i965simple/brw_screen.h"
 #include "brw_aub.h"
 #include "xm_winsys_aub.h"
 
@@ -565,6 +566,7 @@ struct pipe_context *
 xmesa_create_i965simple( struct pipe_winsys *winsys )
 {
    struct aub_brw_winsys *iws = CALLOC_STRUCT( aub_brw_winsys );
+   struct pipe_screen *screen = brw_create_screen(winsys, 0/* XXX pci_id */);
    
    /* Fill in this struct with callbacks that i965simple will need to
     * communicate with the window system, buffer manager, etc. 
@@ -583,7 +585,7 @@ xmesa_create_i965simple( struct pipe_winsys *winsys )
 
    /* Create the i965simple context:
     */
-   return brw_create( winsys,
+   return brw_create( screen,
                      &iws->winsys,
                      0 );
 }
index 3e217ef5d52efbcf980b5f13754f2222f0f7e6eb..e2cf9dd5279c29cb8fb177ad36af93d9eedf00bc 100644 (file)
@@ -1,63 +1,63 @@
-# Makefile for GLU for GCC-2.95.2/Mingw32 contributed by\r
-# Paul Garceau <pgarceau@teleport.com>\r
-\r
-# Mesa 3-D graphics library\r
-# Version:  3.3\r
-# Copyright (C) 1995-1999  Brian Paul\r
-#\r
-# This library is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Library General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 2 of the License, or (at your option) any later version.\r
-#\r
-# This library is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Library General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Library General Public\r
-# License along with this library; if not, write to the Free\r
-# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-\r
-\r
-MESA_MAJOR=3\r
-MESA_MINOR=3\r
-MESA_TINY=0\r
-VERSION=$(MESA_MAJOR).$(MESA_MINOR)\r
-\r
-CFLAGS = -I. -DWIN32 -D__WIN32__ -D_WINDOWS \\r
-               -O2 -funroll-loops \\r
-               -fexpensive-optimizations -fomit-frame-pointer -ffast-math \\r
-               -malign-loops=2 -malign-jumps=2 -malign-functions=2 \\r
-               -mwindows\r
-CC = gcc\r
-MAKELIB = ar ru\r
-GLU_LIB = libGLU.a\r
-\r
-\r
-##### MACROS #####\r
-\r
-VPATH = RCS\r
-\r
-INCDIR = ../include\r
-LIBDIR = ../lib\r
-\r
-SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \\r
-       polytest.c project.c quadric.c tess.c tesselat.c\r
-\r
-OBJECTS = $(SOURCES:.c=.o)\r
-\r
-\r
-\r
-##### RULES #####\r
-\r
-.c.o:\r
-       $(CC) -c -I$(INCDIR) $(CFLAGS) $<\r
-\r
-\r
-\r
-##### TARGETS #####\r
-\r
-# Make the library:\r
-$(LIBDIR)/$(GLU_LIB): $(OBJECTS)\r
+# Makefile for GLU for GCC-2.95.2/Mingw32 contributed by
+# Paul Garceau <pgarceau@teleport.com>
+
+# Mesa 3-D graphics library
+# Version:  3.3
+# Copyright (C) 1995-1999  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.
+
+
+MESA_MAJOR=3
+MESA_MINOR=3
+MESA_TINY=0
+VERSION=$(MESA_MAJOR).$(MESA_MINOR)
+
+CFLAGS = -I. -DWIN32 -D__WIN32__ -D_WINDOWS \
+               -O2 -funroll-loops \
+               -fexpensive-optimizations -fomit-frame-pointer -ffast-math \
+               -malign-loops=2 -malign-jumps=2 -malign-functions=2 \
+               -mwindows
+CC = gcc
+MAKELIB = ar ru
+GLU_LIB = libGLU.a
+
+
+##### MACROS #####
+
+VPATH = RCS
+
+INCDIR = ../include
+LIBDIR = ../lib
+
+SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
+       polytest.c project.c quadric.c tess.c tesselat.c
+
+OBJECTS = $(SOURCES:.c=.o)
+
+
+
+##### RULES #####
+
+.c.o:
+       $(CC) -c -I$(INCDIR) $(CFLAGS) $<
+
+
+
+##### TARGETS #####
+
+# Make the library:
+$(LIBDIR)/$(GLU_LIB): $(OBJECTS)
        $(MAKELIB) $(GLU_LIB) $(MAJOR) $(MINOR) $(TINY) $(OBJECTS)
\ No newline at end of file
index ff6ffb1d39a3c472e00657fbe759ab3582207019..805a0c7222461b421f8b65a5597be6658af7fd29 100644 (file)
-EXPORTS\r
-       glutInit\r
-       glutInitDisplayMode\r
-       glutInitDisplayString\r
-       glutInitWindowPosition\r
-       glutInitWindowSize\r
-       glutMainLoop\r
-       glutCreateWindow\r
-       glutCreateSubWindow\r
-       glutDestroyWindow\r
-       glutPostRedisplay\r
-       glutSwapBuffers\r
-       glutGetWindow\r
-       glutSetWindow\r
-       glutSetWindowTitle\r
-       glutSetIconTitle\r
-       glutPositionWindow\r
-       glutReshapeWindow\r
-       glutPopWindow\r
-       glutPushWindow\r
-       glutIconifyWindow\r
-       glutShowWindow\r
-       glutHideWindow\r
-       glutFullScreen\r
-       glutSetCursor\r
-       glutWarpPointer\r
-       glutEstablishOverlay\r
-       glutRemoveOverlay\r
-       glutUseLayer\r
-       glutPostOverlayRedisplay\r
-       glutShowOverlay\r
-       glutHideOverlay\r
-       glutCreateMenu\r
-       glutDestroyMenu\r
-       glutGetMenu\r
-       glutSetMenu\r
-       glutAddMenuEntry\r
-       glutAddSubMenu\r
-       glutChangeToMenuEntry\r
-       glutChangeToSubMenu\r
-       glutRemoveMenuItem\r
-       glutAttachMenu\r
-       glutDetachMenu\r
-       glutDisplayFunc\r
-       glutReshapeFunc\r
-       glutKeyboardFunc\r
-       glutMouseFunc\r
-       glutMotionFunc\r
-       glutPassiveMotionFunc\r
-       glutEntryFunc\r
-       glutVisibilityFunc\r
-       glutIdleFunc\r
-       glutTimerFunc\r
-       glutMenuStateFunc\r
-       glutSpecialFunc\r
-       glutSpaceballMotionFunc\r
-       glutSpaceballRotateFunc\r
-       glutSpaceballButtonFunc\r
-       glutButtonBoxFunc\r
-       glutDialsFunc\r
-       glutTabletMotionFunc\r
-       glutTabletButtonFunc\r
-       glutMenuStatusFunc\r
-       glutOverlayDisplayFunc\r
-       glutWindowStatusFunc\r
-       glutSetColor\r
-       glutGetColor\r
-       glutCopyColormap\r
-       glutGet\r
-       glutDeviceGet\r
-       glutExtensionSupported\r
-       glutGetModifiers\r
-       glutLayerGet\r
-       glutBitmapCharacter\r
-       glutBitmapWidth\r
-       glutStrokeCharacter\r
-       glutStrokeWidth\r
-       glutBitmapLength\r
-       glutStrokeLength\r
-       glutWireSphere\r
-       glutSolidSphere\r
-       glutWireCone\r
-       glutSolidCone\r
-       glutWireCube\r
-       glutSolidCube\r
-       glutWireTorus\r
-       glutSolidTorus\r
-       glutWireDodecahedron\r
-       glutSolidDodecahedron\r
-       glutWireTeapot\r
-       glutSolidTeapot\r
-       glutWireOctahedron\r
-       glutSolidOctahedron\r
-       glutWireTetrahedron\r
-       glutSolidTetrahedron\r
-       glutWireIcosahedron\r
-       glutSolidIcosahedron\r
-       glutVideoResizeGet\r
-       glutSetupVideoResizing\r
-       glutStopVideoResizing\r
-       glutVideoResize\r
-       glutVideoPan\r
-       glutReportErrors\r
+EXPORTS
+       glutInit
+       glutInitDisplayMode
+       glutInitDisplayString
+       glutInitWindowPosition
+       glutInitWindowSize
+       glutMainLoop
+       glutCreateWindow
+       glutCreateSubWindow
+       glutDestroyWindow
+       glutPostRedisplay
+       glutSwapBuffers
+       glutGetWindow
+       glutSetWindow
+       glutSetWindowTitle
+       glutSetIconTitle
+       glutPositionWindow
+       glutReshapeWindow
+       glutPopWindow
+       glutPushWindow
+       glutIconifyWindow
+       glutShowWindow
+       glutHideWindow
+       glutFullScreen
+       glutSetCursor
+       glutWarpPointer
+       glutEstablishOverlay
+       glutRemoveOverlay
+       glutUseLayer
+       glutPostOverlayRedisplay
+       glutShowOverlay
+       glutHideOverlay
+       glutCreateMenu
+       glutDestroyMenu
+       glutGetMenu
+       glutSetMenu
+       glutAddMenuEntry
+       glutAddSubMenu
+       glutChangeToMenuEntry
+       glutChangeToSubMenu
+       glutRemoveMenuItem
+       glutAttachMenu
+       glutDetachMenu
+       glutDisplayFunc
+       glutReshapeFunc
+       glutKeyboardFunc
+       glutMouseFunc
+       glutMotionFunc
+       glutPassiveMotionFunc
+       glutEntryFunc
+       glutVisibilityFunc
+       glutIdleFunc
+       glutTimerFunc
+       glutMenuStateFunc
+       glutSpecialFunc
+       glutSpaceballMotionFunc
+       glutSpaceballRotateFunc
+       glutSpaceballButtonFunc
+       glutButtonBoxFunc
+       glutDialsFunc
+       glutTabletMotionFunc
+       glutTabletButtonFunc
+       glutMenuStatusFunc
+       glutOverlayDisplayFunc
+       glutWindowStatusFunc
+       glutSetColor
+       glutGetColor
+       glutCopyColormap
+       glutGet
+       glutDeviceGet
+       glutExtensionSupported
+       glutGetModifiers
+       glutLayerGet
+       glutBitmapCharacter
+       glutBitmapWidth
+       glutStrokeCharacter
+       glutStrokeWidth
+       glutBitmapLength
+       glutStrokeLength
+       glutWireSphere
+       glutSolidSphere
+       glutWireCone
+       glutSolidCone
+       glutWireCube
+       glutSolidCube
+       glutWireTorus
+       glutSolidTorus
+       glutWireDodecahedron
+       glutSolidDodecahedron
+       glutWireTeapot
+       glutSolidTeapot
+       glutWireOctahedron
+       glutSolidOctahedron
+       glutWireTetrahedron
+       glutSolidTetrahedron
+       glutWireIcosahedron
+       glutSolidIcosahedron
+       glutVideoResizeGet
+       glutSetupVideoResizing
+       glutStopVideoResizing
+       glutVideoResize
+       glutVideoPan
+       glutReportErrors
index 56ad4e4c47f2eb1074afdbc7c6f3208cf406678b..102a8b688d33ed9ecfa9720ae2f2da9a6420ed64 100644 (file)
-# Makefile\r
-# Created by IBM WorkFrame/2 MakeMake at 12:46:25 on 3 June 2003\r
-#\r
-# The actions included in this make file are:\r
-#  Compile::C++ Compiler\r
-#  Link::Linker\r
-#  Lib::Import Lib\r
-\r
-.SUFFIXES:\r
-\r
-.SUFFIXES: \\r
-    .LIB .cpp .dll .obj \r
-\r
-.cpp.obj:\r
-    @echo " Compile::C++ Compiler "\r
-    icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s\r
-\r
-{G:\EVGEN\MESA5\src-glut.os2pm}.cpp.obj:\r
-    @echo " Compile::C++ Compiler "\r
-    icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s\r
-\r
-.dll.LIB:\r
-    @echo " Lib::Import Lib "\r
-    implib.exe %|dpfF.LIB %s\r
-\r
-{G:\EVGEN\MESA5\src-glut.os2pm}.dll.LIB:\r
-    @echo " Lib::Import Lib "\r
-    implib.exe %|dpfF.LIB %s\r
-\r
-all: \\r
-    .\libGlut.LIB\r
-\r
-.\libGlut.dll: \\r
-    .\os2_winproc.obj \\r
-    .\WarpWin.obj \\r
-    .\glutOverlay.obj \\r
-    .\glut_8x13.obj \\r
-    .\glut_9x15.obj \\r
-    .\glut_bitmap.obj \\r
-    .\glut_cindex.obj \\r
-    .\glut_cmap.obj \\r
-    .\glut_cursor.obj \\r
-    .\glut_event.obj \\r
-    .\glut_ext.obj \\r
-    .\glut_fullscrn.obj \\r
-    .\glut_gamemode.obj \\r
-    .\glut_get.obj \\r
-    .\glut_hel10.obj \\r
-    .\glut_hel12.obj \\r
-    .\glut_hel18.obj \\r
-    .\glut_init.obj \\r
-    .\glut_input.obj \\r
-    .\glut_key.obj \\r
-    .\glut_keyctrl.obj \\r
-    .\glut_keyup.obj \\r
-    .\glut_mesa.obj \\r
-    .\glut_modifier.obj \\r
-    .\glut_roman.obj \\r
-    .\glut_shapes.obj \\r
-    .\glut_stroke.obj \\r
-    .\glut_swap.obj \\r
-    .\glut_teapot.obj \\r
-    .\glut_tr24.obj \\r
-    .\glut_util.obj \\r
-    .\glut_vidresize.obj \\r
-    .\glut_warp.obj \\r
-    .\glut_win.obj \\r
-    .\glut_winmisc.obj \\r
-    .\os2_glx.obj \\r
-    .\os2_menu.obj \\r
-    ..\si-glu\libGLU.lib \\r
-    ..\MesaDll\MesaGL2.lib \\r
-    ..\drv\DrvLoad\MesaDrvLoad.lib \\r
-    {$(LIB)}libGlut.DEF\r
-    @echo " Link::Linker "\r
-    icc.exe @<<\r
-     /B" /dbgpack /exepack:2 /st:200000 /packd /optfunc"\r
-     /FelibGlut.dll \r
-     ..\si-glu\libGLU.lib \r
-     ..\MesaDll\MesaGL2.lib \r
-     ..\drv\DrvLoad\MesaDrvLoad.lib \r
-     libGlut.DEF\r
-     .\os2_winproc.obj\r
-     .\WarpWin.obj\r
-     .\glutOverlay.obj\r
-     .\glut_8x13.obj\r
-     .\glut_9x15.obj\r
-     .\glut_bitmap.obj\r
-     .\glut_cindex.obj\r
-     .\glut_cmap.obj\r
-     .\glut_cursor.obj\r
-     .\glut_event.obj\r
-     .\glut_ext.obj\r
-     .\glut_fullscrn.obj\r
-     .\glut_gamemode.obj\r
-     .\glut_get.obj\r
-     .\glut_hel10.obj\r
-     .\glut_hel12.obj\r
-     .\glut_hel18.obj\r
-     .\glut_init.obj\r
-     .\glut_input.obj\r
-     .\glut_key.obj\r
-     .\glut_keyctrl.obj\r
-     .\glut_keyup.obj\r
-     .\glut_mesa.obj\r
-     .\glut_modifier.obj\r
-     .\glut_roman.obj\r
-     .\glut_shapes.obj\r
-     .\glut_stroke.obj\r
-     .\glut_swap.obj\r
-     .\glut_teapot.obj\r
-     .\glut_tr24.obj\r
-     .\glut_util.obj\r
-     .\glut_vidresize.obj\r
-     .\glut_warp.obj\r
-     .\glut_win.obj\r
-     .\glut_winmisc.obj\r
-     .\os2_glx.obj\r
-     .\os2_menu.obj\r
-<<\r
-\r
-.\os2_winproc.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\os2_winproc.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \\r
-    gl\os2mesa.h \\r
-    gl\gl.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2mesadef.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}context.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapi.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}mtypes.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glheader.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}config.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapitable.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glthread.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}math/m_matrix.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Trace/tr_context.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}dd.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}conf.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_config.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/glext.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Xthreads.h\r
-\r
-.\os2_menu.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\os2_menu.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\os2_glx.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\os2_glx.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    gl\os2mesa.h \\r
-    gl\gl.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h\r
-\r
-.\glut_winmisc.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_winmisc.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_win.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_win.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutos2.h \\r
-    gl\os2mesa.h \\r
-    gl\gl.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h\r
-\r
-.\glut_warp.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_warp.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_vidresize.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_vidresize.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_util.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_util.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_tr24.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_tr24.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h\r
-\r
-.\glut_teapot.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_teapot.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_swap.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_swap.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_stroke.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_stroke.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_shapes.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_shapes.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_roman.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_roman.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h\r
-\r
-.\glut_modifier.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_modifier.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_mesa.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_mesa.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_keyup.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_keyup.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_keyctrl.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_keyctrl.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_key.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_key.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_input.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_input.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_init.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_init.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_hel18.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_hel18.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h\r
-\r
-.\glut_hel12.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_hel12.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h\r
-\r
-.\glut_hel10.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_hel10.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h\r
-\r
-.\glut_get.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_get.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_gamemode.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_gamemode.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_fullscrn.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_fullscrn.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_ext.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_ext.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_event.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_event.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_cursor.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_cursor.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_cmap.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_cmap.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}layerutil.h\r
-\r
-.\glut_cindex.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_cindex.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_bitmap.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_bitmap.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\glut_9x15.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_9x15.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h\r
-\r
-.\glut_8x13.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glut_8x13.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h\r
-\r
-.\glutOverlay.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\glutOverlay.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h\r
-\r
-.\WarpWin.obj: \\r
-    G:\EVGEN\MESA5\src-glut.os2pm\WarpWin.cpp \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpWin.h \\r
-    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h\r
-\r
-.\libGlut.LIB: \\r
-    .\libGlut.dll\r
+# Makefile
+# Created by IBM WorkFrame/2 MakeMake at 12:46:25 on 3 June 2003
+#
+# The actions included in this make file are:
+#  Compile::C++ Compiler
+#  Link::Linker
+#  Lib::Import Lib
+
+.SUFFIXES:
+
+.SUFFIXES: \
+    .LIB .cpp .dll .obj 
+
+.cpp.obj:
+    @echo " Compile::C++ Compiler "
+    icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s
+
+{G:\EVGEN\MESA5\src-glut.os2pm}.cpp.obj:
+    @echo " Compile::C++ Compiler "
+    icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s
+
+.dll.LIB:
+    @echo " Lib::Import Lib "
+    implib.exe %|dpfF.LIB %s
+
+{G:\EVGEN\MESA5\src-glut.os2pm}.dll.LIB:
+    @echo " Lib::Import Lib "
+    implib.exe %|dpfF.LIB %s
+
+all: \
+    .\libGlut.LIB
+
+.\libGlut.dll: \
+    .\os2_winproc.obj \
+    .\WarpWin.obj \
+    .\glutOverlay.obj \
+    .\glut_8x13.obj \
+    .\glut_9x15.obj \
+    .\glut_bitmap.obj \
+    .\glut_cindex.obj \
+    .\glut_cmap.obj \
+    .\glut_cursor.obj \
+    .\glut_event.obj \
+    .\glut_ext.obj \
+    .\glut_fullscrn.obj \
+    .\glut_gamemode.obj \
+    .\glut_get.obj \
+    .\glut_hel10.obj \
+    .\glut_hel12.obj \
+    .\glut_hel18.obj \
+    .\glut_init.obj \
+    .\glut_input.obj \
+    .\glut_key.obj \
+    .\glut_keyctrl.obj \
+    .\glut_keyup.obj \
+    .\glut_mesa.obj \
+    .\glut_modifier.obj \
+    .\glut_roman.obj \
+    .\glut_shapes.obj \
+    .\glut_stroke.obj \
+    .\glut_swap.obj \
+    .\glut_teapot.obj \
+    .\glut_tr24.obj \
+    .\glut_util.obj \
+    .\glut_vidresize.obj \
+    .\glut_warp.obj \
+    .\glut_win.obj \
+    .\glut_winmisc.obj \
+    .\os2_glx.obj \
+    .\os2_menu.obj \
+    ..\si-glu\libGLU.lib \
+    ..\MesaDll\MesaGL2.lib \
+    ..\drv\DrvLoad\MesaDrvLoad.lib \
+    {$(LIB)}libGlut.DEF
+    @echo " Link::Linker "
+    icc.exe @<<
+     /B" /dbgpack /exepack:2 /st:200000 /packd /optfunc"
+     /FelibGlut.dll 
+     ..\si-glu\libGLU.lib 
+     ..\MesaDll\MesaGL2.lib 
+     ..\drv\DrvLoad\MesaDrvLoad.lib 
+     libGlut.DEF
+     .\os2_winproc.obj
+     .\WarpWin.obj
+     .\glutOverlay.obj
+     .\glut_8x13.obj
+     .\glut_9x15.obj
+     .\glut_bitmap.obj
+     .\glut_cindex.obj
+     .\glut_cmap.obj
+     .\glut_cursor.obj
+     .\glut_event.obj
+     .\glut_ext.obj
+     .\glut_fullscrn.obj
+     .\glut_gamemode.obj
+     .\glut_get.obj
+     .\glut_hel10.obj
+     .\glut_hel12.obj
+     .\glut_hel18.obj
+     .\glut_init.obj
+     .\glut_input.obj
+     .\glut_key.obj
+     .\glut_keyctrl.obj
+     .\glut_keyup.obj
+     .\glut_mesa.obj
+     .\glut_modifier.obj
+     .\glut_roman.obj
+     .\glut_shapes.obj
+     .\glut_stroke.obj
+     .\glut_swap.obj
+     .\glut_teapot.obj
+     .\glut_tr24.obj
+     .\glut_util.obj
+     .\glut_vidresize.obj
+     .\glut_warp.obj
+     .\glut_win.obj
+     .\glut_winmisc.obj
+     .\os2_glx.obj
+     .\os2_menu.obj
+<<
+
+.\os2_winproc.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\os2_winproc.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
+    gl\os2mesa.h \
+    gl\gl.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2mesadef.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}context.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapi.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}mtypes.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glheader.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}config.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapitable.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glthread.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}math/m_matrix.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Trace/tr_context.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}dd.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}conf.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_config.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/glext.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Xthreads.h
+
+.\os2_menu.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\os2_menu.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\os2_glx.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\os2_glx.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    gl\os2mesa.h \
+    gl\gl.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h
+
+.\glut_winmisc.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_winmisc.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_win.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_win.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutos2.h \
+    gl\os2mesa.h \
+    gl\gl.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h
+
+.\glut_warp.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_warp.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_vidresize.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_vidresize.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_util.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_util.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_tr24.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_tr24.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
+
+.\glut_teapot.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_teapot.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_swap.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_swap.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_stroke.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_stroke.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_shapes.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_shapes.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_roman.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_roman.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h
+
+.\glut_modifier.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_modifier.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_mesa.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_mesa.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_keyup.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_keyup.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_keyctrl.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_keyctrl.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_key.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_key.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_input.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_input.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_init.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_init.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_hel18.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_hel18.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
+
+.\glut_hel12.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_hel12.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
+
+.\glut_hel10.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_hel10.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
+
+.\glut_get.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_get.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_gamemode.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_gamemode.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_fullscrn.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_fullscrn.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_ext.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_ext.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_event.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_event.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_cursor.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_cursor.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_cmap.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_cmap.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}layerutil.h
+
+.\glut_cindex.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_cindex.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_bitmap.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_bitmap.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\glut_9x15.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_9x15.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
+
+.\glut_8x13.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glut_8x13.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
+
+.\glutOverlay.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\glutOverlay.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
+
+.\WarpWin.obj: \
+    G:\EVGEN\MESA5\src-glut.os2pm\WarpWin.cpp \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpWin.h \
+    {G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h
+
+.\libGlut.LIB: \
+    .\libGlut.dll
index 563708de2db551dee993db08c222bfd8acb6fbc6..d57c4e74182eddb5b8e6fd99067ee6c3fe705ede 100644 (file)
-/***********************************************************\r
- *     Copyright (C) 1997, Be Inc.  All rights reserved.\r
- *\r
- *  FILE:      glutOverlay.cpp\r
- *\r
- *     DESCRIPTION:    we don't support overlays, so this code is\r
- *             really simple\r
- ***********************************************************/\r
-\r
-/***********************************************************\r
- *     Headers\r
- ***********************************************************/\r
-#include <GL/glut.h>\r
-#include "glutint.h"\r
-#include "glutbitmap.h"\r
-#include "glutstroke.h"\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutEstablishOverlay(void)\r
-{\r
-       __glutFatalError("OS2PM lacks overlay support.");\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutUseLayer(GLenum layer) {\r
-       // ignore\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutRemoveOverlay(void) {\r
-       // ignore\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutPostOverlayRedisplay(void) {\r
-       // ignore\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutShowOverlay(void) {\r
-       // ignore\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY glutHideOverlay(void)\r
-{\r
-       // ignore\r
-}\r
-\r
-int GLUTAPIENTRY\r
-glutLayerGet(GLenum param)\r
-{\r
-       // ignore\r
-}\r
-\r
-/***********************************************************\r
- *     Unsupported callbacks\r
- ***********************************************************/\r
-GLUTAPI void GLUTAPIENTRY\r
-glutOverlayDisplayFunc(GLUTdisplayCB displayFunc)\r
-{\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc)\r
-{\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc)\r
-{\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc)\r
-{\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc)\r
-{\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutDialsFunc(GLUTdialsCB dialsFunc)\r
-{\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)\r
-{\r
-}\r
-\r
-GLUTAPI void GLUTAPIENTRY\r
-glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)\r
-{\r
-}\r
-GLUTAPI void GLUTAPIENTRY\r
-glutPostWindowOverlayRedisplay(int win)\r
-{ //\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutInitDisplayString(const char *string)\r
-{ //\r
-}\r
-void GLUTAPIENTRY\r
-glutJoystickFunc(GLUTjoystickCB joystickFunc, int pollInterval)\r
-{ //\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutForceJoystickFunc(void)\r
-{ //\r
-}\r
-\r
-\r
-int  GLUTAPIENTRY\r
-glutBitmapWidth(GLUTbitmapFont font, int c)\r
-{  return 0;\r
-}\r
-int  GLUTAPIENTRY\r
-glutBitmapLength(GLUTbitmapFont font, const unsigned char *string)\r
-{ //\r
-  return 0;\r
-}\r
-int GLUTAPIENTRY\r
-glutStrokeWidth(GLUTstrokeFont font, int c)\r
-{  return 0;\r
-}\r
-int GLUTAPIENTRY\r
-glutStrokeLength(GLUTstrokeFont font, const unsigned char *string)\r
-{ return 0;\r
-}\r
+/***********************************************************
+ *     Copyright (C) 1997, Be Inc.  All rights reserved.
+ *
+ *  FILE:      glutOverlay.cpp
+ *
+ *     DESCRIPTION:    we don't support overlays, so this code is
+ *             really simple
+ ***********************************************************/
+
+/***********************************************************
+ *     Headers
+ ***********************************************************/
+#include <GL/glut.h>
+#include "glutint.h"
+#include "glutbitmap.h"
+#include "glutstroke.h"
+
+GLUTAPI void GLUTAPIENTRY
+glutEstablishOverlay(void)
+{
+       __glutFatalError("OS2PM lacks overlay support.");
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutUseLayer(GLenum layer) {
+       // ignore
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutRemoveOverlay(void) {
+       // ignore
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutPostOverlayRedisplay(void) {
+       // ignore
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutShowOverlay(void) {
+       // ignore
+}
+
+GLUTAPI void GLUTAPIENTRY glutHideOverlay(void)
+{
+       // ignore
+}
+
+int GLUTAPIENTRY
+glutLayerGet(GLenum param)
+{
+       // ignore
+}
+
+/***********************************************************
+ *     Unsupported callbacks
+ ***********************************************************/
+GLUTAPI void GLUTAPIENTRY
+glutOverlayDisplayFunc(GLUTdisplayCB displayFunc)
+{
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc)
+{
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc)
+{
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc)
+{
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc)
+{
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutDialsFunc(GLUTdialsCB dialsFunc)
+{
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
+{
+}
+
+GLUTAPI void GLUTAPIENTRY
+glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
+{
+}
+GLUTAPI void GLUTAPIENTRY
+glutPostWindowOverlayRedisplay(int win)
+{ //
+}
+
+void GLUTAPIENTRY
+glutInitDisplayString(const char *string)
+{ //
+}
+void GLUTAPIENTRY
+glutJoystickFunc(GLUTjoystickCB joystickFunc, int pollInterval)
+{ //
+}
+
+void GLUTAPIENTRY
+glutForceJoystickFunc(void)
+{ //
+}
+
+
+int  GLUTAPIENTRY
+glutBitmapWidth(GLUTbitmapFont font, int c)
+{  return 0;
+}
+int  GLUTAPIENTRY
+glutBitmapLength(GLUTbitmapFont font, const unsigned char *string)
+{ //
+  return 0;
+}
+int GLUTAPIENTRY
+glutStrokeWidth(GLUTstrokeFont font, int c)
+{  return 0;
+}
+int GLUTAPIENTRY
+glutStrokeLength(GLUTstrokeFont font, const unsigned char *string)
+{ return 0;
+}
index e361e17cbfd471413cc655ce2a43c6ddd769b526..29ea6ea070a7cd077e54f69ce1c4ccde7db68502 100644 (file)
-\r
-/* GENERATED FILE -- DO NOT MODIFY */\r
-\r
-#define glutBitmap8By13 XXX\r
-#include "glutbitmap.h"\r
-#undef glutBitmap8By13\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch0data[] = { 0x0 };\r
-static const BitmapCharRec ch0 = {1,1,0,0,8,ch0data};\r
-#else\r
-static const BitmapCharRec ch0 = {0,0,0,0,8,0};\r
-#endif\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch32data[] = { 0x0 };\r
-static const BitmapCharRec ch32 = {1,1,0,0,8,ch32data};\r
-#else\r
-static const BitmapCharRec ch32 = {0,0,0,0,8,0};\r
-#endif\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch127data[] = { 0x0 };\r
-static const BitmapCharRec ch127 = {1,1,0,0,8,ch127data};\r
-#else\r
-static const BitmapCharRec ch127 = {0,0,0,0,8,0};\r
-#endif\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch160data[] = { 0x0 };\r
-static const BitmapCharRec ch160 = {1,1,0,0,8,ch160data};\r
-#else\r
-static const BitmapCharRec ch160 = {0,0,0,0,8,0};\r
-#endif\r
-\r
-/* char: 0xff */\r
-\r
-static const GLubyte ch255data[] = {\r
-0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch255 = {6,12,-1,2,8,ch255data};\r
-\r
-/* char: 0xfe */\r
-\r
-static const GLubyte ch254data[] = {\r
-0x80,0x80,0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch254 = {6,10,-1,2,8,ch254data};\r
-\r
-/* char: 0xfd */\r
-\r
-static const GLubyte ch253data[] = {\r
-0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch253 = {6,12,-1,2,8,ch253data};\r
-\r
-/* char: 0xfc */\r
-\r
-static const GLubyte ch252data[] = {\r
-0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch252 = {6,10,-1,0,8,ch252data};\r
-\r
-/* char: 0xfb */\r
-\r
-static const GLubyte ch251data[] = {\r
-0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch251 = {6,10,-1,0,8,ch251data};\r
-\r
-/* char: 0xfa */\r
-\r
-static const GLubyte ch250data[] = {\r
-0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch250 = {6,10,-1,0,8,ch250data};\r
-\r
-/* char: 0xf9 */\r
-\r
-static const GLubyte ch249data[] = {\r
-0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch249 = {6,10,-1,0,8,ch249data};\r
-\r
-/* char: 0xf8 */\r
-\r
-static const GLubyte ch248data[] = {\r
-0x80,0x78,0xc4,0xa4,0x94,0x8c,0x78,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch248 = {6,8,-1,1,8,ch248data};\r
-\r
-/* char: 0xf7 */\r
-\r
-static const GLubyte ch247data[] = {\r
-0x20,0x20,0x0,0xf8,0x0,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch247 = {5,7,-1,-1,8,ch247data};\r
-\r
-/* char: 0xf6 */\r
-\r
-static const GLubyte ch246data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch246 = {6,10,-1,0,8,ch246data};\r
-\r
-/* char: 0xf5 */\r
-\r
-static const GLubyte ch245data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch245 = {6,10,-1,0,8,ch245data};\r
-\r
-/* char: 0xf4 */\r
-\r
-static const GLubyte ch244data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch244 = {6,10,-1,0,8,ch244data};\r
-\r
-/* char: 0xf3 */\r
-\r
-static const GLubyte ch243data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch243 = {6,10,-1,0,8,ch243data};\r
-\r
-/* char: 0xf2 */\r
-\r
-static const GLubyte ch242data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch242 = {6,10,-1,0,8,ch242data};\r
-\r
-/* char: 0xf1 */\r
-\r
-static const GLubyte ch241data[] = {\r
-0x84,0x84,0x84,0x84,0xc4,0xb8,0x0,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch241 = {6,10,-1,0,8,ch241data};\r
-\r
-/* char: 0xf0 */\r
-\r
-static const GLubyte ch240data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x78,0x8,0x50,0x30,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch240 = {6,10,-1,0,8,ch240data};\r
-\r
-/* char: 0xef */\r
-\r
-static const GLubyte ch239data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x50,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch239 = {5,10,-1,0,8,ch239data};\r
-\r
-/* char: 0xee */\r
-\r
-static const GLubyte ch238data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch238 = {5,10,-1,0,8,ch238data};\r
-\r
-/* char: 0xed */\r
-\r
-static const GLubyte ch237data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch237 = {5,10,-1,0,8,ch237data};\r
-\r
-/* char: 0xec */\r
-\r
-static const GLubyte ch236data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch236 = {5,10,-1,0,8,ch236data};\r
-\r
-/* char: 0xeb */\r
-\r
-static const GLubyte ch235data[] = {\r
-0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch235 = {6,10,-1,0,8,ch235data};\r
-\r
-/* char: 0xea */\r
-\r
-static const GLubyte ch234data[] = {\r
-0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch234 = {6,10,-1,0,8,ch234data};\r
-\r
-/* char: 0xe9 */\r
-\r
-static const GLubyte ch233data[] = {\r
-0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch233 = {6,10,-1,0,8,ch233data};\r
-\r
-/* char: 0xe8 */\r
-\r
-static const GLubyte ch232data[] = {\r
-0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch232 = {6,10,-1,0,8,ch232data};\r
-\r
-/* char: 0xe7 */\r
-\r
-static const GLubyte ch231data[] = {\r
-0x20,0x10,0x78,0x84,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch231 = {6,8,-1,2,8,ch231data};\r
-\r
-/* char: 0xe6 */\r
-\r
-static const GLubyte ch230data[] = {\r
-0x6c,0x92,0x90,0x7c,0x12,0x6c,\r
-};\r
-\r
-static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data};\r
-\r
-/* char: 0xe5 */\r
-\r
-static const GLubyte ch229data[] = {\r
-0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x30,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch229 = {6,10,-1,0,8,ch229data};\r
-\r
-/* char: 0xe4 */\r
-\r
-static const GLubyte ch228data[] = {\r
-0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch228 = {6,10,-1,0,8,ch228data};\r
-\r
-/* char: 0xe3 */\r
-\r
-static const GLubyte ch227data[] = {\r
-0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch227 = {6,10,-1,0,8,ch227data};\r
-\r
-/* char: 0xe2 */\r
-\r
-static const GLubyte ch226data[] = {\r
-0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch226 = {6,10,-1,0,8,ch226data};\r
-\r
-/* char: 0xe1 */\r
-\r
-static const GLubyte ch225data[] = {\r
-0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch225 = {6,10,-1,0,8,ch225data};\r
-\r
-/* char: 0xe0 */\r
-\r
-static const GLubyte ch224data[] = {\r
-0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch224 = {6,10,-1,0,8,ch224data};\r
-\r
-/* char: 0xdf */\r
-\r
-static const GLubyte ch223data[] = {\r
-0x80,0xb8,0xc4,0x84,0x84,0xf8,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch223 = {6,9,-1,1,8,ch223data};\r
-\r
-/* char: 0xde */\r
-\r
-static const GLubyte ch222data[] = {\r
-0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data};\r
-\r
-/* char: 0xdd */\r
-\r
-static const GLubyte ch221data[] = {\r
-0x20,0x20,0x20,0x20,0x50,0x88,0x88,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch221 = {5,10,-1,0,8,ch221data};\r
-\r
-/* char: 0xdc */\r
-\r
-static const GLubyte ch220data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data};\r
-\r
-/* char: 0xdb */\r
-\r
-static const GLubyte ch219data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch219 = {6,10,-1,0,8,ch219data};\r
-\r
-/* char: 0xda */\r
-\r
-static const GLubyte ch218data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch218 = {6,10,-1,0,8,ch218data};\r
-\r
-/* char: 0xd9 */\r
-\r
-static const GLubyte ch217data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch217 = {6,10,-1,0,8,ch217data};\r
-\r
-/* char: 0xd8 */\r
-\r
-static const GLubyte ch216data[] = {\r
-0x80,0x78,0xc4,0xa4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch216 = {6,11,-1,1,8,ch216data};\r
-\r
-/* char: 0xd7 */\r
-\r
-static const GLubyte ch215data[] = {\r
-0x84,0x48,0x30,0x30,0x48,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch215 = {6,6,-1,-1,8,ch215data};\r
-\r
-/* char: 0xd6 */\r
-\r
-static const GLubyte ch214data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch214 = {7,10,0,0,8,ch214data};\r
-\r
-/* char: 0xd5 */\r
-\r
-static const GLubyte ch213data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x14,\r
-};\r
-\r
-static const BitmapCharRec ch213 = {7,10,0,0,8,ch213data};\r
-\r
-/* char: 0xd4 */\r
-\r
-static const GLubyte ch212data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x24,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch212 = {7,10,0,0,8,ch212data};\r
-\r
-/* char: 0xd3 */\r
-\r
-static const GLubyte ch211data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch211 = {7,10,0,0,8,ch211data};\r
-\r
-/* char: 0xd2 */\r
-\r
-static const GLubyte ch210data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x8,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch210 = {7,10,0,0,8,ch210data};\r
-\r
-/* char: 0xd1 */\r
-\r
-static const GLubyte ch209data[] = {\r
-0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x0,0x28,0x14,\r
-};\r
-\r
-static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data};\r
-\r
-/* char: 0xd0 */\r
-\r
-static const GLubyte ch208data[] = {\r
-0xfc,0x42,0x42,0x42,0xe2,0x42,0x42,0x42,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch208 = {7,9,0,0,8,ch208data};\r
-\r
-/* char: 0xcf */\r
-\r
-static const GLubyte ch207data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch207 = {5,10,-1,0,8,ch207data};\r
-\r
-/* char: 0xce */\r
-\r
-static const GLubyte ch206data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch206 = {5,10,-1,0,8,ch206data};\r
-\r
-/* char: 0xcd */\r
-\r
-static const GLubyte ch205data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch205 = {5,10,-1,0,8,ch205data};\r
-\r
-/* char: 0xcc */\r
-\r
-static const GLubyte ch204data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch204 = {5,10,-1,0,8,ch204data};\r
-\r
-/* char: 0xcb */\r
-\r
-static const GLubyte ch203data[] = {\r
-0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch203 = {6,10,-1,0,8,ch203data};\r
-\r
-/* char: 0xca */\r
-\r
-static const GLubyte ch202data[] = {\r
-0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch202 = {6,10,-1,0,8,ch202data};\r
-\r
-/* char: 0xc9 */\r
-\r
-static const GLubyte ch201data[] = {\r
-0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch201 = {6,10,-1,0,8,ch201data};\r
-\r
-/* char: 0xc8 */\r
-\r
-static const GLubyte ch200data[] = {\r
-0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch200 = {6,10,-1,0,8,ch200data};\r
-\r
-/* char: 0xc7 */\r
-\r
-static const GLubyte ch199data[] = {\r
-0x20,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch199 = {6,11,-1,2,8,ch199data};\r
-\r
-/* char: 0xc6 */\r
-\r
-static const GLubyte ch198data[] = {\r
-0x9e,0x90,0x90,0xf0,0x9c,0x90,0x90,0x90,0x6e,\r
-};\r
-\r
-static const BitmapCharRec ch198 = {7,9,0,0,8,ch198data};\r
-\r
-/* char: 0xc5 */\r
-\r
-static const GLubyte ch197data[] = {\r
-0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x30,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch197 = {6,10,-1,0,8,ch197data};\r
-\r
-/* char: 0xc4 */\r
-\r
-static const GLubyte ch196data[] = {\r
-0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch196 = {6,10,-1,0,8,ch196data};\r
-\r
-/* char: 0xc3 */\r
-\r
-static const GLubyte ch195data[] = {\r
-0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch195 = {6,10,-1,0,8,ch195data};\r
-\r
-/* char: 0xc2 */\r
-\r
-static const GLubyte ch194data[] = {\r
-0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch194 = {6,10,-1,0,8,ch194data};\r
-\r
-/* char: 0xc1 */\r
-\r
-static const GLubyte ch193data[] = {\r
-0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch193 = {6,10,-1,0,8,ch193data};\r
-\r
-/* char: 0xc0 */\r
-\r
-static const GLubyte ch192data[] = {\r
-0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch192 = {6,10,-1,0,8,ch192data};\r
-\r
-/* char: 0xbf */\r
-\r
-static const GLubyte ch191data[] = {\r
-0x78,0x84,0x84,0x80,0x40,0x20,0x20,0x0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch191 = {6,9,-1,0,8,ch191data};\r
-\r
-/* char: 0xbe */\r
-\r
-static const GLubyte ch190data[] = {\r
-0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch190 = {7,10,0,0,8,ch190data};\r
-\r
-/* char: 0xbd */\r
-\r
-static const GLubyte ch189data[] = {\r
-0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch189 = {7,10,0,0,8,ch189data};\r
-\r
-/* char: 0xbc */\r
-\r
-static const GLubyte ch188data[] = {\r
-0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch188 = {7,10,0,0,8,ch188data};\r
-\r
-/* char: 0xbb */\r
-\r
-static const GLubyte ch187data[] = {\r
-0x90,0x48,0x24,0x12,0x24,0x48,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch187 = {7,7,0,-1,8,ch187data};\r
-\r
-/* char: 0xba */\r
-\r
-static const GLubyte ch186data[] = {\r
-0xf0,0x0,0x60,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch186 = {4,6,-1,-3,8,ch186data};\r
-\r
-/* char: 0xb9 */\r
-\r
-static const GLubyte ch185data[] = {\r
-0xe0,0x40,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch185 = {3,6,-1,-4,8,ch185data};\r
-\r
-/* char: 0xb8 */\r
-\r
-static const GLubyte ch184data[] = {\r
-0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch184 = {2,2,-3,2,8,ch184data};\r
-\r
-/* char: 0xb7 */\r
-\r
-static const GLubyte ch183data[] = {\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch183 = {2,1,-3,-4,8,ch183data};\r
-\r
-/* char: 0xb6 */\r
-\r
-static const GLubyte ch182data[] = {\r
-0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch182 = {6,9,-1,0,8,ch182data};\r
-\r
-/* char: 0xb5 */\r
-\r
-static const GLubyte ch181data[] = {\r
-0x80,0xb4,0xcc,0x84,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch181 = {6,7,-1,1,8,ch181data};\r
-\r
-/* char: 0xb4 */\r
-\r
-static const GLubyte ch180data[] = {\r
-0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch180 = {2,2,-3,-8,8,ch180data};\r
-\r
-/* char: 0xb3 */\r
-\r
-static const GLubyte ch179data[] = {\r
-0x60,0x90,0x10,0x20,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch179 = {4,6,-1,-4,8,ch179data};\r
-\r
-/* char: 0xb2 */\r
-\r
-static const GLubyte ch178data[] = {\r
-0xf0,0x80,0x60,0x10,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch178 = {4,6,-1,-4,8,ch178data};\r
-\r
-/* char: 0xb1 */\r
-\r
-static const GLubyte ch177data[] = {\r
-0xf8,0x0,0x20,0x20,0xf8,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch177 = {5,7,-1,-1,8,ch177data};\r
-\r
-/* char: 0xb0 */\r
-\r
-static const GLubyte ch176data[] = {\r
-0x60,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch176 = {4,4,-2,-5,8,ch176data};\r
-\r
-/* char: 0xaf */\r
-\r
-static const GLubyte ch175data[] = {\r
-0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch175 = {6,1,-1,-8,8,ch175data};\r
-\r
-/* char: 0xae */\r
-\r
-static const GLubyte ch174data[] = {\r
-0x38,0x44,0xaa,0xb2,0xaa,0xaa,0x92,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch174 = {7,9,0,-1,8,ch174data};\r
-\r
-/* char: 0xad */\r
-\r
-static const GLubyte ch173data[] = {\r
-0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch173 = {6,1,-1,-4,8,ch173data};\r
-\r
-/* char: 0xac */\r
-\r
-static const GLubyte ch172data[] = {\r
-0x4,0x4,0x4,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch172 = {6,4,-1,-1,8,ch172data};\r
-\r
-/* char: 0xab */\r
-\r
-static const GLubyte ch171data[] = {\r
-0x12,0x24,0x48,0x90,0x48,0x24,0x12,\r
-};\r
-\r
-static const BitmapCharRec ch171 = {7,7,0,-1,8,ch171data};\r
-\r
-/* char: 0xaa */\r
-\r
-static const GLubyte ch170data[] = {\r
-0xf8,0x0,0x78,0x88,0x78,0x8,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch170 = {5,7,-1,-2,8,ch170data};\r
-\r
-/* char: 0xa9 */\r
-\r
-static const GLubyte ch169data[] = {\r
-0x38,0x44,0x92,0xaa,0xa2,0xaa,0x92,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch169 = {7,9,0,-1,8,ch169data};\r
-\r
-/* char: 0xa8 */\r
-\r
-static const GLubyte ch168data[] = {\r
-0xd8,\r
-};\r
-\r
-static const BitmapCharRec ch168 = {5,1,-1,-8,8,ch168data};\r
-\r
-/* char: 0xa7 */\r
-\r
-static const GLubyte ch167data[] = {\r
-0x60,0x90,0x10,0x60,0x90,0x90,0x60,0x80,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch167 = {4,10,-2,0,8,ch167data};\r
-\r
-/* char: 0xa6 */\r
-\r
-static const GLubyte ch166data[] = {\r
-0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch166 = {1,9,-3,0,8,ch166data};\r
-\r
-/* char: 0xa5 */\r
-\r
-static const GLubyte ch165data[] = {\r
-0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch165 = {7,9,0,0,8,ch165data};\r
-\r
-/* char: 0xa4 */\r
-\r
-static const GLubyte ch164data[] = {\r
-0x84,0x78,0x48,0x48,0x78,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch164 = {6,6,-1,-1,8,ch164data};\r
-\r
-/* char: 0xa3 */\r
-\r
-static const GLubyte ch163data[] = {\r
-0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c,\r
-};\r
-\r
-static const BitmapCharRec ch163 = {7,9,0,0,8,ch163data};\r
-\r
-/* char: 0xa2 */\r
-\r
-static const GLubyte ch162data[] = {\r
-0x20,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch162 = {5,8,-1,-1,8,ch162data};\r
-\r
-/* char: 0xa1 */\r
-\r
-static const GLubyte ch161data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch161 = {1,9,-3,0,8,ch161data};\r
-\r
-/* char: 0x7e '~' */\r
-\r
-static const GLubyte ch126data[] = {\r
-0x90,0xa8,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch126 = {5,3,-1,-6,8,ch126data};\r
-\r
-/* char: 0x7d '}' */\r
-\r
-static const GLubyte ch125data[] = {\r
-0xe0,0x10,0x10,0x20,0x18,0x20,0x10,0x10,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch125 = {5,9,-1,0,8,ch125data};\r
-\r
-/* char: 0x7c '|' */\r
-\r
-static const GLubyte ch124data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch124 = {1,9,-3,0,8,ch124data};\r
-\r
-/* char: 0x7b '{' */\r
-\r
-static const GLubyte ch123data[] = {\r
-0x38,0x40,0x40,0x20,0xc0,0x20,0x40,0x40,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch123 = {5,9,-2,0,8,ch123data};\r
-\r
-/* char: 0x7a 'z' */\r
-\r
-static const GLubyte ch122data[] = {\r
-0xfc,0x40,0x20,0x10,0x8,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch122 = {6,6,-1,0,8,ch122data};\r
-\r
-/* char: 0x79 'y' */\r
-\r
-static const GLubyte ch121data[] = {\r
-0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch121 = {6,8,-1,2,8,ch121data};\r
-\r
-/* char: 0x78 'x' */\r
-\r
-static const GLubyte ch120data[] = {\r
-0x84,0x48,0x30,0x30,0x48,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch120 = {6,6,-1,0,8,ch120data};\r
-\r
-/* char: 0x77 'w' */\r
-\r
-static const GLubyte ch119data[] = {\r
-0x44,0xaa,0x92,0x92,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data};\r
-\r
-/* char: 0x76 'v' */\r
-\r
-static const GLubyte ch118data[] = {\r
-0x20,0x50,0x50,0x88,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch118 = {5,6,-1,0,8,ch118data};\r
-\r
-/* char: 0x75 'u' */\r
-\r
-static const GLubyte ch117data[] = {\r
-0x74,0x88,0x88,0x88,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch117 = {6,6,-1,0,8,ch117data};\r
-\r
-/* char: 0x74 't' */\r
-\r
-static const GLubyte ch116data[] = {\r
-0x38,0x44,0x40,0x40,0x40,0xf8,0x40,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch116 = {6,8,-1,0,8,ch116data};\r
-\r
-/* char: 0x73 's' */\r
-\r
-static const GLubyte ch115data[] = {\r
-0x78,0x84,0x18,0x60,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch115 = {6,6,-1,0,8,ch115data};\r
-\r
-/* char: 0x72 'r' */\r
-\r
-static const GLubyte ch114data[] = {\r
-0x40,0x40,0x40,0x40,0x44,0xb8,\r
-};\r
-\r
-static const BitmapCharRec ch114 = {6,6,-1,0,8,ch114data};\r
-\r
-/* char: 0x71 'q' */\r
-\r
-static const GLubyte ch113data[] = {\r
-0x4,0x4,0x4,0x74,0x8c,0x84,0x8c,0x74,\r
-};\r
-\r
-static const BitmapCharRec ch113 = {6,8,-1,2,8,ch113data};\r
-\r
-/* char: 0x70 'p' */\r
-\r
-static const GLubyte ch112data[] = {\r
-0x80,0x80,0x80,0xb8,0xc4,0x84,0xc4,0xb8,\r
-};\r
-\r
-static const BitmapCharRec ch112 = {6,8,-1,2,8,ch112data};\r
-\r
-/* char: 0x6f 'o' */\r
-\r
-static const GLubyte ch111data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch111 = {6,6,-1,0,8,ch111data};\r
-\r
-/* char: 0x6e 'n' */\r
-\r
-static const GLubyte ch110data[] = {\r
-0x84,0x84,0x84,0x84,0xc4,0xb8,\r
-};\r
-\r
-static const BitmapCharRec ch110 = {6,6,-1,0,8,ch110data};\r
-\r
-/* char: 0x6d 'm' */\r
-\r
-static const GLubyte ch109data[] = {\r
-0x82,0x92,0x92,0x92,0x92,0xec,\r
-};\r
-\r
-static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data};\r
-\r
-/* char: 0x6c 'l' */\r
-\r
-static const GLubyte ch108data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch108 = {5,9,-1,0,8,ch108data};\r
-\r
-/* char: 0x6b 'k' */\r
-\r
-static const GLubyte ch107data[] = {\r
-0x84,0x88,0x90,0xe0,0x90,0x88,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch107 = {6,9,-1,0,8,ch107data};\r
-\r
-/* char: 0x6a 'j' */\r
-\r
-static const GLubyte ch106data[] = {\r
-0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x18,0x0,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch106 = {5,10,-1,2,8,ch106data};\r
-\r
-/* char: 0x69 'i' */\r
-\r
-static const GLubyte ch105data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch105 = {5,8,-1,0,8,ch105data};\r
-\r
-/* char: 0x68 'h' */\r
-\r
-static const GLubyte ch104data[] = {\r
-0x84,0x84,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch104 = {6,9,-1,0,8,ch104data};\r
-\r
-/* char: 0x67 'g' */\r
-\r
-static const GLubyte ch103data[] = {\r
-0x78,0x84,0x78,0x80,0x70,0x88,0x88,0x74,\r
-};\r
-\r
-static const BitmapCharRec ch103 = {6,8,-1,2,8,ch103data};\r
-\r
-/* char: 0x66 'f' */\r
-\r
-static const GLubyte ch102data[] = {\r
-0x40,0x40,0x40,0x40,0xf8,0x40,0x40,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch102 = {6,9,-1,0,8,ch102data};\r
-\r
-/* char: 0x65 'e' */\r
-\r
-static const GLubyte ch101data[] = {\r
-0x78,0x84,0x80,0xfc,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch101 = {6,6,-1,0,8,ch101data};\r
-\r
-/* char: 0x64 'd' */\r
-\r
-static const GLubyte ch100data[] = {\r
-0x74,0x8c,0x84,0x84,0x8c,0x74,0x4,0x4,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch100 = {6,9,-1,0,8,ch100data};\r
-\r
-/* char: 0x63 'c' */\r
-\r
-static const GLubyte ch99data[] = {\r
-0x78,0x84,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch99 = {6,6,-1,0,8,ch99data};\r
-\r
-/* char: 0x62 'b' */\r
-\r
-static const GLubyte ch98data[] = {\r
-0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch98 = {6,9,-1,0,8,ch98data};\r
-\r
-/* char: 0x61 'a' */\r
-\r
-static const GLubyte ch97data[] = {\r
-0x74,0x8c,0x84,0x7c,0x4,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch97 = {6,6,-1,0,8,ch97data};\r
-\r
-/* char: 0x60 '`' */\r
-\r
-static const GLubyte ch96data[] = {\r
-0x10,0x60,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch96 = {4,3,-2,-6,8,ch96data};\r
-\r
-/* char: 0x5f '_' */\r
-\r
-static const GLubyte ch95data[] = {\r
-0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch95 = {7,1,0,1,8,ch95data};\r
-\r
-/* char: 0x5e '^' */\r
-\r
-static const GLubyte ch94data[] = {\r
-0x88,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch94 = {5,3,-1,-6,8,ch94data};\r
-\r
-/* char: 0x5d ']' */\r
-\r
-static const GLubyte ch93data[] = {\r
-0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch93 = {4,9,-1,0,8,ch93data};\r
-\r
-/* char: 0x5c '\' */\r
-\r
-static const GLubyte ch92data[] = {\r
-0x2,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch92 = {7,9,0,0,8,ch92data};\r
-\r
-/* char: 0x5b '[' */\r
-\r
-static const GLubyte ch91data[] = {\r
-0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch91 = {4,9,-2,0,8,ch91data};\r
-\r
-/* char: 0x5a 'Z' */\r
-\r
-static const GLubyte ch90data[] = {\r
-0xfc,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch90 = {6,9,-1,0,8,ch90data};\r
-\r
-/* char: 0x59 'Y' */\r
-\r
-static const GLubyte ch89data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch89 = {7,9,0,0,8,ch89data};\r
-\r
-/* char: 0x58 'X' */\r
-\r
-static const GLubyte ch88data[] = {\r
-0x82,0x82,0x44,0x28,0x10,0x28,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch88 = {7,9,0,0,8,ch88data};\r
-\r
-/* char: 0x57 'W' */\r
-\r
-static const GLubyte ch87data[] = {\r
-0x44,0xaa,0x92,0x92,0x92,0x82,0x82,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch87 = {7,9,0,0,8,ch87data};\r
-\r
-/* char: 0x56 'V' */\r
-\r
-static const GLubyte ch86data[] = {\r
-0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch86 = {7,9,0,0,8,ch86data};\r
-\r
-/* char: 0x55 'U' */\r
-\r
-static const GLubyte ch85data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data};\r
-\r
-/* char: 0x54 'T' */\r
-\r
-static const GLubyte ch84data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch84 = {7,9,0,0,8,ch84data};\r
-\r
-/* char: 0x53 'S' */\r
-\r
-static const GLubyte ch83data[] = {\r
-0x78,0x84,0x4,0x4,0x78,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data};\r
-\r
-/* char: 0x52 'R' */\r
-\r
-static const GLubyte ch82data[] = {\r
-0x84,0x88,0x90,0xa0,0xf8,0x84,0x84,0x84,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data};\r
-\r
-/* char: 0x51 'Q' */\r
-\r
-static const GLubyte ch81data[] = {\r
-0x4,0x78,0x94,0xa4,0x84,0x84,0x84,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch81 = {6,10,-1,1,8,ch81data};\r
-\r
-/* char: 0x50 'P' */\r
-\r
-static const GLubyte ch80data[] = {\r
-0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data};\r
-\r
-/* char: 0x4f 'O' */\r
-\r
-static const GLubyte ch79data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch79 = {6,9,-1,0,8,ch79data};\r
-\r
-/* char: 0x4e 'N' */\r
-\r
-static const GLubyte ch78data[] = {\r
-0x84,0x84,0x84,0x8c,0x94,0xa4,0xc4,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch78 = {6,9,-1,0,8,ch78data};\r
-\r
-/* char: 0x4d 'M' */\r
-\r
-static const GLubyte ch77data[] = {\r
-0x82,0x82,0x82,0x92,0x92,0xaa,0xc6,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch77 = {7,9,0,0,8,ch77data};\r
-\r
-/* char: 0x4c 'L' */\r
-\r
-static const GLubyte ch76data[] = {\r
-0xfc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch76 = {6,9,-1,0,8,ch76data};\r
-\r
-/* char: 0x4b 'K' */\r
-\r
-static const GLubyte ch75data[] = {\r
-0x84,0x88,0x90,0xa0,0xc0,0xa0,0x90,0x88,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch75 = {6,9,-1,0,8,ch75data};\r
-\r
-/* char: 0x4a 'J' */\r
-\r
-static const GLubyte ch74data[] = {\r
-0x70,0x88,0x8,0x8,0x8,0x8,0x8,0x8,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch74 = {6,9,-1,0,8,ch74data};\r
-\r
-/* char: 0x49 'I' */\r
-\r
-static const GLubyte ch73data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch73 = {5,9,-1,0,8,ch73data};\r
-\r
-/* char: 0x48 'H' */\r
-\r
-static const GLubyte ch72data[] = {\r
-0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch72 = {6,9,-1,0,8,ch72data};\r
-\r
-/* char: 0x47 'G' */\r
-\r
-static const GLubyte ch71data[] = {\r
-0x74,0x8c,0x84,0x9c,0x80,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch71 = {6,9,-1,0,8,ch71data};\r
-\r
-/* char: 0x46 'F' */\r
-\r
-static const GLubyte ch70data[] = {\r
-0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data};\r
-\r
-/* char: 0x45 'E' */\r
-\r
-static const GLubyte ch69data[] = {\r
-0xfc,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data};\r
-\r
-/* char: 0x44 'D' */\r
-\r
-static const GLubyte ch68data[] = {\r
-0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch68 = {7,9,0,0,8,ch68data};\r
-\r
-/* char: 0x43 'C' */\r
-\r
-static const GLubyte ch67data[] = {\r
-0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch67 = {6,9,-1,0,8,ch67data};\r
-\r
-/* char: 0x42 'B' */\r
-\r
-static const GLubyte ch66data[] = {\r
-0xfc,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch66 = {7,9,0,0,8,ch66data};\r
-\r
-/* char: 0x41 'A' */\r
-\r
-static const GLubyte ch65data[] = {\r
-0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch65 = {6,9,-1,0,8,ch65data};\r
-\r
-/* char: 0x40 '@' */\r
-\r
-static const GLubyte ch64data[] = {\r
-0x78,0x80,0x94,0xac,0xa4,0x9c,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch64 = {6,9,-1,0,8,ch64data};\r
-\r
-/* char: 0x3f '?' */\r
-\r
-static const GLubyte ch63data[] = {\r
-0x10,0x0,0x10,0x10,0x8,0x4,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch63 = {6,9,-1,0,8,ch63data};\r
-\r
-/* char: 0x3e '>' */\r
-\r
-static const GLubyte ch62data[] = {\r
-0x80,0x40,0x20,0x10,0x8,0x10,0x20,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch62 = {5,9,-1,0,8,ch62data};\r
-\r
-/* char: 0x3d '=' */\r
-\r
-static const GLubyte ch61data[] = {\r
-0xfc,0x0,0x0,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch61 = {6,4,-1,-2,8,ch61data};\r
-\r
-/* char: 0x3c '<' */\r
-\r
-static const GLubyte ch60data[] = {\r
-0x8,0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch60 = {5,9,-2,0,8,ch60data};\r
-\r
-/* char: 0x3b ';' */\r
-\r
-static const GLubyte ch59data[] = {\r
-0x80,0x60,0x70,0x0,0x0,0x20,0x70,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch59 = {4,8,-1,1,8,ch59data};\r
-\r
-/* char: 0x3a ':' */\r
-\r
-static const GLubyte ch58data[] = {\r
-0x40,0xe0,0x40,0x0,0x0,0x40,0xe0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch58 = {3,8,-2,1,8,ch58data};\r
-\r
-/* char: 0x39 '9' */\r
-\r
-static const GLubyte ch57data[] = {\r
-0x70,0x8,0x4,0x4,0x74,0x8c,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch57 = {6,9,-1,0,8,ch57data};\r
-\r
-/* char: 0x38 '8' */\r
-\r
-static const GLubyte ch56data[] = {\r
-0x78,0x84,0x84,0x84,0x78,0x84,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch56 = {6,9,-1,0,8,ch56data};\r
-\r
-/* char: 0x37 '7' */\r
-\r
-static const GLubyte ch55data[] = {\r
-0x40,0x40,0x20,0x20,0x10,0x10,0x8,0x4,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch55 = {6,9,-1,0,8,ch55data};\r
-\r
-/* char: 0x36 '6' */\r
-\r
-static const GLubyte ch54data[] = {\r
-0x78,0x84,0x84,0xc4,0xb8,0x80,0x80,0x40,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch54 = {6,9,-1,0,8,ch54data};\r
-\r
-/* char: 0x35 '5' */\r
-\r
-static const GLubyte ch53data[] = {\r
-0x78,0x84,0x4,0x4,0xc4,0xb8,0x80,0x80,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch53 = {6,9,-1,0,8,ch53data};\r
-\r
-/* char: 0x34 '4' */\r
-\r
-static const GLubyte ch52data[] = {\r
-0x8,0x8,0xfc,0x88,0x88,0x48,0x28,0x18,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch52 = {6,9,-1,0,8,ch52data};\r
-\r
-/* char: 0x33 '3' */\r
-\r
-static const GLubyte ch51data[] = {\r
-0x78,0x84,0x4,0x4,0x38,0x10,0x8,0x4,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch51 = {6,9,-1,0,8,ch51data};\r
-\r
-/* char: 0x32 '2' */\r
-\r
-static const GLubyte ch50data[] = {\r
-0xfc,0x80,0x40,0x30,0x8,0x4,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch50 = {6,9,-1,0,8,ch50data};\r
-\r
-/* char: 0x31 '1' */\r
-\r
-static const GLubyte ch49data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch49 = {5,9,-1,0,8,ch49data};\r
-\r
-/* char: 0x30 '0' */\r
-\r
-static const GLubyte ch48data[] = {\r
-0x30,0x48,0x84,0x84,0x84,0x84,0x84,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch48 = {6,9,-1,0,8,ch48data};\r
-\r
-/* char: 0x2f '/' */\r
-\r
-static const GLubyte ch47data[] = {\r
-0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch47 = {7,9,0,0,8,ch47data};\r
-\r
-/* char: 0x2e '.' */\r
-\r
-static const GLubyte ch46data[] = {\r
-0x40,0xe0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch46 = {3,3,-2,1,8,ch46data};\r
-\r
-/* char: 0x2d '-' */\r
-\r
-static const GLubyte ch45data[] = {\r
-0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch45 = {6,1,-1,-4,8,ch45data};\r
-\r
-/* char: 0x2c ',' */\r
-\r
-static const GLubyte ch44data[] = {\r
-0x80,0x60,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch44 = {4,3,-1,1,8,ch44data};\r
-\r
-/* char: 0x2b '+' */\r
-\r
-static const GLubyte ch43data[] = {\r
-0x20,0x20,0xf8,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch43 = {5,5,-1,-2,8,ch43data};\r
-\r
-/* char: 0x2a '*' */\r
-\r
-static const GLubyte ch42data[] = {\r
-0x48,0x30,0xfc,0x30,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch42 = {6,5,-1,-2,8,ch42data};\r
-\r
-/* char: 0x29 ')' */\r
-\r
-static const GLubyte ch41data[] = {\r
-0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch41 = {3,9,-2,0,8,ch41data};\r
-\r
-/* char: 0x28 '(' */\r
-\r
-static const GLubyte ch40data[] = {\r
-0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch40 = {3,9,-3,0,8,ch40data};\r
-\r
-/* char: 0x27 ''' */\r
-\r
-static const GLubyte ch39data[] = {\r
-0x80,0x60,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch39 = {4,3,-1,-6,8,ch39data};\r
-\r
-/* char: 0x26 '&' */\r
-\r
-static const GLubyte ch38data[] = {\r
-0x74,0x88,0x94,0x60,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch38 = {6,7,-1,0,8,ch38data};\r
-\r
-/* char: 0x25 '%' */\r
-\r
-static const GLubyte ch37data[] = {\r
-0x88,0x54,0x48,0x20,0x10,0x10,0x48,0xa4,0x44,\r
-};\r
-\r
-static const BitmapCharRec ch37 = {6,9,-1,0,8,ch37data};\r
-\r
-/* char: 0x24 '$' */\r
-\r
-static const GLubyte ch36data[] = {\r
-0x20,0xf0,0x28,0x70,0xa0,0x78,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch36 = {5,7,-1,-1,8,ch36data};\r
-\r
-/* char: 0x23 '#' */\r
-\r
-static const GLubyte ch35data[] = {\r
-0x48,0x48,0xfc,0x48,0xfc,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch35 = {6,7,-1,-1,8,ch35data};\r
-\r
-/* char: 0x22 '"' */\r
-\r
-static const GLubyte ch34data[] = {\r
-0x90,0x90,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch34 = {4,3,-2,-6,8,ch34data};\r
-\r
-/* char: 0x21 '!' */\r
-\r
-static const GLubyte ch33data[] = {\r
-0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch33 = {1,9,-3,0,8,ch33data};\r
-\r
-/* char: 0x1f */\r
-\r
-static const GLubyte ch31data[] = {\r
-0x80,\r
-};\r
-\r
-static const BitmapCharRec ch31 = {1,1,-3,-3,8,ch31data};\r
-\r
-/* char: 0x1e */\r
-\r
-static const GLubyte ch30data[] = {\r
-0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c,\r
-};\r
-\r
-static const BitmapCharRec ch30 = {7,9,0,0,8,ch30data};\r
-\r
-/* char: 0x1d */\r
-\r
-static const GLubyte ch29data[] = {\r
-0x80,0x40,0xfe,0x10,0xfe,0x4,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch29 = {7,7,0,0,8,ch29data};\r
-\r
-/* char: 0x1c */\r
-\r
-static const GLubyte ch28data[] = {\r
-0x88,0x48,0x48,0x48,0x48,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch28 = {6,6,-1,0,8,ch28data};\r
-\r
-/* char: 0x1b */\r
-\r
-static const GLubyte ch27data[] = {\r
-0xfe,0x80,0x20,0x8,0x2,0x8,0x20,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch27 = {7,8,0,0,8,ch27data};\r
-\r
-/* char: 0x1a */\r
-\r
-static const GLubyte ch26data[] = {\r
-0xfe,0x2,0x8,0x20,0x80,0x20,0x8,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch26 = {7,8,0,0,8,ch26data};\r
-\r
-/* char: 0x19 */\r
-\r
-static const GLubyte ch25data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch25 = {1,13,-3,2,8,ch25data};\r
-\r
-/* char: 0x18 */\r
-\r
-static const GLubyte ch24data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0xff,\r
-};\r
-\r
-static const BitmapCharRec ch24 = {8,6,0,2,8,ch24data};\r
-\r
-/* char: 0x17 */\r
-\r
-static const GLubyte ch23data[] = {\r
-0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch23 = {8,8,0,-3,8,ch23data};\r
-\r
-/* char: 0x16 */\r
-\r
-static const GLubyte ch22data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch22 = {4,13,0,2,8,ch22data};\r
-\r
-/* char: 0x15 */\r
-\r
-static const GLubyte ch21data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch21 = {5,13,-3,2,8,ch21data};\r
-\r
-/* char: 0x14 */\r
-\r
-static const GLubyte ch20data[] = {\r
-0xff,\r
-};\r
-\r
-static const BitmapCharRec ch20 = {8,1,0,1,8,ch20data};\r
-\r
-/* char: 0x13 */\r
-\r
-static const GLubyte ch19data[] = {\r
-0xff,\r
-};\r
-\r
-static const BitmapCharRec ch19 = {8,1,0,-1,8,ch19data};\r
-\r
-/* char: 0x12 */\r
-\r
-static const GLubyte ch18data[] = {\r
-0xff,\r
-};\r
-\r
-static const BitmapCharRec ch18 = {8,1,0,-3,8,ch18data};\r
-\r
-/* char: 0x11 */\r
-\r
-static const GLubyte ch17data[] = {\r
-0xff,\r
-};\r
-\r
-static const BitmapCharRec ch17 = {8,1,0,-5,8,ch17data};\r
-\r
-/* char: 0x10 */\r
-\r
-static const GLubyte ch16data[] = {\r
-0xff,\r
-};\r
-\r
-static const BitmapCharRec ch16 = {8,1,0,-7,8,ch16data};\r
-\r
-/* char: 0xf */\r
-\r
-static const GLubyte ch15data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch15 = {8,13,0,2,8,ch15data};\r
-\r
-/* char: 0xe */\r
-\r
-static const GLubyte ch14data[] = {\r
-0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch14 = {5,8,-3,-3,8,ch14data};\r
-\r
-/* char: 0xd */\r
-\r
-static const GLubyte ch13data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch13 = {5,6,-3,2,8,ch13data};\r
-\r
-/* char: 0xc */\r
-\r
-static const GLubyte ch12data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch12 = {4,6,0,2,8,ch12data};\r
-\r
-/* char: 0xb */\r
-\r
-static const GLubyte ch11data[] = {\r
-0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch11 = {4,8,0,-3,8,ch11data};\r
-\r
-/* char: 0xa */\r
-\r
-static const GLubyte ch10data[] = {\r
-0x8,0x8,0x8,0x8,0x3e,0x20,0x50,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch10 = {7,9,0,2,8,ch10data};\r
-\r
-/* char: 0x9 */\r
-\r
-static const GLubyte ch9data[] = {\r
-0x3e,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch9 = {7,9,0,2,8,ch9data};\r
-\r
-/* char: 0x8 */\r
-\r
-static const GLubyte ch8data[] = {\r
-0xfe,0x10,0x10,0xfe,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch8 = {7,6,0,0,8,ch8data};\r
-\r
-/* char: 0x7 */\r
-\r
-static const GLubyte ch7data[] = {\r
-0x70,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch7 = {5,4,-1,-5,8,ch7data};\r
-\r
-/* char: 0x6 */\r
-\r
-static const GLubyte ch6data[] = {\r
-0x20,0x20,0x3c,0x20,0x3e,0xf8,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch6 = {7,9,0,2,8,ch6data};\r
-\r
-/* char: 0x5 */\r
-\r
-static const GLubyte ch5data[] = {\r
-0x22,0x22,0x3c,0x22,0x3c,0x78,0x80,0x80,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch5 = {7,9,0,2,8,ch5data};\r
-\r
-/* char: 0x4 */\r
-\r
-static const GLubyte ch4data[] = {\r
-0x10,0x10,0x1c,0x10,0x9e,0x80,0xe0,0x80,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch4 = {7,9,0,2,8,ch4data};\r
-\r
-/* char: 0x3 */\r
-\r
-static const GLubyte ch3data[] = {\r
-0x8,0x8,0x8,0x3e,0x88,0x88,0xf8,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch3 = {7,9,0,2,8,ch3data};\r
-\r
-/* char: 0x2 */\r
-\r
-static const GLubyte ch2data[] = {\r
-0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,\r
-};\r
-\r
-static const BitmapCharRec ch2 = {8,12,0,2,8,ch2data};\r
-\r
-/* char: 0x1 */\r
-\r
-static const GLubyte ch1data[] = {\r
-0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch1 = {7,7,0,-1,8,ch1data};\r
-\r
-static const BitmapCharRec * const chars[] = {\r
-&ch0,\r
-&ch1,\r
-&ch2,\r
-&ch3,\r
-&ch4,\r
-&ch5,\r
-&ch6,\r
-&ch7,\r
-&ch8,\r
-&ch9,\r
-&ch10,\r
-&ch11,\r
-&ch12,\r
-&ch13,\r
-&ch14,\r
-&ch15,\r
-&ch16,\r
-&ch17,\r
-&ch18,\r
-&ch19,\r
-&ch20,\r
-&ch21,\r
-&ch22,\r
-&ch23,\r
-&ch24,\r
-&ch25,\r
-&ch26,\r
-&ch27,\r
-&ch28,\r
-&ch29,\r
-&ch30,\r
-&ch31,\r
-&ch32,\r
-&ch33,\r
-&ch34,\r
-&ch35,\r
-&ch36,\r
-&ch37,\r
-&ch38,\r
-&ch39,\r
-&ch40,\r
-&ch41,\r
-&ch42,\r
-&ch43,\r
-&ch44,\r
-&ch45,\r
-&ch46,\r
-&ch47,\r
-&ch48,\r
-&ch49,\r
-&ch50,\r
-&ch51,\r
-&ch52,\r
-&ch53,\r
-&ch54,\r
-&ch55,\r
-&ch56,\r
-&ch57,\r
-&ch58,\r
-&ch59,\r
-&ch60,\r
-&ch61,\r
-&ch62,\r
-&ch63,\r
-&ch64,\r
-&ch65,\r
-&ch66,\r
-&ch67,\r
-&ch68,\r
-&ch69,\r
-&ch70,\r
-&ch71,\r
-&ch72,\r
-&ch73,\r
-&ch74,\r
-&ch75,\r
-&ch76,\r
-&ch77,\r
-&ch78,\r
-&ch79,\r
-&ch80,\r
-&ch81,\r
-&ch82,\r
-&ch83,\r
-&ch84,\r
-&ch85,\r
-&ch86,\r
-&ch87,\r
-&ch88,\r
-&ch89,\r
-&ch90,\r
-&ch91,\r
-&ch92,\r
-&ch93,\r
-&ch94,\r
-&ch95,\r
-&ch96,\r
-&ch97,\r
-&ch98,\r
-&ch99,\r
-&ch100,\r
-&ch101,\r
-&ch102,\r
-&ch103,\r
-&ch104,\r
-&ch105,\r
-&ch106,\r
-&ch107,\r
-&ch108,\r
-&ch109,\r
-&ch110,\r
-&ch111,\r
-&ch112,\r
-&ch113,\r
-&ch114,\r
-&ch115,\r
-&ch116,\r
-&ch117,\r
-&ch118,\r
-&ch119,\r
-&ch120,\r
-&ch121,\r
-&ch122,\r
-&ch123,\r
-&ch124,\r
-&ch125,\r
-&ch126,\r
-&ch127,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-&ch160,\r
-&ch161,\r
-&ch162,\r
-&ch163,\r
-&ch164,\r
-&ch165,\r
-&ch166,\r
-&ch167,\r
-&ch168,\r
-&ch169,\r
-&ch170,\r
-&ch171,\r
-&ch172,\r
-&ch173,\r
-&ch174,\r
-&ch175,\r
-&ch176,\r
-&ch177,\r
-&ch178,\r
-&ch179,\r
-&ch180,\r
-&ch181,\r
-&ch182,\r
-&ch183,\r
-&ch184,\r
-&ch185,\r
-&ch186,\r
-&ch187,\r
-&ch188,\r
-&ch189,\r
-&ch190,\r
-&ch191,\r
-&ch192,\r
-&ch193,\r
-&ch194,\r
-&ch195,\r
-&ch196,\r
-&ch197,\r
-&ch198,\r
-&ch199,\r
-&ch200,\r
-&ch201,\r
-&ch202,\r
-&ch203,\r
-&ch204,\r
-&ch205,\r
-&ch206,\r
-&ch207,\r
-&ch208,\r
-&ch209,\r
-&ch210,\r
-&ch211,\r
-&ch212,\r
-&ch213,\r
-&ch214,\r
-&ch215,\r
-&ch216,\r
-&ch217,\r
-&ch218,\r
-&ch219,\r
-&ch220,\r
-&ch221,\r
-&ch222,\r
-&ch223,\r
-&ch224,\r
-&ch225,\r
-&ch226,\r
-&ch227,\r
-&ch228,\r
-&ch229,\r
-&ch230,\r
-&ch231,\r
-&ch232,\r
-&ch233,\r
-&ch234,\r
-&ch235,\r
-&ch236,\r
-&ch237,\r
-&ch238,\r
-&ch239,\r
-&ch240,\r
-&ch241,\r
-&ch242,\r
-&ch243,\r
-&ch244,\r
-&ch245,\r
-&ch246,\r
-&ch247,\r
-&ch248,\r
-&ch249,\r
-&ch250,\r
-&ch251,\r
-&ch252,\r
-&ch253,\r
-&ch254,\r
-&ch255,\r
-};\r
-\r
-#if !defined(__IBMCPP__)\r
-const \r
-#endif\r
-BitmapFontRec glutBitmap8By13 = {\r
-"-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1",\r
-256,\r
-0,\r
-chars\r
-};\r
-\r
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#define glutBitmap8By13 XXX
+#include "glutbitmap.h"
+#undef glutBitmap8By13
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch0data[] = { 0x0 };
+static const BitmapCharRec ch0 = {1,1,0,0,8,ch0data};
+#else
+static const BitmapCharRec ch0 = {0,0,0,0,8,0};
+#endif
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch32data[] = { 0x0 };
+static const BitmapCharRec ch32 = {1,1,0,0,8,ch32data};
+#else
+static const BitmapCharRec ch32 = {0,0,0,0,8,0};
+#endif
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch127data[] = { 0x0 };
+static const BitmapCharRec ch127 = {1,1,0,0,8,ch127data};
+#else
+static const BitmapCharRec ch127 = {0,0,0,0,8,0};
+#endif
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch160data[] = { 0x0 };
+static const BitmapCharRec ch160 = {1,1,0,0,8,ch160data};
+#else
+static const BitmapCharRec ch160 = {0,0,0,0,8,0};
+#endif
+
+/* char: 0xff */
+
+static const GLubyte ch255data[] = {
+0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch255 = {6,12,-1,2,8,ch255data};
+
+/* char: 0xfe */
+
+static const GLubyte ch254data[] = {
+0x80,0x80,0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80,
+};
+
+static const BitmapCharRec ch254 = {6,10,-1,2,8,ch254data};
+
+/* char: 0xfd */
+
+static const GLubyte ch253data[] = {
+0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x0,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch253 = {6,12,-1,2,8,ch253data};
+
+/* char: 0xfc */
+
+static const GLubyte ch252data[] = {
+0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch252 = {6,10,-1,0,8,ch252data};
+
+/* char: 0xfb */
+
+static const GLubyte ch251data[] = {
+0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch251 = {6,10,-1,0,8,ch251data};
+
+/* char: 0xfa */
+
+static const GLubyte ch250data[] = {
+0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch250 = {6,10,-1,0,8,ch250data};
+
+/* char: 0xf9 */
+
+static const GLubyte ch249data[] = {
+0x74,0x88,0x88,0x88,0x88,0x88,0x0,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch249 = {6,10,-1,0,8,ch249data};
+
+/* char: 0xf8 */
+
+static const GLubyte ch248data[] = {
+0x80,0x78,0xc4,0xa4,0x94,0x8c,0x78,0x4,
+};
+
+static const BitmapCharRec ch248 = {6,8,-1,1,8,ch248data};
+
+/* char: 0xf7 */
+
+static const GLubyte ch247data[] = {
+0x20,0x20,0x0,0xf8,0x0,0x20,0x20,
+};
+
+static const BitmapCharRec ch247 = {5,7,-1,-1,8,ch247data};
+
+/* char: 0xf6 */
+
+static const GLubyte ch246data[] = {
+0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch246 = {6,10,-1,0,8,ch246data};
+
+/* char: 0xf5 */
+
+static const GLubyte ch245data[] = {
+0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch245 = {6,10,-1,0,8,ch245data};
+
+/* char: 0xf4 */
+
+static const GLubyte ch244data[] = {
+0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch244 = {6,10,-1,0,8,ch244data};
+
+/* char: 0xf3 */
+
+static const GLubyte ch243data[] = {
+0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch243 = {6,10,-1,0,8,ch243data};
+
+/* char: 0xf2 */
+
+static const GLubyte ch242data[] = {
+0x78,0x84,0x84,0x84,0x84,0x78,0x0,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch242 = {6,10,-1,0,8,ch242data};
+
+/* char: 0xf1 */
+
+static const GLubyte ch241data[] = {
+0x84,0x84,0x84,0x84,0xc4,0xb8,0x0,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch241 = {6,10,-1,0,8,ch241data};
+
+/* char: 0xf0 */
+
+static const GLubyte ch240data[] = {
+0x78,0x84,0x84,0x84,0x84,0x78,0x8,0x50,0x30,0x48,
+};
+
+static const BitmapCharRec ch240 = {6,10,-1,0,8,ch240data};
+
+/* char: 0xef */
+
+static const GLubyte ch239data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x50,0x50,
+};
+
+static const BitmapCharRec ch239 = {5,10,-1,0,8,ch239data};
+
+/* char: 0xee */
+
+static const GLubyte ch238data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x90,0x60,
+};
+
+static const BitmapCharRec ch238 = {5,10,-1,0,8,ch238data};
+
+/* char: 0xed */
+
+static const GLubyte ch237data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x40,0x20,
+};
+
+static const BitmapCharRec ch237 = {5,10,-1,0,8,ch237data};
+
+/* char: 0xec */
+
+static const GLubyte ch236data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch236 = {5,10,-1,0,8,ch236data};
+
+/* char: 0xeb */
+
+static const GLubyte ch235data[] = {
+0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch235 = {6,10,-1,0,8,ch235data};
+
+/* char: 0xea */
+
+static const GLubyte ch234data[] = {
+0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch234 = {6,10,-1,0,8,ch234data};
+
+/* char: 0xe9 */
+
+static const GLubyte ch233data[] = {
+0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch233 = {6,10,-1,0,8,ch233data};
+
+/* char: 0xe8 */
+
+static const GLubyte ch232data[] = {
+0x78,0x84,0x80,0xfc,0x84,0x78,0x0,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch232 = {6,10,-1,0,8,ch232data};
+
+/* char: 0xe7 */
+
+static const GLubyte ch231data[] = {
+0x20,0x10,0x78,0x84,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch231 = {6,8,-1,2,8,ch231data};
+
+/* char: 0xe6 */
+
+static const GLubyte ch230data[] = {
+0x6c,0x92,0x90,0x7c,0x12,0x6c,
+};
+
+static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data};
+
+/* char: 0xe5 */
+
+static const GLubyte ch229data[] = {
+0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x30,0x48,0x30,
+};
+
+static const BitmapCharRec ch229 = {6,10,-1,0,8,ch229data};
+
+/* char: 0xe4 */
+
+static const GLubyte ch228data[] = {
+0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch228 = {6,10,-1,0,8,ch228data};
+
+/* char: 0xe3 */
+
+static const GLubyte ch227data[] = {
+0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch227 = {6,10,-1,0,8,ch227data};
+
+/* char: 0xe2 */
+
+static const GLubyte ch226data[] = {
+0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch226 = {6,10,-1,0,8,ch226data};
+
+/* char: 0xe1 */
+
+static const GLubyte ch225data[] = {
+0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch225 = {6,10,-1,0,8,ch225data};
+
+/* char: 0xe0 */
+
+static const GLubyte ch224data[] = {
+0x74,0x8c,0x84,0x7c,0x4,0x78,0x0,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch224 = {6,10,-1,0,8,ch224data};
+
+/* char: 0xdf */
+
+static const GLubyte ch223data[] = {
+0x80,0xb8,0xc4,0x84,0x84,0xf8,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch223 = {6,9,-1,1,8,ch223data};
+
+/* char: 0xde */
+
+static const GLubyte ch222data[] = {
+0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,
+};
+
+static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data};
+
+/* char: 0xdd */
+
+static const GLubyte ch221data[] = {
+0x20,0x20,0x20,0x20,0x50,0x88,0x88,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch221 = {5,10,-1,0,8,ch221data};
+
+/* char: 0xdc */
+
+static const GLubyte ch220data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data};
+
+/* char: 0xdb */
+
+static const GLubyte ch219data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch219 = {6,10,-1,0,8,ch219data};
+
+/* char: 0xda */
+
+static const GLubyte ch218data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch218 = {6,10,-1,0,8,ch218data};
+
+/* char: 0xd9 */
+
+static const GLubyte ch217data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch217 = {6,10,-1,0,8,ch217data};
+
+/* char: 0xd8 */
+
+static const GLubyte ch216data[] = {
+0x80,0x78,0xc4,0xa4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4,
+};
+
+static const BitmapCharRec ch216 = {6,11,-1,1,8,ch216data};
+
+/* char: 0xd7 */
+
+static const GLubyte ch215data[] = {
+0x84,0x48,0x30,0x30,0x48,0x84,
+};
+
+static const BitmapCharRec ch215 = {6,6,-1,-1,8,ch215data};
+
+/* char: 0xd6 */
+
+static const GLubyte ch214data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch214 = {7,10,0,0,8,ch214data};
+
+/* char: 0xd5 */
+
+static const GLubyte ch213data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x14,
+};
+
+static const BitmapCharRec ch213 = {7,10,0,0,8,ch213data};
+
+/* char: 0xd4 */
+
+static const GLubyte ch212data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x24,0x18,
+};
+
+static const BitmapCharRec ch212 = {7,10,0,0,8,ch212data};
+
+/* char: 0xd3 */
+
+static const GLubyte ch211data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch211 = {7,10,0,0,8,ch211data};
+
+/* char: 0xd2 */
+
+static const GLubyte ch210data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x8,0x10,
+};
+
+static const BitmapCharRec ch210 = {7,10,0,0,8,ch210data};
+
+/* char: 0xd1 */
+
+static const GLubyte ch209data[] = {
+0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x0,0x28,0x14,
+};
+
+static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data};
+
+/* char: 0xd0 */
+
+static const GLubyte ch208data[] = {
+0xfc,0x42,0x42,0x42,0xe2,0x42,0x42,0x42,0xfc,
+};
+
+static const BitmapCharRec ch208 = {7,9,0,0,8,ch208data};
+
+/* char: 0xcf */
+
+static const GLubyte ch207data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50,
+};
+
+static const BitmapCharRec ch207 = {5,10,-1,0,8,ch207data};
+
+/* char: 0xce */
+
+static const GLubyte ch206data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch206 = {5,10,-1,0,8,ch206data};
+
+/* char: 0xcd */
+
+static const GLubyte ch205data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch205 = {5,10,-1,0,8,ch205data};
+
+/* char: 0xcc */
+
+static const GLubyte ch204data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch204 = {5,10,-1,0,8,ch204data};
+
+/* char: 0xcb */
+
+static const GLubyte ch203data[] = {
+0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch203 = {6,10,-1,0,8,ch203data};
+
+/* char: 0xca */
+
+static const GLubyte ch202data[] = {
+0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch202 = {6,10,-1,0,8,ch202data};
+
+/* char: 0xc9 */
+
+static const GLubyte ch201data[] = {
+0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch201 = {6,10,-1,0,8,ch201data};
+
+/* char: 0xc8 */
+
+static const GLubyte ch200data[] = {
+0xfc,0x80,0x80,0xf0,0x80,0x80,0xfc,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch200 = {6,10,-1,0,8,ch200data};
+
+/* char: 0xc7 */
+
+static const GLubyte ch199data[] = {
+0x20,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch199 = {6,11,-1,2,8,ch199data};
+
+/* char: 0xc6 */
+
+static const GLubyte ch198data[] = {
+0x9e,0x90,0x90,0xf0,0x9c,0x90,0x90,0x90,0x6e,
+};
+
+static const BitmapCharRec ch198 = {7,9,0,0,8,ch198data};
+
+/* char: 0xc5 */
+
+static const GLubyte ch197data[] = {
+0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x30,0x48,0x30,
+};
+
+static const BitmapCharRec ch197 = {6,10,-1,0,8,ch197data};
+
+/* char: 0xc4 */
+
+static const GLubyte ch196data[] = {
+0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x48,
+};
+
+static const BitmapCharRec ch196 = {6,10,-1,0,8,ch196data};
+
+/* char: 0xc3 */
+
+static const GLubyte ch195data[] = {
+0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch195 = {6,10,-1,0,8,ch195data};
+
+/* char: 0xc2 */
+
+static const GLubyte ch194data[] = {
+0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x48,0x30,
+};
+
+static const BitmapCharRec ch194 = {6,10,-1,0,8,ch194data};
+
+/* char: 0xc1 */
+
+static const GLubyte ch193data[] = {
+0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch193 = {6,10,-1,0,8,ch193data};
+
+/* char: 0xc0 */
+
+static const GLubyte ch192data[] = {
+0x84,0x84,0xfc,0x84,0x84,0x48,0x30,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch192 = {6,10,-1,0,8,ch192data};
+
+/* char: 0xbf */
+
+static const GLubyte ch191data[] = {
+0x78,0x84,0x84,0x80,0x40,0x20,0x20,0x0,0x20,
+};
+
+static const BitmapCharRec ch191 = {6,9,-1,0,8,ch191data};
+
+/* char: 0xbe */
+
+static const GLubyte ch190data[] = {
+0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60,
+};
+
+static const BitmapCharRec ch190 = {7,10,0,0,8,ch190data};
+
+/* char: 0xbd */
+
+static const GLubyte ch189data[] = {
+0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch189 = {7,10,0,0,8,ch189data};
+
+/* char: 0xbc */
+
+static const GLubyte ch188data[] = {
+0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch188 = {7,10,0,0,8,ch188data};
+
+/* char: 0xbb */
+
+static const GLubyte ch187data[] = {
+0x90,0x48,0x24,0x12,0x24,0x48,0x90,
+};
+
+static const BitmapCharRec ch187 = {7,7,0,-1,8,ch187data};
+
+/* char: 0xba */
+
+static const GLubyte ch186data[] = {
+0xf0,0x0,0x60,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch186 = {4,6,-1,-3,8,ch186data};
+
+/* char: 0xb9 */
+
+static const GLubyte ch185data[] = {
+0xe0,0x40,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch185 = {3,6,-1,-4,8,ch185data};
+
+/* char: 0xb8 */
+
+static const GLubyte ch184data[] = {
+0xc0,0x40,
+};
+
+static const BitmapCharRec ch184 = {2,2,-3,2,8,ch184data};
+
+/* char: 0xb7 */
+
+static const GLubyte ch183data[] = {
+0xc0,
+};
+
+static const BitmapCharRec ch183 = {2,1,-3,-4,8,ch183data};
+
+/* char: 0xb6 */
+
+static const GLubyte ch182data[] = {
+0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c,
+};
+
+static const BitmapCharRec ch182 = {6,9,-1,0,8,ch182data};
+
+/* char: 0xb5 */
+
+static const GLubyte ch181data[] = {
+0x80,0xb4,0xcc,0x84,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch181 = {6,7,-1,1,8,ch181data};
+
+/* char: 0xb4 */
+
+static const GLubyte ch180data[] = {
+0x80,0x40,
+};
+
+static const BitmapCharRec ch180 = {2,2,-3,-8,8,ch180data};
+
+/* char: 0xb3 */
+
+static const GLubyte ch179data[] = {
+0x60,0x90,0x10,0x20,0x90,0x60,
+};
+
+static const BitmapCharRec ch179 = {4,6,-1,-4,8,ch179data};
+
+/* char: 0xb2 */
+
+static const GLubyte ch178data[] = {
+0xf0,0x80,0x60,0x10,0x90,0x60,
+};
+
+static const BitmapCharRec ch178 = {4,6,-1,-4,8,ch178data};
+
+/* char: 0xb1 */
+
+static const GLubyte ch177data[] = {
+0xf8,0x0,0x20,0x20,0xf8,0x20,0x20,
+};
+
+static const BitmapCharRec ch177 = {5,7,-1,-1,8,ch177data};
+
+/* char: 0xb0 */
+
+static const GLubyte ch176data[] = {
+0x60,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch176 = {4,4,-2,-5,8,ch176data};
+
+/* char: 0xaf */
+
+static const GLubyte ch175data[] = {
+0xfc,
+};
+
+static const BitmapCharRec ch175 = {6,1,-1,-8,8,ch175data};
+
+/* char: 0xae */
+
+static const GLubyte ch174data[] = {
+0x38,0x44,0xaa,0xb2,0xaa,0xaa,0x92,0x44,0x38,
+};
+
+static const BitmapCharRec ch174 = {7,9,0,-1,8,ch174data};
+
+/* char: 0xad */
+
+static const GLubyte ch173data[] = {
+0xfc,
+};
+
+static const BitmapCharRec ch173 = {6,1,-1,-4,8,ch173data};
+
+/* char: 0xac */
+
+static const GLubyte ch172data[] = {
+0x4,0x4,0x4,0xfc,
+};
+
+static const BitmapCharRec ch172 = {6,4,-1,-1,8,ch172data};
+
+/* char: 0xab */
+
+static const GLubyte ch171data[] = {
+0x12,0x24,0x48,0x90,0x48,0x24,0x12,
+};
+
+static const BitmapCharRec ch171 = {7,7,0,-1,8,ch171data};
+
+/* char: 0xaa */
+
+static const GLubyte ch170data[] = {
+0xf8,0x0,0x78,0x88,0x78,0x8,0x70,
+};
+
+static const BitmapCharRec ch170 = {5,7,-1,-2,8,ch170data};
+
+/* char: 0xa9 */
+
+static const GLubyte ch169data[] = {
+0x38,0x44,0x92,0xaa,0xa2,0xaa,0x92,0x44,0x38,
+};
+
+static const BitmapCharRec ch169 = {7,9,0,-1,8,ch169data};
+
+/* char: 0xa8 */
+
+static const GLubyte ch168data[] = {
+0xd8,
+};
+
+static const BitmapCharRec ch168 = {5,1,-1,-8,8,ch168data};
+
+/* char: 0xa7 */
+
+static const GLubyte ch167data[] = {
+0x60,0x90,0x10,0x60,0x90,0x90,0x60,0x80,0x90,0x60,
+};
+
+static const BitmapCharRec ch167 = {4,10,-2,0,8,ch167data};
+
+/* char: 0xa6 */
+
+static const GLubyte ch166data[] = {
+0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch166 = {1,9,-3,0,8,ch166data};
+
+/* char: 0xa5 */
+
+static const GLubyte ch165data[] = {
+0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch165 = {7,9,0,0,8,ch165data};
+
+/* char: 0xa4 */
+
+static const GLubyte ch164data[] = {
+0x84,0x78,0x48,0x48,0x78,0x84,
+};
+
+static const BitmapCharRec ch164 = {6,6,-1,-1,8,ch164data};
+
+/* char: 0xa3 */
+
+static const GLubyte ch163data[] = {
+0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c,
+};
+
+static const BitmapCharRec ch163 = {7,9,0,0,8,ch163data};
+
+/* char: 0xa2 */
+
+static const GLubyte ch162data[] = {
+0x20,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x20,
+};
+
+static const BitmapCharRec ch162 = {5,8,-1,-1,8,ch162data};
+
+/* char: 0xa1 */
+
+static const GLubyte ch161data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,
+};
+
+static const BitmapCharRec ch161 = {1,9,-3,0,8,ch161data};
+
+/* char: 0x7e '~' */
+
+static const GLubyte ch126data[] = {
+0x90,0xa8,0x48,
+};
+
+static const BitmapCharRec ch126 = {5,3,-1,-6,8,ch126data};
+
+/* char: 0x7d '}' */
+
+static const GLubyte ch125data[] = {
+0xe0,0x10,0x10,0x20,0x18,0x20,0x10,0x10,0xe0,
+};
+
+static const BitmapCharRec ch125 = {5,9,-1,0,8,ch125data};
+
+/* char: 0x7c '|' */
+
+static const GLubyte ch124data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch124 = {1,9,-3,0,8,ch124data};
+
+/* char: 0x7b '{' */
+
+static const GLubyte ch123data[] = {
+0x38,0x40,0x40,0x20,0xc0,0x20,0x40,0x40,0x38,
+};
+
+static const BitmapCharRec ch123 = {5,9,-2,0,8,ch123data};
+
+/* char: 0x7a 'z' */
+
+static const GLubyte ch122data[] = {
+0xfc,0x40,0x20,0x10,0x8,0xfc,
+};
+
+static const BitmapCharRec ch122 = {6,6,-1,0,8,ch122data};
+
+/* char: 0x79 'y' */
+
+static const GLubyte ch121data[] = {
+0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch121 = {6,8,-1,2,8,ch121data};
+
+/* char: 0x78 'x' */
+
+static const GLubyte ch120data[] = {
+0x84,0x48,0x30,0x30,0x48,0x84,
+};
+
+static const BitmapCharRec ch120 = {6,6,-1,0,8,ch120data};
+
+/* char: 0x77 'w' */
+
+static const GLubyte ch119data[] = {
+0x44,0xaa,0x92,0x92,0x82,0x82,
+};
+
+static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data};
+
+/* char: 0x76 'v' */
+
+static const GLubyte ch118data[] = {
+0x20,0x50,0x50,0x88,0x88,0x88,
+};
+
+static const BitmapCharRec ch118 = {5,6,-1,0,8,ch118data};
+
+/* char: 0x75 'u' */
+
+static const GLubyte ch117data[] = {
+0x74,0x88,0x88,0x88,0x88,0x88,
+};
+
+static const BitmapCharRec ch117 = {6,6,-1,0,8,ch117data};
+
+/* char: 0x74 't' */
+
+static const GLubyte ch116data[] = {
+0x38,0x44,0x40,0x40,0x40,0xf8,0x40,0x40,
+};
+
+static const BitmapCharRec ch116 = {6,8,-1,0,8,ch116data};
+
+/* char: 0x73 's' */
+
+static const GLubyte ch115data[] = {
+0x78,0x84,0x18,0x60,0x84,0x78,
+};
+
+static const BitmapCharRec ch115 = {6,6,-1,0,8,ch115data};
+
+/* char: 0x72 'r' */
+
+static const GLubyte ch114data[] = {
+0x40,0x40,0x40,0x40,0x44,0xb8,
+};
+
+static const BitmapCharRec ch114 = {6,6,-1,0,8,ch114data};
+
+/* char: 0x71 'q' */
+
+static const GLubyte ch113data[] = {
+0x4,0x4,0x4,0x74,0x8c,0x84,0x8c,0x74,
+};
+
+static const BitmapCharRec ch113 = {6,8,-1,2,8,ch113data};
+
+/* char: 0x70 'p' */
+
+static const GLubyte ch112data[] = {
+0x80,0x80,0x80,0xb8,0xc4,0x84,0xc4,0xb8,
+};
+
+static const BitmapCharRec ch112 = {6,8,-1,2,8,ch112data};
+
+/* char: 0x6f 'o' */
+
+static const GLubyte ch111data[] = {
+0x78,0x84,0x84,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch111 = {6,6,-1,0,8,ch111data};
+
+/* char: 0x6e 'n' */
+
+static const GLubyte ch110data[] = {
+0x84,0x84,0x84,0x84,0xc4,0xb8,
+};
+
+static const BitmapCharRec ch110 = {6,6,-1,0,8,ch110data};
+
+/* char: 0x6d 'm' */
+
+static const GLubyte ch109data[] = {
+0x82,0x92,0x92,0x92,0x92,0xec,
+};
+
+static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data};
+
+/* char: 0x6c 'l' */
+
+static const GLubyte ch108data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x60,
+};
+
+static const BitmapCharRec ch108 = {5,9,-1,0,8,ch108data};
+
+/* char: 0x6b 'k' */
+
+static const GLubyte ch107data[] = {
+0x84,0x88,0x90,0xe0,0x90,0x88,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch107 = {6,9,-1,0,8,ch107data};
+
+/* char: 0x6a 'j' */
+
+static const GLubyte ch106data[] = {
+0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x18,0x0,0x8,
+};
+
+static const BitmapCharRec ch106 = {5,10,-1,2,8,ch106data};
+
+/* char: 0x69 'i' */
+
+static const GLubyte ch105data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x60,0x0,0x20,
+};
+
+static const BitmapCharRec ch105 = {5,8,-1,0,8,ch105data};
+
+/* char: 0x68 'h' */
+
+static const GLubyte ch104data[] = {
+0x84,0x84,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch104 = {6,9,-1,0,8,ch104data};
+
+/* char: 0x67 'g' */
+
+static const GLubyte ch103data[] = {
+0x78,0x84,0x78,0x80,0x70,0x88,0x88,0x74,
+};
+
+static const BitmapCharRec ch103 = {6,8,-1,2,8,ch103data};
+
+/* char: 0x66 'f' */
+
+static const GLubyte ch102data[] = {
+0x40,0x40,0x40,0x40,0xf8,0x40,0x40,0x44,0x38,
+};
+
+static const BitmapCharRec ch102 = {6,9,-1,0,8,ch102data};
+
+/* char: 0x65 'e' */
+
+static const GLubyte ch101data[] = {
+0x78,0x84,0x80,0xfc,0x84,0x78,
+};
+
+static const BitmapCharRec ch101 = {6,6,-1,0,8,ch101data};
+
+/* char: 0x64 'd' */
+
+static const GLubyte ch100data[] = {
+0x74,0x8c,0x84,0x84,0x8c,0x74,0x4,0x4,0x4,
+};
+
+static const BitmapCharRec ch100 = {6,9,-1,0,8,ch100data};
+
+/* char: 0x63 'c' */
+
+static const GLubyte ch99data[] = {
+0x78,0x84,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch99 = {6,6,-1,0,8,ch99data};
+
+/* char: 0x62 'b' */
+
+static const GLubyte ch98data[] = {
+0xb8,0xc4,0x84,0x84,0xc4,0xb8,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch98 = {6,9,-1,0,8,ch98data};
+
+/* char: 0x61 'a' */
+
+static const GLubyte ch97data[] = {
+0x74,0x8c,0x84,0x7c,0x4,0x78,
+};
+
+static const BitmapCharRec ch97 = {6,6,-1,0,8,ch97data};
+
+/* char: 0x60 '`' */
+
+static const GLubyte ch96data[] = {
+0x10,0x60,0xe0,
+};
+
+static const BitmapCharRec ch96 = {4,3,-2,-6,8,ch96data};
+
+/* char: 0x5f '_' */
+
+static const GLubyte ch95data[] = {
+0xfe,
+};
+
+static const BitmapCharRec ch95 = {7,1,0,1,8,ch95data};
+
+/* char: 0x5e '^' */
+
+static const GLubyte ch94data[] = {
+0x88,0x50,0x20,
+};
+
+static const BitmapCharRec ch94 = {5,3,-1,-6,8,ch94data};
+
+/* char: 0x5d ']' */
+
+static const GLubyte ch93data[] = {
+0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0,
+};
+
+static const BitmapCharRec ch93 = {4,9,-1,0,8,ch93data};
+
+/* char: 0x5c '\' */
+
+static const GLubyte ch92data[] = {
+0x2,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x80,
+};
+
+static const BitmapCharRec ch92 = {7,9,0,0,8,ch92data};
+
+/* char: 0x5b '[' */
+
+static const GLubyte ch91data[] = {
+0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0,
+};
+
+static const BitmapCharRec ch91 = {4,9,-2,0,8,ch91data};
+
+/* char: 0x5a 'Z' */
+
+static const GLubyte ch90data[] = {
+0xfc,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0xfc,
+};
+
+static const BitmapCharRec ch90 = {6,9,-1,0,8,ch90data};
+
+/* char: 0x59 'Y' */
+
+static const GLubyte ch89data[] = {
+0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch89 = {7,9,0,0,8,ch89data};
+
+/* char: 0x58 'X' */
+
+static const GLubyte ch88data[] = {
+0x82,0x82,0x44,0x28,0x10,0x28,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch88 = {7,9,0,0,8,ch88data};
+
+/* char: 0x57 'W' */
+
+static const GLubyte ch87data[] = {
+0x44,0xaa,0x92,0x92,0x92,0x82,0x82,0x82,0x82,
+};
+
+static const BitmapCharRec ch87 = {7,9,0,0,8,ch87data};
+
+/* char: 0x56 'V' */
+
+static const GLubyte ch86data[] = {
+0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch86 = {7,9,0,0,8,ch86data};
+
+/* char: 0x55 'U' */
+
+static const GLubyte ch85data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data};
+
+/* char: 0x54 'T' */
+
+static const GLubyte ch84data[] = {
+0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe,
+};
+
+static const BitmapCharRec ch84 = {7,9,0,0,8,ch84data};
+
+/* char: 0x53 'S' */
+
+static const GLubyte ch83data[] = {
+0x78,0x84,0x4,0x4,0x78,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data};
+
+/* char: 0x52 'R' */
+
+static const GLubyte ch82data[] = {
+0x84,0x88,0x90,0xa0,0xf8,0x84,0x84,0x84,0xf8,
+};
+
+static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data};
+
+/* char: 0x51 'Q' */
+
+static const GLubyte ch81data[] = {
+0x4,0x78,0x94,0xa4,0x84,0x84,0x84,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch81 = {6,10,-1,1,8,ch81data};
+
+/* char: 0x50 'P' */
+
+static const GLubyte ch80data[] = {
+0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,
+};
+
+static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data};
+
+/* char: 0x4f 'O' */
+
+static const GLubyte ch79data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch79 = {6,9,-1,0,8,ch79data};
+
+/* char: 0x4e 'N' */
+
+static const GLubyte ch78data[] = {
+0x84,0x84,0x84,0x8c,0x94,0xa4,0xc4,0x84,0x84,
+};
+
+static const BitmapCharRec ch78 = {6,9,-1,0,8,ch78data};
+
+/* char: 0x4d 'M' */
+
+static const GLubyte ch77data[] = {
+0x82,0x82,0x82,0x92,0x92,0xaa,0xc6,0x82,0x82,
+};
+
+static const BitmapCharRec ch77 = {7,9,0,0,8,ch77data};
+
+/* char: 0x4c 'L' */
+
+static const GLubyte ch76data[] = {
+0xfc,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch76 = {6,9,-1,0,8,ch76data};
+
+/* char: 0x4b 'K' */
+
+static const GLubyte ch75data[] = {
+0x84,0x88,0x90,0xa0,0xc0,0xa0,0x90,0x88,0x84,
+};
+
+static const BitmapCharRec ch75 = {6,9,-1,0,8,ch75data};
+
+/* char: 0x4a 'J' */
+
+static const GLubyte ch74data[] = {
+0x70,0x88,0x8,0x8,0x8,0x8,0x8,0x8,0x3c,
+};
+
+static const BitmapCharRec ch74 = {6,9,-1,0,8,ch74data};
+
+/* char: 0x49 'I' */
+
+static const GLubyte ch73data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,
+};
+
+static const BitmapCharRec ch73 = {5,9,-1,0,8,ch73data};
+
+/* char: 0x48 'H' */
+
+static const GLubyte ch72data[] = {
+0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch72 = {6,9,-1,0,8,ch72data};
+
+/* char: 0x47 'G' */
+
+static const GLubyte ch71data[] = {
+0x74,0x8c,0x84,0x9c,0x80,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch71 = {6,9,-1,0,8,ch71data};
+
+/* char: 0x46 'F' */
+
+static const GLubyte ch70data[] = {
+0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc,
+};
+
+static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data};
+
+/* char: 0x45 'E' */
+
+static const GLubyte ch69data[] = {
+0xfc,0x80,0x80,0x80,0xf0,0x80,0x80,0x80,0xfc,
+};
+
+static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data};
+
+/* char: 0x44 'D' */
+
+static const GLubyte ch68data[] = {
+0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc,
+};
+
+static const BitmapCharRec ch68 = {7,9,0,0,8,ch68data};
+
+/* char: 0x43 'C' */
+
+static const GLubyte ch67data[] = {
+0x78,0x84,0x80,0x80,0x80,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch67 = {6,9,-1,0,8,ch67data};
+
+/* char: 0x42 'B' */
+
+static const GLubyte ch66data[] = {
+0xfc,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc,
+};
+
+static const BitmapCharRec ch66 = {7,9,0,0,8,ch66data};
+
+/* char: 0x41 'A' */
+
+static const GLubyte ch65data[] = {
+0x84,0x84,0x84,0xfc,0x84,0x84,0x84,0x48,0x30,
+};
+
+static const BitmapCharRec ch65 = {6,9,-1,0,8,ch65data};
+
+/* char: 0x40 '@' */
+
+static const GLubyte ch64data[] = {
+0x78,0x80,0x94,0xac,0xa4,0x9c,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch64 = {6,9,-1,0,8,ch64data};
+
+/* char: 0x3f '?' */
+
+static const GLubyte ch63data[] = {
+0x10,0x0,0x10,0x10,0x8,0x4,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch63 = {6,9,-1,0,8,ch63data};
+
+/* char: 0x3e '>' */
+
+static const GLubyte ch62data[] = {
+0x80,0x40,0x20,0x10,0x8,0x10,0x20,0x40,0x80,
+};
+
+static const BitmapCharRec ch62 = {5,9,-1,0,8,ch62data};
+
+/* char: 0x3d '=' */
+
+static const GLubyte ch61data[] = {
+0xfc,0x0,0x0,0xfc,
+};
+
+static const BitmapCharRec ch61 = {6,4,-1,-2,8,ch61data};
+
+/* char: 0x3c '<' */
+
+static const GLubyte ch60data[] = {
+0x8,0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x8,
+};
+
+static const BitmapCharRec ch60 = {5,9,-2,0,8,ch60data};
+
+/* char: 0x3b ';' */
+
+static const GLubyte ch59data[] = {
+0x80,0x60,0x70,0x0,0x0,0x20,0x70,0x20,
+};
+
+static const BitmapCharRec ch59 = {4,8,-1,1,8,ch59data};
+
+/* char: 0x3a ':' */
+
+static const GLubyte ch58data[] = {
+0x40,0xe0,0x40,0x0,0x0,0x40,0xe0,0x40,
+};
+
+static const BitmapCharRec ch58 = {3,8,-2,1,8,ch58data};
+
+/* char: 0x39 '9' */
+
+static const GLubyte ch57data[] = {
+0x70,0x8,0x4,0x4,0x74,0x8c,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch57 = {6,9,-1,0,8,ch57data};
+
+/* char: 0x38 '8' */
+
+static const GLubyte ch56data[] = {
+0x78,0x84,0x84,0x84,0x78,0x84,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch56 = {6,9,-1,0,8,ch56data};
+
+/* char: 0x37 '7' */
+
+static const GLubyte ch55data[] = {
+0x40,0x40,0x20,0x20,0x10,0x10,0x8,0x4,0xfc,
+};
+
+static const BitmapCharRec ch55 = {6,9,-1,0,8,ch55data};
+
+/* char: 0x36 '6' */
+
+static const GLubyte ch54data[] = {
+0x78,0x84,0x84,0xc4,0xb8,0x80,0x80,0x40,0x38,
+};
+
+static const BitmapCharRec ch54 = {6,9,-1,0,8,ch54data};
+
+/* char: 0x35 '5' */
+
+static const GLubyte ch53data[] = {
+0x78,0x84,0x4,0x4,0xc4,0xb8,0x80,0x80,0xfc,
+};
+
+static const BitmapCharRec ch53 = {6,9,-1,0,8,ch53data};
+
+/* char: 0x34 '4' */
+
+static const GLubyte ch52data[] = {
+0x8,0x8,0xfc,0x88,0x88,0x48,0x28,0x18,0x8,
+};
+
+static const BitmapCharRec ch52 = {6,9,-1,0,8,ch52data};
+
+/* char: 0x33 '3' */
+
+static const GLubyte ch51data[] = {
+0x78,0x84,0x4,0x4,0x38,0x10,0x8,0x4,0xfc,
+};
+
+static const BitmapCharRec ch51 = {6,9,-1,0,8,ch51data};
+
+/* char: 0x32 '2' */
+
+static const GLubyte ch50data[] = {
+0xfc,0x80,0x40,0x30,0x8,0x4,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch50 = {6,9,-1,0,8,ch50data};
+
+/* char: 0x31 '1' */
+
+static const GLubyte ch49data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20,
+};
+
+static const BitmapCharRec ch49 = {5,9,-1,0,8,ch49data};
+
+/* char: 0x30 '0' */
+
+static const GLubyte ch48data[] = {
+0x30,0x48,0x84,0x84,0x84,0x84,0x84,0x48,0x30,
+};
+
+static const BitmapCharRec ch48 = {6,9,-1,0,8,ch48data};
+
+/* char: 0x2f '/' */
+
+static const GLubyte ch47data[] = {
+0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x2,
+};
+
+static const BitmapCharRec ch47 = {7,9,0,0,8,ch47data};
+
+/* char: 0x2e '.' */
+
+static const GLubyte ch46data[] = {
+0x40,0xe0,0x40,
+};
+
+static const BitmapCharRec ch46 = {3,3,-2,1,8,ch46data};
+
+/* char: 0x2d '-' */
+
+static const GLubyte ch45data[] = {
+0xfc,
+};
+
+static const BitmapCharRec ch45 = {6,1,-1,-4,8,ch45data};
+
+/* char: 0x2c ',' */
+
+static const GLubyte ch44data[] = {
+0x80,0x60,0x70,
+};
+
+static const BitmapCharRec ch44 = {4,3,-1,1,8,ch44data};
+
+/* char: 0x2b '+' */
+
+static const GLubyte ch43data[] = {
+0x20,0x20,0xf8,0x20,0x20,
+};
+
+static const BitmapCharRec ch43 = {5,5,-1,-2,8,ch43data};
+
+/* char: 0x2a '*' */
+
+static const GLubyte ch42data[] = {
+0x48,0x30,0xfc,0x30,0x48,
+};
+
+static const BitmapCharRec ch42 = {6,5,-1,-2,8,ch42data};
+
+/* char: 0x29 ')' */
+
+static const GLubyte ch41data[] = {
+0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80,
+};
+
+static const BitmapCharRec ch41 = {3,9,-2,0,8,ch41data};
+
+/* char: 0x28 '(' */
+
+static const GLubyte ch40data[] = {
+0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20,
+};
+
+static const BitmapCharRec ch40 = {3,9,-3,0,8,ch40data};
+
+/* char: 0x27 ''' */
+
+static const GLubyte ch39data[] = {
+0x80,0x60,0x70,
+};
+
+static const BitmapCharRec ch39 = {4,3,-1,-6,8,ch39data};
+
+/* char: 0x26 '&' */
+
+static const GLubyte ch38data[] = {
+0x74,0x88,0x94,0x60,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch38 = {6,7,-1,0,8,ch38data};
+
+/* char: 0x25 '%' */
+
+static const GLubyte ch37data[] = {
+0x88,0x54,0x48,0x20,0x10,0x10,0x48,0xa4,0x44,
+};
+
+static const BitmapCharRec ch37 = {6,9,-1,0,8,ch37data};
+
+/* char: 0x24 '$' */
+
+static const GLubyte ch36data[] = {
+0x20,0xf0,0x28,0x70,0xa0,0x78,0x20,
+};
+
+static const BitmapCharRec ch36 = {5,7,-1,-1,8,ch36data};
+
+/* char: 0x23 '#' */
+
+static const GLubyte ch35data[] = {
+0x48,0x48,0xfc,0x48,0xfc,0x48,0x48,
+};
+
+static const BitmapCharRec ch35 = {6,7,-1,-1,8,ch35data};
+
+/* char: 0x22 '"' */
+
+static const GLubyte ch34data[] = {
+0x90,0x90,0x90,
+};
+
+static const BitmapCharRec ch34 = {4,3,-2,-6,8,ch34data};
+
+/* char: 0x21 '!' */
+
+static const GLubyte ch33data[] = {
+0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch33 = {1,9,-3,0,8,ch33data};
+
+/* char: 0x1f */
+
+static const GLubyte ch31data[] = {
+0x80,
+};
+
+static const BitmapCharRec ch31 = {1,1,-3,-3,8,ch31data};
+
+/* char: 0x1e */
+
+static const GLubyte ch30data[] = {
+0xdc,0x62,0x20,0x20,0x20,0x70,0x20,0x22,0x1c,
+};
+
+static const BitmapCharRec ch30 = {7,9,0,0,8,ch30data};
+
+/* char: 0x1d */
+
+static const GLubyte ch29data[] = {
+0x80,0x40,0xfe,0x10,0xfe,0x4,0x2,
+};
+
+static const BitmapCharRec ch29 = {7,7,0,0,8,ch29data};
+
+/* char: 0x1c */
+
+static const GLubyte ch28data[] = {
+0x88,0x48,0x48,0x48,0x48,0xfc,
+};
+
+static const BitmapCharRec ch28 = {6,6,-1,0,8,ch28data};
+
+/* char: 0x1b */
+
+static const GLubyte ch27data[] = {
+0xfe,0x80,0x20,0x8,0x2,0x8,0x20,0x80,
+};
+
+static const BitmapCharRec ch27 = {7,8,0,0,8,ch27data};
+
+/* char: 0x1a */
+
+static const GLubyte ch26data[] = {
+0xfe,0x2,0x8,0x20,0x80,0x20,0x8,0x2,
+};
+
+static const BitmapCharRec ch26 = {7,8,0,0,8,ch26data};
+
+/* char: 0x19 */
+
+static const GLubyte ch25data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch25 = {1,13,-3,2,8,ch25data};
+
+/* char: 0x18 */
+
+static const GLubyte ch24data[] = {
+0x10,0x10,0x10,0x10,0x10,0xff,
+};
+
+static const BitmapCharRec ch24 = {8,6,0,2,8,ch24data};
+
+/* char: 0x17 */
+
+static const GLubyte ch23data[] = {
+0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+};
+
+static const BitmapCharRec ch23 = {8,8,0,-3,8,ch23data};
+
+/* char: 0x16 */
+
+static const GLubyte ch22data[] = {
+0x10,0x10,0x10,0x10,0x10,0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+};
+
+static const BitmapCharRec ch22 = {4,13,0,2,8,ch22data};
+
+/* char: 0x15 */
+
+static const GLubyte ch21data[] = {
+0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch21 = {5,13,-3,2,8,ch21data};
+
+/* char: 0x14 */
+
+static const GLubyte ch20data[] = {
+0xff,
+};
+
+static const BitmapCharRec ch20 = {8,1,0,1,8,ch20data};
+
+/* char: 0x13 */
+
+static const GLubyte ch19data[] = {
+0xff,
+};
+
+static const BitmapCharRec ch19 = {8,1,0,-1,8,ch19data};
+
+/* char: 0x12 */
+
+static const GLubyte ch18data[] = {
+0xff,
+};
+
+static const BitmapCharRec ch18 = {8,1,0,-3,8,ch18data};
+
+/* char: 0x11 */
+
+static const GLubyte ch17data[] = {
+0xff,
+};
+
+static const BitmapCharRec ch17 = {8,1,0,-5,8,ch17data};
+
+/* char: 0x10 */
+
+static const GLubyte ch16data[] = {
+0xff,
+};
+
+static const BitmapCharRec ch16 = {8,1,0,-7,8,ch16data};
+
+/* char: 0xf */
+
+static const GLubyte ch15data[] = {
+0x10,0x10,0x10,0x10,0x10,0xff,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+};
+
+static const BitmapCharRec ch15 = {8,13,0,2,8,ch15data};
+
+/* char: 0xe */
+
+static const GLubyte ch14data[] = {
+0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch14 = {5,8,-3,-3,8,ch14data};
+
+/* char: 0xd */
+
+static const GLubyte ch13data[] = {
+0x80,0x80,0x80,0x80,0x80,0xf8,
+};
+
+static const BitmapCharRec ch13 = {5,6,-3,2,8,ch13data};
+
+/* char: 0xc */
+
+static const GLubyte ch12data[] = {
+0x10,0x10,0x10,0x10,0x10,0xf0,
+};
+
+static const BitmapCharRec ch12 = {4,6,0,2,8,ch12data};
+
+/* char: 0xb */
+
+static const GLubyte ch11data[] = {
+0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+};
+
+static const BitmapCharRec ch11 = {4,8,0,-3,8,ch11data};
+
+/* char: 0xa */
+
+static const GLubyte ch10data[] = {
+0x8,0x8,0x8,0x8,0x3e,0x20,0x50,0x88,0x88,
+};
+
+static const BitmapCharRec ch10 = {7,9,0,2,8,ch10data};
+
+/* char: 0x9 */
+
+static const GLubyte ch9data[] = {
+0x3e,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88,
+};
+
+static const BitmapCharRec ch9 = {7,9,0,2,8,ch9data};
+
+/* char: 0x8 */
+
+static const GLubyte ch8data[] = {
+0xfe,0x10,0x10,0xfe,0x10,0x10,
+};
+
+static const BitmapCharRec ch8 = {7,6,0,0,8,ch8data};
+
+/* char: 0x7 */
+
+static const GLubyte ch7data[] = {
+0x70,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch7 = {5,4,-1,-5,8,ch7data};
+
+/* char: 0x6 */
+
+static const GLubyte ch6data[] = {
+0x20,0x20,0x3c,0x20,0x3e,0xf8,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch6 = {7,9,0,2,8,ch6data};
+
+/* char: 0x5 */
+
+static const GLubyte ch5data[] = {
+0x22,0x22,0x3c,0x22,0x3c,0x78,0x80,0x80,0x78,
+};
+
+static const BitmapCharRec ch5 = {7,9,0,2,8,ch5data};
+
+/* char: 0x4 */
+
+static const GLubyte ch4data[] = {
+0x10,0x10,0x1c,0x10,0x9e,0x80,0xe0,0x80,0xf0,
+};
+
+static const BitmapCharRec ch4 = {7,9,0,2,8,ch4data};
+
+/* char: 0x3 */
+
+static const GLubyte ch3data[] = {
+0x8,0x8,0x8,0x3e,0x88,0x88,0xf8,0x88,0x88,
+};
+
+static const BitmapCharRec ch3 = {7,9,0,2,8,ch3data};
+
+/* char: 0x2 */
+
+static const GLubyte ch2data[] = {
+0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,
+};
+
+static const BitmapCharRec ch2 = {8,12,0,2,8,ch2data};
+
+/* char: 0x1 */
+
+static const GLubyte ch1data[] = {
+0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,
+};
+
+static const BitmapCharRec ch1 = {7,7,0,-1,8,ch1data};
+
+static const BitmapCharRec * const chars[] = {
+&ch0,
+&ch1,
+&ch2,
+&ch3,
+&ch4,
+&ch5,
+&ch6,
+&ch7,
+&ch8,
+&ch9,
+&ch10,
+&ch11,
+&ch12,
+&ch13,
+&ch14,
+&ch15,
+&ch16,
+&ch17,
+&ch18,
+&ch19,
+&ch20,
+&ch21,
+&ch22,
+&ch23,
+&ch24,
+&ch25,
+&ch26,
+&ch27,
+&ch28,
+&ch29,
+&ch30,
+&ch31,
+&ch32,
+&ch33,
+&ch34,
+&ch35,
+&ch36,
+&ch37,
+&ch38,
+&ch39,
+&ch40,
+&ch41,
+&ch42,
+&ch43,
+&ch44,
+&ch45,
+&ch46,
+&ch47,
+&ch48,
+&ch49,
+&ch50,
+&ch51,
+&ch52,
+&ch53,
+&ch54,
+&ch55,
+&ch56,
+&ch57,
+&ch58,
+&ch59,
+&ch60,
+&ch61,
+&ch62,
+&ch63,
+&ch64,
+&ch65,
+&ch66,
+&ch67,
+&ch68,
+&ch69,
+&ch70,
+&ch71,
+&ch72,
+&ch73,
+&ch74,
+&ch75,
+&ch76,
+&ch77,
+&ch78,
+&ch79,
+&ch80,
+&ch81,
+&ch82,
+&ch83,
+&ch84,
+&ch85,
+&ch86,
+&ch87,
+&ch88,
+&ch89,
+&ch90,
+&ch91,
+&ch92,
+&ch93,
+&ch94,
+&ch95,
+&ch96,
+&ch97,
+&ch98,
+&ch99,
+&ch100,
+&ch101,
+&ch102,
+&ch103,
+&ch104,
+&ch105,
+&ch106,
+&ch107,
+&ch108,
+&ch109,
+&ch110,
+&ch111,
+&ch112,
+&ch113,
+&ch114,
+&ch115,
+&ch116,
+&ch117,
+&ch118,
+&ch119,
+&ch120,
+&ch121,
+&ch122,
+&ch123,
+&ch124,
+&ch125,
+&ch126,
+&ch127,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+&ch160,
+&ch161,
+&ch162,
+&ch163,
+&ch164,
+&ch165,
+&ch166,
+&ch167,
+&ch168,
+&ch169,
+&ch170,
+&ch171,
+&ch172,
+&ch173,
+&ch174,
+&ch175,
+&ch176,
+&ch177,
+&ch178,
+&ch179,
+&ch180,
+&ch181,
+&ch182,
+&ch183,
+&ch184,
+&ch185,
+&ch186,
+&ch187,
+&ch188,
+&ch189,
+&ch190,
+&ch191,
+&ch192,
+&ch193,
+&ch194,
+&ch195,
+&ch196,
+&ch197,
+&ch198,
+&ch199,
+&ch200,
+&ch201,
+&ch202,
+&ch203,
+&ch204,
+&ch205,
+&ch206,
+&ch207,
+&ch208,
+&ch209,
+&ch210,
+&ch211,
+&ch212,
+&ch213,
+&ch214,
+&ch215,
+&ch216,
+&ch217,
+&ch218,
+&ch219,
+&ch220,
+&ch221,
+&ch222,
+&ch223,
+&ch224,
+&ch225,
+&ch226,
+&ch227,
+&ch228,
+&ch229,
+&ch230,
+&ch231,
+&ch232,
+&ch233,
+&ch234,
+&ch235,
+&ch236,
+&ch237,
+&ch238,
+&ch239,
+&ch240,
+&ch241,
+&ch242,
+&ch243,
+&ch244,
+&ch245,
+&ch246,
+&ch247,
+&ch248,
+&ch249,
+&ch250,
+&ch251,
+&ch252,
+&ch253,
+&ch254,
+&ch255,
+};
+
+#if !defined(__IBMCPP__)
+const 
+#endif
+BitmapFontRec glutBitmap8By13 = {
+"-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1",
+256,
+0,
+chars
+};
+
index a3a02a4c5ff2330396ce9d8735f0c0dcf7d63652..d228a2b150a3210d569dfd5bdc00439ba0eada5a 100644 (file)
-\r
-/* GENERATED FILE -- DO NOT MODIFY */\r
-\r
-#define glutBitmap9By15 XXX\r
-#include "glutbitmap.h"\r
-#undef glutBitmap9By15\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch0data[] = { 0x0 };\r
-static const BitmapCharRec ch0 = {1,1,0,0,9,ch0data};\r
-#else\r
-static const BitmapCharRec ch0 = {0,0,0,0,9,0};\r
-#endif\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch32data[] = { 0x0 };\r
-static const BitmapCharRec ch32 = {1,1,0,0,9,ch32data};\r
-#else\r
-static const BitmapCharRec ch32 = {0,0,0,0,9,0};\r
-#endif\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch127data[] = { 0x0 };\r
-static const BitmapCharRec ch127 = {1,1,0,0,9,ch127data};\r
-#else\r
-static const BitmapCharRec ch127 = {0,0,0,0,9,0};\r
-#endif\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch160data[] = { 0x0 };\r
-static const BitmapCharRec ch160 = {1,1,0,0,9,ch160data};\r
-#else\r
-static const BitmapCharRec ch160 = {0,0,0,0,9,0};\r
-#endif\r
-\r
-/* char: 0xff */\r
-\r
-static const GLubyte ch255data[] = {\r
-0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch255 = {6,14,-1,3,9,ch255data};\r
-\r
-/* char: 0xfe */\r
-\r
-static const GLubyte ch254data[] = {\r
-0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch254 = {7,12,-1,3,9,ch254data};\r
-\r
-/* char: 0xfd */\r
-\r
-static const GLubyte ch253data[] = {\r
-0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch253 = {6,14,-1,3,9,ch253data};\r
-\r
-/* char: 0xfc */\r
-\r
-static const GLubyte ch252data[] = {\r
-0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch252 = {7,11,-1,0,9,ch252data};\r
-\r
-/* char: 0xfb */\r
-\r
-static const GLubyte ch251data[] = {\r
-0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch251 = {7,11,-1,0,9,ch251data};\r
-\r
-/* char: 0xfa */\r
-\r
-static const GLubyte ch250data[] = {\r
-0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch250 = {7,11,-1,0,9,ch250data};\r
-\r
-/* char: 0xf9 */\r
-\r
-static const GLubyte ch249data[] = {\r
-0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch249 = {7,11,-1,0,9,ch249data};\r
-\r
-/* char: 0xf8 */\r
-\r
-static const GLubyte ch248data[] = {\r
-0x80,0x7c,0xa2,0xa2,0x92,0x8a,0x8a,0x7c,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch248 = {7,9,-1,1,9,ch248data};\r
-\r
-/* char: 0xf7 */\r
-\r
-static const GLubyte ch247data[] = {\r
-0x10,0x38,0x10,0x0,0xfe,0x0,0x10,0x38,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch247 = {7,9,-1,0,9,ch247data};\r
-\r
-/* char: 0xf6 */\r
-\r
-static const GLubyte ch246data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch246 = {7,11,-1,0,9,ch246data};\r
-\r
-/* char: 0xf5 */\r
-\r
-static const GLubyte ch245data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch245 = {7,11,-1,0,9,ch245data};\r
-\r
-/* char: 0xf4 */\r
-\r
-static const GLubyte ch244data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch244 = {7,11,-1,0,9,ch244data};\r
-\r
-/* char: 0xf3 */\r
-\r
-static const GLubyte ch243data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch243 = {7,11,-1,0,9,ch243data};\r
-\r
-/* char: 0xf2 */\r
-\r
-static const GLubyte ch242data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch242 = {7,11,-1,0,9,ch242data};\r
-\r
-/* char: 0xf1 */\r
-\r
-static const GLubyte ch241data[] = {\r
-0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x0,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch241 = {7,11,-1,0,9,ch241data};\r
-\r
-/* char: 0xf0 */\r
-\r
-static const GLubyte ch240data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x8,0x50,0x30,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch240 = {7,11,-1,0,9,ch240data};\r
-\r
-/* char: 0xef */\r
-\r
-static const GLubyte ch239data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x50,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch239 = {5,11,-2,0,9,ch239data};\r
-\r
-/* char: 0xee */\r
-\r
-static const GLubyte ch238data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch238 = {5,11,-2,0,9,ch238data};\r
-\r
-/* char: 0xed */\r
-\r
-static const GLubyte ch237data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch237 = {5,11,-2,0,9,ch237data};\r
-\r
-/* char: 0xec */\r
-\r
-static const GLubyte ch236data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x30,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch236 = {5,11,-2,0,9,ch236data};\r
-\r
-/* char: 0xeb */\r
-\r
-static const GLubyte ch235data[] = {\r
-0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch235 = {7,11,-1,0,9,ch235data};\r
-\r
-/* char: 0xea */\r
-\r
-static const GLubyte ch234data[] = {\r
-0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch234 = {7,11,-1,0,9,ch234data};\r
-\r
-/* char: 0xe9 */\r
-\r
-static const GLubyte ch233data[] = {\r
-0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch233 = {7,11,-1,0,9,ch233data};\r
-\r
-/* char: 0xe8 */\r
-\r
-static const GLubyte ch232data[] = {\r
-0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch232 = {7,11,-1,0,9,ch232data};\r
-\r
-/* char: 0xe7 */\r
-\r
-static const GLubyte ch231data[] = {\r
-0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch231 = {7,10,-1,3,9,ch231data};\r
-\r
-/* char: 0xe6 */\r
-\r
-static const GLubyte ch230data[] = {\r
-0x6e,0x92,0x90,0x7c,0x12,0x92,0x6c,\r
-};\r
-\r
-static const BitmapCharRec ch230 = {7,7,-1,0,9,ch230data};\r
-\r
-/* char: 0xe5 */\r
-\r
-static const GLubyte ch229data[] = {\r
-0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x18,0x24,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch229 = {7,11,-1,0,9,ch229data};\r
-\r
-/* char: 0xe4 */\r
-\r
-static const GLubyte ch228data[] = {\r
-0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch228 = {7,11,-1,0,9,ch228data};\r
-\r
-/* char: 0xe3 */\r
-\r
-static const GLubyte ch227data[] = {\r
-0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch227 = {7,11,-1,0,9,ch227data};\r
-\r
-/* char: 0xe2 */\r
-\r
-static const GLubyte ch226data[] = {\r
-0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch226 = {7,11,-1,0,9,ch226data};\r
-\r
-/* char: 0xe1 */\r
-\r
-static const GLubyte ch225data[] = {\r
-0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch225 = {7,11,-1,0,9,ch225data};\r
-\r
-/* char: 0xe0 */\r
-\r
-static const GLubyte ch224data[] = {\r
-0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch224 = {7,11,-1,0,9,ch224data};\r
-\r
-/* char: 0xdf */\r
-\r
-static const GLubyte ch223data[] = {\r
-0x80,0xbc,0xc2,0x82,0x82,0xfc,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch223 = {7,9,-1,1,9,ch223data};\r
-\r
-/* char: 0xde */\r
-\r
-static const GLubyte ch222data[] = {\r
-0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch222 = {7,10,-1,0,9,ch222data};\r
-\r
-/* char: 0xdd */\r
-\r
-static const GLubyte ch221data[] = {\r
-0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch221 = {7,11,-1,0,9,ch221data};\r
-\r
-/* char: 0xdc */\r
-\r
-static const GLubyte ch220data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch220 = {7,11,-1,0,9,ch220data};\r
-\r
-/* char: 0xdb */\r
-\r
-static const GLubyte ch219data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch219 = {7,11,-1,0,9,ch219data};\r
-\r
-/* char: 0xda */\r
-\r
-static const GLubyte ch218data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch218 = {7,11,-1,0,9,ch218data};\r
-\r
-/* char: 0xd9 */\r
-\r
-static const GLubyte ch217data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch217 = {7,11,-1,0,9,ch217data};\r
-\r
-/* char: 0xd8 */\r
-\r
-static const GLubyte ch216data[] = {\r
-0x80,0x7c,0xc2,0xa2,0xa2,0x92,0x92,0x8a,0x8a,0x86,0x7c,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch216 = {7,12,-1,1,9,ch216data};\r
-\r
-/* char: 0xd7 */\r
-\r
-static const GLubyte ch215data[] = {\r
-0x82,0x44,0x28,0x10,0x28,0x44,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch215 = {7,7,-1,-1,9,ch215data};\r
-\r
-/* char: 0xd6 */\r
-\r
-static const GLubyte ch214data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch214 = {7,11,-1,0,9,ch214data};\r
-\r
-/* char: 0xd5 */\r
-\r
-static const GLubyte ch213data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch213 = {7,11,-1,0,9,ch213data};\r
-\r
-/* char: 0xd4 */\r
-\r
-static const GLubyte ch212data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch212 = {7,11,-1,0,9,ch212data};\r
-\r
-/* char: 0xd3 */\r
-\r
-static const GLubyte ch211data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch211 = {7,11,-1,0,9,ch211data};\r
-\r
-/* char: 0xd2 */\r
-\r
-static const GLubyte ch210data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch210 = {7,11,-1,0,9,ch210data};\r
-\r
-/* char: 0xd1 */\r
-\r
-static const GLubyte ch209data[] = {\r
-0x82,0x86,0x8a,0x92,0x92,0xa2,0xc2,0x82,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch209 = {7,11,-1,0,9,ch209data};\r
-\r
-/* char: 0xd0 */\r
-\r
-static const GLubyte ch208data[] = {\r
-0xfc,0x42,0x42,0x42,0x42,0xf2,0x42,0x42,0x42,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch208 = {7,10,-1,0,9,ch208data};\r
-\r
-/* char: 0xcf */\r
-\r
-static const GLubyte ch207data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch207 = {5,11,-2,0,9,ch207data};\r
-\r
-/* char: 0xce */\r
-\r
-static const GLubyte ch206data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch206 = {5,11,-2,0,9,ch206data};\r
-\r
-/* char: 0xcd */\r
-\r
-static const GLubyte ch205data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x60,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch205 = {5,11,-2,0,9,ch205data};\r
-\r
-/* char: 0xcc */\r
-\r
-static const GLubyte ch204data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x30,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch204 = {5,11,-2,0,9,ch204data};\r
-\r
-/* char: 0xcb */\r
-\r
-static const GLubyte ch203data[] = {\r
-0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch203 = {7,11,-1,0,9,ch203data};\r
-\r
-/* char: 0xca */\r
-\r
-static const GLubyte ch202data[] = {\r
-0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch202 = {7,11,-1,0,9,ch202data};\r
-\r
-/* char: 0xc9 */\r
-\r
-static const GLubyte ch201data[] = {\r
-0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch201 = {7,11,-1,0,9,ch201data};\r
-\r
-/* char: 0xc8 */\r
-\r
-static const GLubyte ch200data[] = {\r
-0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch200 = {7,11,-1,0,9,ch200data};\r
-\r
-/* char: 0xc7 */\r
-\r
-static const GLubyte ch199data[] = {\r
-0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch199 = {7,13,-1,3,9,ch199data};\r
-\r
-/* char: 0xc6 */\r
-\r
-static const GLubyte ch198data[] = {\r
-0x9e,0x90,0x90,0x90,0xfc,0x90,0x90,0x90,0x90,0x6e,\r
-};\r
-\r
-static const BitmapCharRec ch198 = {7,10,-1,0,9,ch198data};\r
-\r
-/* char: 0xc5 */\r
-\r
-static const GLubyte ch197data[] = {\r
-0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x10,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch197 = {7,11,-1,0,9,ch197data};\r
-\r
-/* char: 0xc4 */\r
-\r
-static const GLubyte ch196data[] = {\r
-0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data};\r
-\r
-/* char: 0xc3 */\r
-\r
-static const GLubyte ch195data[] = {\r
-0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch195 = {7,11,-1,0,9,ch195data};\r
-\r
-/* char: 0xc2 */\r
-\r
-static const GLubyte ch194data[] = {\r
-0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch194 = {7,11,-1,0,9,ch194data};\r
-\r
-/* char: 0xc1 */\r
-\r
-static const GLubyte ch193data[] = {\r
-0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x30,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch193 = {7,11,-1,0,9,ch193data};\r
-\r
-/* char: 0xc0 */\r
-\r
-static const GLubyte ch192data[] = {\r
-0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x18,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch192 = {7,11,-1,0,9,ch192data};\r
-\r
-/* char: 0xbf */\r
-\r
-static const GLubyte ch191data[] = {\r
-0x7c,0x82,0x82,0x80,0x40,0x20,0x10,0x10,0x0,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch191 = {7,10,-1,0,9,ch191data};\r
-\r
-/* char: 0xbe */\r
-\r
-static const GLubyte ch190data[] = {\r
-0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch190 = {7,10,-1,0,9,ch190data};\r
-\r
-/* char: 0xbd */\r
-\r
-static const GLubyte ch189data[] = {\r
-0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch189 = {7,10,-1,0,9,ch189data};\r
-\r
-/* char: 0xbc */\r
-\r
-static const GLubyte ch188data[] = {\r
-0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch188 = {7,10,-1,0,9,ch188data};\r
-\r
-/* char: 0xbb */\r
-\r
-static const GLubyte ch187data[] = {\r
-0x90,0x48,0x24,0x12,0x12,0x24,0x48,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data};\r
-\r
-/* char: 0xba */\r
-\r
-static const GLubyte ch186data[] = {\r
-0xf8,0x0,0x70,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch186 = {5,6,-1,-5,9,ch186data};\r
-\r
-/* char: 0xb9 */\r
-\r
-static const GLubyte ch185data[] = {\r
-0xe0,0x40,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch185 = {3,6,-1,-4,9,ch185data};\r
-\r
-/* char: 0xb8 */\r
-\r
-static const GLubyte ch184data[] = {\r
-0x60,0x90,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch184 = {4,3,-2,3,9,ch184data};\r
-\r
-/* char: 0xb7 */\r
-\r
-static const GLubyte ch183data[] = {\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch183 = {2,2,-4,-4,9,ch183data};\r
-\r
-/* char: 0xb6 */\r
-\r
-static const GLubyte ch182data[] = {\r
-0xa,0xa,0xa,0xa,0xa,0x7a,0x8a,0x8a,0x8a,0x7e,\r
-};\r
-\r
-static const BitmapCharRec ch182 = {7,10,-1,0,9,ch182data};\r
-\r
-/* char: 0xb5 */\r
-\r
-static const GLubyte ch181data[] = {\r
-0x80,0x80,0xba,0xc6,0x82,0x82,0x82,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch181 = {7,9,-1,2,9,ch181data};\r
-\r
-/* char: 0xb4 */\r
-\r
-static const GLubyte ch180data[] = {\r
-0xc0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch180 = {3,2,-3,-9,9,ch180data};\r
-\r
-/* char: 0xb3 */\r
-\r
-static const GLubyte ch179data[] = {\r
-0x60,0x90,0x10,0x20,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch179 = {4,6,-1,-4,9,ch179data};\r
-\r
-/* char: 0xb2 */\r
-\r
-static const GLubyte ch178data[] = {\r
-0xf0,0x80,0x60,0x10,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch178 = {4,6,-1,-4,9,ch178data};\r
-\r
-/* char: 0xb1 */\r
-\r
-static const GLubyte ch177data[] = {\r
-0xfe,0x0,0x10,0x10,0x10,0xfe,0x10,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch177 = {7,9,-1,-1,9,ch177data};\r
-\r
-/* char: 0xb0 */\r
-\r
-static const GLubyte ch176data[] = {\r
-0x60,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch176 = {4,4,-3,-6,9,ch176data};\r
-\r
-/* char: 0xaf */\r
-\r
-static const GLubyte ch175data[] = {\r
-0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch175 = {6,1,-1,-9,9,ch175data};\r
-\r
-/* char: 0xae */\r
-\r
-static const GLubyte ch174data[] = {\r
-0x3c,0x42,0xa5,0xa9,0xbd,0xa5,0xb9,0x42,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch174 = {8,9,0,-1,9,ch174data};\r
-\r
-/* char: 0xad */\r
-\r
-static const GLubyte ch173data[] = {\r
-0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch173 = {6,1,-1,-4,9,ch173data};\r
-\r
-/* char: 0xac */\r
-\r
-static const GLubyte ch172data[] = {\r
-0x4,0x4,0x4,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch172 = {6,4,-1,-2,9,ch172data};\r
-\r
-/* char: 0xab */\r
-\r
-static const GLubyte ch171data[] = {\r
-0x12,0x24,0x48,0x90,0x90,0x48,0x24,0x12,\r
-};\r
-\r
-static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data};\r
-\r
-/* char: 0xaa */\r
-\r
-static const GLubyte ch170data[] = {\r
-0xf8,0x0,0x78,0x90,0x70,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch170 = {5,7,-3,-3,9,ch170data};\r
-\r
-/* char: 0xa9 */\r
-\r
-static const GLubyte ch169data[] = {\r
-0x3c,0x42,0x99,0xa5,0xa1,0xa5,0x99,0x42,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch169 = {8,9,0,-1,9,ch169data};\r
-\r
-/* char: 0xa8 */\r
-\r
-static const GLubyte ch168data[] = {\r
-0xa0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch168 = {3,2,-3,-9,9,ch168data};\r
-\r
-/* char: 0xa7 */\r
-\r
-static const GLubyte ch167data[] = {\r
-0x70,0x88,0x8,0x70,0x88,0x88,0x88,0x70,0x80,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch167 = {5,11,-2,1,9,ch167data};\r
-\r
-/* char: 0xa6 */\r
-\r
-static const GLubyte ch166data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch166 = {1,11,-4,1,9,ch166data};\r
-\r
-/* char: 0xa5 */\r
-\r
-static const GLubyte ch165data[] = {\r
-0x10,0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch165 = {7,10,-1,0,9,ch165data};\r
-\r
-/* char: 0xa4 */\r
-\r
-static const GLubyte ch164data[] = {\r
-0x82,0x7c,0x44,0x44,0x7c,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch164 = {7,6,-1,-3,9,ch164data};\r
-\r
-/* char: 0xa3 */\r
-\r
-static const GLubyte ch163data[] = {\r
-0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c,\r
-};\r
-\r
-static const BitmapCharRec ch163 = {7,10,-1,0,9,ch163data};\r
-\r
-/* char: 0xa2 */\r
-\r
-static const GLubyte ch162data[] = {\r
-0x40,0x78,0xa4,0xa0,0x90,0x94,0x78,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch162 = {6,8,-1,0,9,ch162data};\r
-\r
-/* char: 0xa1 */\r
-\r
-static const GLubyte ch161data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch161 = {1,11,-4,0,9,ch161data};\r
-\r
-/* char: 0x7e '~' */\r
-\r
-static const GLubyte ch126data[] = {\r
-0x8c,0x92,0x62,\r
-};\r
-\r
-static const BitmapCharRec ch126 = {7,3,-1,-7,9,ch126data};\r
-\r
-/* char: 0x7d '}' */\r
-\r
-static const GLubyte ch125data[] = {\r
-0xe0,0x10,0x10,0x10,0x20,0x18,0x18,0x20,0x10,0x10,0x10,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch125 = {5,12,-1,1,9,ch125data};\r
-\r
-/* char: 0x7c '|' */\r
-\r
-static const GLubyte ch124data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch124 = {1,12,-4,1,9,ch124data};\r
-\r
-/* char: 0x7b '{' */\r
-\r
-static const GLubyte ch123data[] = {\r
-0x38,0x40,0x40,0x40,0x20,0xc0,0xc0,0x20,0x40,0x40,0x40,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch123 = {5,12,-3,1,9,ch123data};\r
-\r
-/* char: 0x7a 'z' */\r
-\r
-static const GLubyte ch122data[] = {\r
-0xfe,0x40,0x20,0x10,0x8,0x4,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch122 = {7,7,-1,0,9,ch122data};\r
-\r
-/* char: 0x79 'y' */\r
-\r
-static const GLubyte ch121data[] = {\r
-0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch121 = {6,10,-1,3,9,ch121data};\r
-\r
-/* char: 0x78 'x' */\r
-\r
-static const GLubyte ch120data[] = {\r
-0x82,0x44,0x28,0x10,0x28,0x44,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch120 = {7,7,-1,0,9,ch120data};\r
-\r
-/* char: 0x77 'w' */\r
-\r
-static const GLubyte ch119data[] = {\r
-0x44,0xaa,0x92,0x92,0x92,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch119 = {7,7,-1,0,9,ch119data};\r
-\r
-/* char: 0x76 'v' */\r
-\r
-static const GLubyte ch118data[] = {\r
-0x10,0x28,0x28,0x44,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch118 = {7,7,-1,0,9,ch118data};\r
-\r
-/* char: 0x75 'u' */\r
-\r
-static const GLubyte ch117data[] = {\r
-0x7a,0x84,0x84,0x84,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch117 = {7,7,-1,0,9,ch117data};\r
-\r
-/* char: 0x74 't' */\r
-\r
-static const GLubyte ch116data[] = {\r
-0x1c,0x22,0x20,0x20,0x20,0x20,0xfc,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch116 = {7,9,-1,0,9,ch116data};\r
-\r
-/* char: 0x73 's' */\r
-\r
-static const GLubyte ch115data[] = {\r
-0x7c,0x82,0x2,0x7c,0x80,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch115 = {7,7,-1,0,9,ch115data};\r
-\r
-/* char: 0x72 'r' */\r
-\r
-static const GLubyte ch114data[] = {\r
-0x40,0x40,0x40,0x40,0x42,0x62,0x9c,\r
-};\r
-\r
-static const BitmapCharRec ch114 = {7,7,-1,0,9,ch114data};\r
-\r
-/* char: 0x71 'q' */\r
-\r
-static const GLubyte ch113data[] = {\r
-0x2,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x86,0x7a,\r
-};\r
-\r
-static const BitmapCharRec ch113 = {7,10,-1,3,9,ch113data};\r
-\r
-/* char: 0x70 'p' */\r
-\r
-static const GLubyte ch112data[] = {\r
-0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,\r
-};\r
-\r
-static const BitmapCharRec ch112 = {7,10,-1,3,9,ch112data};\r
-\r
-/* char: 0x6f 'o' */\r
-\r
-static const GLubyte ch111data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch111 = {7,7,-1,0,9,ch111data};\r
-\r
-/* char: 0x6e 'n' */\r
-\r
-static const GLubyte ch110data[] = {\r
-0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,\r
-};\r
-\r
-static const BitmapCharRec ch110 = {7,7,-1,0,9,ch110data};\r
-\r
-/* char: 0x6d 'm' */\r
-\r
-static const GLubyte ch109data[] = {\r
-0x82,0x92,0x92,0x92,0x92,0x92,0xec,\r
-};\r
-\r
-static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data};\r
-\r
-/* char: 0x6c 'l' */\r
-\r
-static const GLubyte ch108data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch108 = {5,10,-2,0,9,ch108data};\r
-\r
-/* char: 0x6b 'k' */\r
-\r
-static const GLubyte ch107data[] = {\r
-0x82,0x8c,0xb0,0xc0,0xb0,0x8c,0x82,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch107 = {7,10,-1,0,9,ch107data};\r
-\r
-/* char: 0x6a 'j' */\r
-\r
-static const GLubyte ch106data[] = {\r
-0x78,0x84,0x84,0x84,0x4,0x4,0x4,0x4,0x4,0x1c,0x0,0x0,0xc,\r
-};\r
-\r
-static const BitmapCharRec ch106 = {6,13,-1,3,9,ch106data};\r
-\r
-/* char: 0x69 'i' */\r
-\r
-static const GLubyte ch105data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch105 = {5,10,-2,0,9,ch105data};\r
-\r
-/* char: 0x68 'h' */\r
-\r
-static const GLubyte ch104data[] = {\r
-0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch104 = {7,10,-1,0,9,ch104data};\r
-\r
-/* char: 0x67 'g' */\r
-\r
-static const GLubyte ch103data[] = {\r
-0x7c,0x82,0x82,0x7c,0x80,0x78,0x84,0x84,0x84,0x7a,\r
-};\r
-\r
-static const BitmapCharRec ch103 = {7,10,-1,3,9,ch103data};\r
-\r
-/* char: 0x66 'f' */\r
-\r
-static const GLubyte ch102data[] = {\r
-0x20,0x20,0x20,0x20,0xf8,0x20,0x20,0x22,0x22,0x1c,\r
-};\r
-\r
-static const BitmapCharRec ch102 = {7,10,-1,0,9,ch102data};\r
-\r
-/* char: 0x65 'e' */\r
-\r
-static const GLubyte ch101data[] = {\r
-0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch101 = {7,7,-1,0,9,ch101data};\r
-\r
-/* char: 0x64 'd' */\r
-\r
-static const GLubyte ch100data[] = {\r
-0x7a,0x86,0x82,0x82,0x82,0x86,0x7a,0x2,0x2,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch100 = {7,10,-1,0,9,ch100data};\r
-\r
-/* char: 0x63 'c' */\r
-\r
-static const GLubyte ch99data[] = {\r
-0x7c,0x82,0x80,0x80,0x80,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch99 = {7,7,-1,0,9,ch99data};\r
-\r
-/* char: 0x62 'b' */\r
-\r
-static const GLubyte ch98data[] = {\r
-0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch98 = {7,10,-1,0,9,ch98data};\r
-\r
-/* char: 0x61 'a' */\r
-\r
-static const GLubyte ch97data[] = {\r
-0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch97 = {7,7,-1,0,9,ch97data};\r
-\r
-/* char: 0x60 '`' */\r
-\r
-static const GLubyte ch96data[] = {\r
-0x10,0x20,0x40,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch96 = {4,4,-3,-6,9,ch96data};\r
-\r
-/* char: 0x5f '_' */\r
-\r
-static const GLubyte ch95data[] = {\r
-0xff,\r
-};\r
-\r
-static const BitmapCharRec ch95 = {8,1,0,1,9,ch95data};\r
-\r
-/* char: 0x5e '^' */\r
-\r
-static const GLubyte ch94data[] = {\r
-0x82,0x44,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch94 = {7,4,-1,-6,9,ch94data};\r
-\r
-/* char: 0x5d ']' */\r
-\r
-static const GLubyte ch93data[] = {\r
-0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch93 = {4,12,-2,1,9,ch93data};\r
-\r
-/* char: 0x5c '\' */\r
-\r
-static const GLubyte ch92data[] = {\r
-0x2,0x4,0x4,0x8,0x10,0x10,0x20,0x40,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch92 = {7,10,-1,0,9,ch92data};\r
-\r
-/* char: 0x5b '[' */\r
-\r
-static const GLubyte ch91data[] = {\r
-0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch91 = {4,12,-3,1,9,ch91data};\r
-\r
-/* char: 0x5a 'Z' */\r
-\r
-static const GLubyte ch90data[] = {\r
-0xfe,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch90 = {7,10,-1,0,9,ch90data};\r
-\r
-/* char: 0x59 'Y' */\r
-\r
-static const GLubyte ch89data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch89 = {7,10,-1,0,9,ch89data};\r
-\r
-/* char: 0x58 'X' */\r
-\r
-static const GLubyte ch88data[] = {\r
-0x82,0x82,0x44,0x28,0x10,0x10,0x28,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch88 = {7,10,-1,0,9,ch88data};\r
-\r
-/* char: 0x57 'W' */\r
-\r
-static const GLubyte ch87data[] = {\r
-0x44,0xaa,0x92,0x92,0x92,0x92,0x82,0x82,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch87 = {7,10,-1,0,9,ch87data};\r
-\r
-/* char: 0x56 'V' */\r
-\r
-static const GLubyte ch86data[] = {\r
-0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch86 = {7,10,-1,0,9,ch86data};\r
-\r
-/* char: 0x55 'U' */\r
-\r
-static const GLubyte ch85data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch85 = {7,10,-1,0,9,ch85data};\r
-\r
-/* char: 0x54 'T' */\r
-\r
-static const GLubyte ch84data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch84 = {7,10,-1,0,9,ch84data};\r
-\r
-/* char: 0x53 'S' */\r
-\r
-static const GLubyte ch83data[] = {\r
-0x7c,0x82,0x82,0x2,0xc,0x70,0x80,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch83 = {7,10,-1,0,9,ch83data};\r
-\r
-/* char: 0x52 'R' */\r
-\r
-static const GLubyte ch82data[] = {\r
-0x82,0x82,0x84,0x88,0x90,0xfc,0x82,0x82,0x82,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch82 = {7,10,-1,0,9,ch82data};\r
-\r
-/* char: 0x51 'Q' */\r
-\r
-static const GLubyte ch81data[] = {\r
-0x6,0x8,0x7c,0x92,0xa2,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch81 = {7,12,-1,2,9,ch81data};\r
-\r
-/* char: 0x50 'P' */\r
-\r
-static const GLubyte ch80data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch80 = {7,10,-1,0,9,ch80data};\r
-\r
-/* char: 0x4f 'O' */\r
-\r
-static const GLubyte ch79data[] = {\r
-0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch79 = {7,10,-1,0,9,ch79data};\r
-\r
-/* char: 0x4e 'N' */\r
-\r
-static const GLubyte ch78data[] = {\r
-0x82,0x82,0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch78 = {7,10,-1,0,9,ch78data};\r
-\r
-/* char: 0x4d 'M' */\r
-\r
-static const GLubyte ch77data[] = {\r
-0x82,0x82,0x82,0x92,0x92,0xaa,0xaa,0xc6,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch77 = {7,10,-1,0,9,ch77data};\r
-\r
-/* char: 0x4c 'L' */\r
-\r
-static const GLubyte ch76data[] = {\r
-0xfe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch76 = {7,10,-1,0,9,ch76data};\r
-\r
-/* char: 0x4b 'K' */\r
-\r
-static const GLubyte ch75data[] = {\r
-0x82,0x84,0x88,0x90,0xa0,0xe0,0x90,0x88,0x84,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch75 = {7,10,-1,0,9,ch75data};\r
-\r
-/* char: 0x4a 'J' */\r
-\r
-static const GLubyte ch74data[] = {\r
-0x78,0x84,0x4,0x4,0x4,0x4,0x4,0x4,0x4,0x1e,\r
-};\r
-\r
-static const BitmapCharRec ch74 = {7,10,-1,0,9,ch74data};\r
-\r
-/* char: 0x49 'I' */\r
-\r
-static const GLubyte ch73data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch73 = {5,10,-2,0,9,ch73data};\r
-\r
-/* char: 0x48 'H' */\r
-\r
-static const GLubyte ch72data[] = {\r
-0x82,0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch72 = {7,10,-1,0,9,ch72data};\r
-\r
-/* char: 0x47 'G' */\r
-\r
-static const GLubyte ch71data[] = {\r
-0x7c,0x82,0x82,0x82,0x8e,0x80,0x80,0x80,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch71 = {7,10,-1,0,9,ch71data};\r
-\r
-/* char: 0x46 'F' */\r
-\r
-static const GLubyte ch70data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch70 = {7,10,-1,0,9,ch70data};\r
-\r
-/* char: 0x45 'E' */\r
-\r
-static const GLubyte ch69data[] = {\r
-0xfe,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch69 = {7,10,-1,0,9,ch69data};\r
-\r
-/* char: 0x44 'D' */\r
-\r
-static const GLubyte ch68data[] = {\r
-0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch68 = {7,10,-1,0,9,ch68data};\r
-\r
-/* char: 0x43 'C' */\r
-\r
-static const GLubyte ch67data[] = {\r
-0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch67 = {7,10,-1,0,9,ch67data};\r
-\r
-/* char: 0x42 'B' */\r
-\r
-static const GLubyte ch66data[] = {\r
-0xfc,0x42,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch66 = {7,10,-1,0,9,ch66data};\r
-\r
-/* char: 0x41 'A' */\r
-\r
-static const GLubyte ch65data[] = {\r
-0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x44,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch65 = {7,10,-1,0,9,ch65data};\r
-\r
-/* char: 0x40 '@' */\r
-\r
-static const GLubyte ch64data[] = {\r
-0x7c,0x80,0x80,0x9a,0xa6,0xa2,0x9e,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch64 = {7,10,-1,0,9,ch64data};\r
-\r
-/* char: 0x3f '?' */\r
-\r
-static const GLubyte ch63data[] = {\r
-0x10,0x0,0x10,0x10,0x8,0x4,0x2,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch63 = {7,10,-1,0,9,ch63data};\r
-\r
-/* char: 0x3e '>' */\r
-\r
-static const GLubyte ch62data[] = {\r
-0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch62 = {5,10,-2,0,9,ch62data};\r
-\r
-/* char: 0x3d '=' */\r
-\r
-static const GLubyte ch61data[] = {\r
-0xfe,0x0,0x0,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch61 = {7,4,-1,-2,9,ch61data};\r
-\r
-/* char: 0x3c '<' */\r
-\r
-static const GLubyte ch60data[] = {\r
-0x8,0x10,0x20,0x40,0x80,0x80,0x40,0x20,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch60 = {5,10,-2,0,9,ch60data};\r
-\r
-/* char: 0x3b ';' */\r
-\r
-static const GLubyte ch59data[] = {\r
-0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch59 = {2,10,-4,3,9,ch59data};\r
-\r
-/* char: 0x3a ':' */\r
-\r
-static const GLubyte ch58data[] = {\r
-0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch58 = {2,7,-4,0,9,ch58data};\r
-\r
-/* char: 0x39 '9' */\r
-\r
-static const GLubyte ch57data[] = {\r
-0x78,0x4,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch57 = {7,10,-1,0,9,ch57data};\r
-\r
-/* char: 0x38 '8' */\r
-\r
-static const GLubyte ch56data[] = {\r
-0x38,0x44,0x82,0x82,0x44,0x38,0x44,0x82,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch56 = {7,10,-1,0,9,ch56data};\r
-\r
-/* char: 0x37 '7' */\r
-\r
-static const GLubyte ch55data[] = {\r
-0x40,0x40,0x20,0x20,0x10,0x8,0x4,0x2,0x2,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch55 = {7,10,-1,0,9,ch55data};\r
-\r
-/* char: 0x36 '6' */\r
-\r
-static const GLubyte ch54data[] = {\r
-0x7c,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x40,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch54 = {7,10,-1,0,9,ch54data};\r
-\r
-/* char: 0x35 '5' */\r
-\r
-static const GLubyte ch53data[] = {\r
-0x7c,0x82,0x2,0x2,0x2,0xc2,0xbc,0x80,0x80,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch53 = {7,10,-1,0,9,ch53data};\r
-\r
-/* char: 0x34 '4' */\r
-\r
-static const GLubyte ch52data[] = {\r
-0x4,0x4,0x4,0xfe,0x84,0x44,0x24,0x14,0xc,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch52 = {7,10,-1,0,9,ch52data};\r
-\r
-/* char: 0x33 '3' */\r
-\r
-static const GLubyte ch51data[] = {\r
-0x7c,0x82,0x2,0x2,0x2,0x1c,0x8,0x4,0x2,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch51 = {7,10,-1,0,9,ch51data};\r
-\r
-/* char: 0x32 '2' */\r
-\r
-static const GLubyte ch50data[] = {\r
-0xfe,0x80,0x40,0x30,0x8,0x4,0x2,0x82,0x82,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch50 = {7,10,-1,0,9,ch50data};\r
-\r
-/* char: 0x31 '1' */\r
-\r
-static const GLubyte ch49data[] = {\r
-0xfe,0x10,0x10,0x10,0x10,0x10,0x90,0x50,0x30,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch49 = {7,10,-1,0,9,ch49data};\r
-\r
-/* char: 0x30 '0' */\r
-\r
-static const GLubyte ch48data[] = {\r
-0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch48 = {7,10,-1,0,9,ch48data};\r
-\r
-/* char: 0x2f '/' */\r
-\r
-static const GLubyte ch47data[] = {\r
-0x80,0x40,0x40,0x20,0x10,0x10,0x8,0x4,0x4,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch47 = {7,10,-1,0,9,ch47data};\r
-\r
-/* char: 0x2e '.' */\r
-\r
-static const GLubyte ch46data[] = {\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch46 = {2,2,-4,0,9,ch46data};\r
-\r
-/* char: 0x2d '-' */\r
-\r
-static const GLubyte ch45data[] = {\r
-0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch45 = {7,1,-1,-4,9,ch45data};\r
-\r
-/* char: 0x2c ',' */\r
-\r
-static const GLubyte ch44data[] = {\r
-0x80,0x40,0x40,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch44 = {2,5,-4,3,9,ch44data};\r
-\r
-/* char: 0x2b '+' */\r
-\r
-static const GLubyte ch43data[] = {\r
-0x10,0x10,0x10,0xfe,0x10,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch43 = {7,7,-1,-1,9,ch43data};\r
-\r
-/* char: 0x2a '*' */\r
-\r
-static const GLubyte ch42data[] = {\r
-0x10,0x92,0x54,0x38,0x54,0x92,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch42 = {7,7,-1,-1,9,ch42data};\r
-\r
-/* char: 0x29 ')' */\r
-\r
-static const GLubyte ch41data[] = {\r
-0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch41 = {3,12,-3,1,9,ch41data};\r
-\r
-/* char: 0x28 '(' */\r
-\r
-static const GLubyte ch40data[] = {\r
-0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch40 = {3,12,-3,1,9,ch40data};\r
-\r
-/* char: 0x27 ''' */\r
-\r
-static const GLubyte ch39data[] = {\r
-0x80,0x40,0x20,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch39 = {4,4,-3,-6,9,ch39data};\r
-\r
-/* char: 0x26 '&' */\r
-\r
-static const GLubyte ch38data[] = {\r
-0x62,0x94,0x88,0x94,0x62,0x60,0x90,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch38 = {7,10,-1,0,9,ch38data};\r
-\r
-/* char: 0x25 '%' */\r
-\r
-static const GLubyte ch37data[] = {\r
-0x84,0x4a,0x4a,0x24,0x10,0x10,0x48,0xa4,0xa4,0x42,\r
-};\r
-\r
-static const BitmapCharRec ch37 = {7,10,-1,0,9,ch37data};\r
-\r
-/* char: 0x24 '$' */\r
-\r
-static const GLubyte ch36data[] = {\r
-0x10,0x7c,0x92,0x12,0x12,0x14,0x38,0x50,0x90,0x92,0x7c,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch36 = {7,12,-1,1,9,ch36data};\r
-\r
-/* char: 0x23 '#' */\r
-\r
-static const GLubyte ch35data[] = {\r
-0x48,0x48,0xfc,0x48,0x48,0xfc,0x48,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch35 = {6,8,-1,-1,9,ch35data};\r
-\r
-/* char: 0x22 '"' */\r
-\r
-static const GLubyte ch34data[] = {\r
-0x90,0x90,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch34 = {4,3,-3,-7,9,ch34data};\r
-\r
-/* char: 0x21 '!' */\r
-\r
-static const GLubyte ch33data[] = {\r
-0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch33 = {1,11,-4,0,9,ch33data};\r
-\r
-/* char: 0x1f */\r
-\r
-static const GLubyte ch31data[] = {\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch31 = {2,2,-4,-2,9,ch31data};\r
-\r
-/* char: 0x1e */\r
-\r
-static const GLubyte ch30data[] = {\r
-0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c,\r
-};\r
-\r
-static const BitmapCharRec ch30 = {7,10,-1,0,9,ch30data};\r
-\r
-/* char: 0x1d */\r
-\r
-static const GLubyte ch29data[] = {\r
-0x80,0x40,0xfe,0x10,0xfe,0x4,0x2,\r
-};\r
-\r
-static const BitmapCharRec ch29 = {7,7,-1,0,9,ch29data};\r
-\r
-/* char: 0x1c */\r
-\r
-static const GLubyte ch28data[] = {\r
-0x44,0x24,0x24,0x24,0x24,0x24,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch28 = {7,7,-1,0,9,ch28data};\r
-\r
-/* char: 0x1b */\r
-\r
-static const GLubyte ch27data[] = {\r
-0xfe,0x0,0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch27 = {7,12,-1,2,9,ch27data};\r
-\r
-/* char: 0x1a */\r
-\r
-static const GLubyte ch26data[] = {\r
-0xfc,0x0,0x4,0x8,0x10,0x20,0x40,0x40,0x20,0x10,0x8,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch26 = {6,12,-2,2,9,ch26data};\r
-\r
-/* char: 0x19 */\r
-\r
-static const GLubyte ch25data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch25 = {1,15,-4,3,9,ch25data};\r
-\r
-/* char: 0x18 */\r
-\r
-static const GLubyte ch24data[] = {\r
-0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch24 = {9,7,0,3,9,ch24data};\r
-\r
-/* char: 0x17 */\r
-\r
-static const GLubyte ch23data[] = {\r
-0xff,0x80,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,\r
-0x8,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch23 = {9,9,0,-3,9,ch23data};\r
-\r
-/* char: 0x16 */\r
-\r
-static const GLubyte ch22data[] = {\r
-0x8,0x8,0x8,0x8,0x8,0x8,0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch22 = {5,15,0,3,9,ch22data};\r
-\r
-/* char: 0x15 */\r
-\r
-static const GLubyte ch21data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch21 = {5,15,-4,3,9,ch21data};\r
-\r
-/* char: 0x14 */\r
-\r
-static const GLubyte ch20data[] = {\r
-0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch20 = {9,1,0,1,9,ch20data};\r
-\r
-/* char: 0x13 */\r
-\r
-static const GLubyte ch19data[] = {\r
-0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch19 = {9,1,0,-1,9,ch19data};\r
-\r
-/* char: 0x12 */\r
-\r
-static const GLubyte ch18data[] = {\r
-0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch18 = {9,1,0,-3,9,ch18data};\r
-\r
-/* char: 0x11 */\r
-\r
-static const GLubyte ch17data[] = {\r
-0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch17 = {9,1,0,-5,9,ch17data};\r
-\r
-/* char: 0x10 */\r
-\r
-static const GLubyte ch16data[] = {\r
-0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch16 = {9,1,0,-7,9,ch16data};\r
-\r
-/* char: 0xf */\r
-\r
-static const GLubyte ch15data[] = {\r
-0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,0x8,0x0,\r
-0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch15 = {9,15,0,3,9,ch15data};\r
-\r
-/* char: 0xe */\r
-\r
-static const GLubyte ch14data[] = {\r
-0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch14 = {5,9,-4,-3,9,ch14data};\r
-\r
-/* char: 0xd */\r
-\r
-static const GLubyte ch13data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch13 = {5,7,-4,3,9,ch13data};\r
-\r
-/* char: 0xc */\r
-\r
-static const GLubyte ch12data[] = {\r
-0x8,0x8,0x8,0x8,0x8,0x8,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch12 = {5,7,0,3,9,ch12data};\r
-\r
-/* char: 0xb */\r
-\r
-static const GLubyte ch11data[] = {\r
-0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch11 = {5,9,0,-3,9,ch11data};\r
-\r
-/* char: 0xa */\r
-\r
-static const GLubyte ch10data[] = {\r
-0x8,0x8,0x8,0x8,0x3e,0x0,0x20,0x50,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch10 = {7,10,-1,2,9,ch10data};\r
-\r
-/* char: 0x9 */\r
-\r
-static const GLubyte ch9data[] = {\r
-0x3e,0x20,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch9 = {7,10,-1,2,9,ch9data};\r
-\r
-/* char: 0x8 */\r
-\r
-static const GLubyte ch8data[] = {\r
-0xfe,0x10,0x10,0xfe,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch8 = {7,6,-1,0,9,ch8data};\r
-\r
-/* char: 0x7 */\r
-\r
-static const GLubyte ch7data[] = {\r
-0x70,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch7 = {5,4,-2,-6,9,ch7data};\r
-\r
-/* char: 0x6 */\r
-\r
-static const GLubyte ch6data[] = {\r
-0x20,0x20,0x3c,0x20,0x3e,0x0,0xf8,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch6 = {7,10,-1,2,9,ch6data};\r
-\r
-/* char: 0x5 */\r
-\r
-static const GLubyte ch5data[] = {\r
-0x22,0x22,0x3c,0x22,0x3c,0x0,0x78,0x80,0x80,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch5 = {7,10,-1,2,9,ch5data};\r
-\r
-/* char: 0x4 */\r
-\r
-static const GLubyte ch4data[] = {\r
-0x10,0x10,0x1c,0x10,0x1e,0x80,0x80,0xe0,0x80,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch4 = {7,10,-1,2,9,ch4data};\r
-\r
-/* char: 0x3 */\r
-\r
-static const GLubyte ch3data[] = {\r
-0x8,0x8,0x8,0x3e,0x0,0x88,0x88,0xf8,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch3 = {7,10,-1,2,9,ch3data};\r
-\r
-/* char: 0x2 */\r
-\r
-static const GLubyte ch2data[] = {\r
-0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,\r
-};\r
-\r
-static const BitmapCharRec ch2 = {8,14,0,3,9,ch2data};\r
-\r
-/* char: 0x1 */\r
-\r
-static const GLubyte ch1data[] = {\r
-0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch1 = {7,7,-1,0,9,ch1data};\r
-\r
-static const BitmapCharRec * const chars[] = {\r
-&ch0,\r
-&ch1,\r
-&ch2,\r
-&ch3,\r
-&ch4,\r
-&ch5,\r
-&ch6,\r
-&ch7,\r
-&ch8,\r
-&ch9,\r
-&ch10,\r
-&ch11,\r
-&ch12,\r
-&ch13,\r
-&ch14,\r
-&ch15,\r
-&ch16,\r
-&ch17,\r
-&ch18,\r
-&ch19,\r
-&ch20,\r
-&ch21,\r
-&ch22,\r
-&ch23,\r
-&ch24,\r
-&ch25,\r
-&ch26,\r
-&ch27,\r
-&ch28,\r
-&ch29,\r
-&ch30,\r
-&ch31,\r
-&ch32,\r
-&ch33,\r
-&ch34,\r
-&ch35,\r
-&ch36,\r
-&ch37,\r
-&ch38,\r
-&ch39,\r
-&ch40,\r
-&ch41,\r
-&ch42,\r
-&ch43,\r
-&ch44,\r
-&ch45,\r
-&ch46,\r
-&ch47,\r
-&ch48,\r
-&ch49,\r
-&ch50,\r
-&ch51,\r
-&ch52,\r
-&ch53,\r
-&ch54,\r
-&ch55,\r
-&ch56,\r
-&ch57,\r
-&ch58,\r
-&ch59,\r
-&ch60,\r
-&ch61,\r
-&ch62,\r
-&ch63,\r
-&ch64,\r
-&ch65,\r
-&ch66,\r
-&ch67,\r
-&ch68,\r
-&ch69,\r
-&ch70,\r
-&ch71,\r
-&ch72,\r
-&ch73,\r
-&ch74,\r
-&ch75,\r
-&ch76,\r
-&ch77,\r
-&ch78,\r
-&ch79,\r
-&ch80,\r
-&ch81,\r
-&ch82,\r
-&ch83,\r
-&ch84,\r
-&ch85,\r
-&ch86,\r
-&ch87,\r
-&ch88,\r
-&ch89,\r
-&ch90,\r
-&ch91,\r
-&ch92,\r
-&ch93,\r
-&ch94,\r
-&ch95,\r
-&ch96,\r
-&ch97,\r
-&ch98,\r
-&ch99,\r
-&ch100,\r
-&ch101,\r
-&ch102,\r
-&ch103,\r
-&ch104,\r
-&ch105,\r
-&ch106,\r
-&ch107,\r
-&ch108,\r
-&ch109,\r
-&ch110,\r
-&ch111,\r
-&ch112,\r
-&ch113,\r
-&ch114,\r
-&ch115,\r
-&ch116,\r
-&ch117,\r
-&ch118,\r
-&ch119,\r
-&ch120,\r
-&ch121,\r
-&ch122,\r
-&ch123,\r
-&ch124,\r
-&ch125,\r
-&ch126,\r
-&ch127,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-&ch160,\r
-&ch161,\r
-&ch162,\r
-&ch163,\r
-&ch164,\r
-&ch165,\r
-&ch166,\r
-&ch167,\r
-&ch168,\r
-&ch169,\r
-&ch170,\r
-&ch171,\r
-&ch172,\r
-&ch173,\r
-&ch174,\r
-&ch175,\r
-&ch176,\r
-&ch177,\r
-&ch178,\r
-&ch179,\r
-&ch180,\r
-&ch181,\r
-&ch182,\r
-&ch183,\r
-&ch184,\r
-&ch185,\r
-&ch186,\r
-&ch187,\r
-&ch188,\r
-&ch189,\r
-&ch190,\r
-&ch191,\r
-&ch192,\r
-&ch193,\r
-&ch194,\r
-&ch195,\r
-&ch196,\r
-&ch197,\r
-&ch198,\r
-&ch199,\r
-&ch200,\r
-&ch201,\r
-&ch202,\r
-&ch203,\r
-&ch204,\r
-&ch205,\r
-&ch206,\r
-&ch207,\r
-&ch208,\r
-&ch209,\r
-&ch210,\r
-&ch211,\r
-&ch212,\r
-&ch213,\r
-&ch214,\r
-&ch215,\r
-&ch216,\r
-&ch217,\r
-&ch218,\r
-&ch219,\r
-&ch220,\r
-&ch221,\r
-&ch222,\r
-&ch223,\r
-&ch224,\r
-&ch225,\r
-&ch226,\r
-&ch227,\r
-&ch228,\r
-&ch229,\r
-&ch230,\r
-&ch231,\r
-&ch232,\r
-&ch233,\r
-&ch234,\r
-&ch235,\r
-&ch236,\r
-&ch237,\r
-&ch238,\r
-&ch239,\r
-&ch240,\r
-&ch241,\r
-&ch242,\r
-&ch243,\r
-&ch244,\r
-&ch245,\r
-&ch246,\r
-&ch247,\r
-&ch248,\r
-&ch249,\r
-&ch250,\r
-&ch251,\r
-&ch252,\r
-&ch253,\r
-&ch254,\r
-&ch255,\r
-};\r
-#if !defined(__IBMCPP__)\r
-const \r
-#endif\r
- BitmapFontRec glutBitmap9By15 = {\r
-"-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1",\r
-256,\r
-0,\r
-chars\r
-};\r
-\r
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#define glutBitmap9By15 XXX
+#include "glutbitmap.h"
+#undef glutBitmap9By15
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch0data[] = { 0x0 };
+static const BitmapCharRec ch0 = {1,1,0,0,9,ch0data};
+#else
+static const BitmapCharRec ch0 = {0,0,0,0,9,0};
+#endif
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch32data[] = { 0x0 };
+static const BitmapCharRec ch32 = {1,1,0,0,9,ch32data};
+#else
+static const BitmapCharRec ch32 = {0,0,0,0,9,0};
+#endif
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch127data[] = { 0x0 };
+static const BitmapCharRec ch127 = {1,1,0,0,9,ch127data};
+#else
+static const BitmapCharRec ch127 = {0,0,0,0,9,0};
+#endif
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch160data[] = { 0x0 };
+static const BitmapCharRec ch160 = {1,1,0,0,9,ch160data};
+#else
+static const BitmapCharRec ch160 = {0,0,0,0,9,0};
+#endif
+
+/* char: 0xff */
+
+static const GLubyte ch255data[] = {
+0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch255 = {6,14,-1,3,9,ch255data};
+
+/* char: 0xfe */
+
+static const GLubyte ch254data[] = {
+0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,
+};
+
+static const BitmapCharRec ch254 = {7,12,-1,3,9,ch254data};
+
+/* char: 0xfd */
+
+static const GLubyte ch253data[] = {
+0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch253 = {6,14,-1,3,9,ch253data};
+
+/* char: 0xfc */
+
+static const GLubyte ch252data[] = {
+0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch252 = {7,11,-1,0,9,ch252data};
+
+/* char: 0xfb */
+
+static const GLubyte ch251data[] = {
+0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch251 = {7,11,-1,0,9,ch251data};
+
+/* char: 0xfa */
+
+static const GLubyte ch250data[] = {
+0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch250 = {7,11,-1,0,9,ch250data};
+
+/* char: 0xf9 */
+
+static const GLubyte ch249data[] = {
+0x7a,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch249 = {7,11,-1,0,9,ch249data};
+
+/* char: 0xf8 */
+
+static const GLubyte ch248data[] = {
+0x80,0x7c,0xa2,0xa2,0x92,0x8a,0x8a,0x7c,0x2,
+};
+
+static const BitmapCharRec ch248 = {7,9,-1,1,9,ch248data};
+
+/* char: 0xf7 */
+
+static const GLubyte ch247data[] = {
+0x10,0x38,0x10,0x0,0xfe,0x0,0x10,0x38,0x10,
+};
+
+static const BitmapCharRec ch247 = {7,9,-1,0,9,ch247data};
+
+/* char: 0xf6 */
+
+static const GLubyte ch246data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch246 = {7,11,-1,0,9,ch246data};
+
+/* char: 0xf5 */
+
+static const GLubyte ch245data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch245 = {7,11,-1,0,9,ch245data};
+
+/* char: 0xf4 */
+
+static const GLubyte ch244data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch244 = {7,11,-1,0,9,ch244data};
+
+/* char: 0xf3 */
+
+static const GLubyte ch243data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch243 = {7,11,-1,0,9,ch243data};
+
+/* char: 0xf2 */
+
+static const GLubyte ch242data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch242 = {7,11,-1,0,9,ch242data};
+
+/* char: 0xf1 */
+
+static const GLubyte ch241data[] = {
+0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x0,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch241 = {7,11,-1,0,9,ch241data};
+
+/* char: 0xf0 */
+
+static const GLubyte ch240data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,0x8,0x50,0x30,0x48,
+};
+
+static const BitmapCharRec ch240 = {7,11,-1,0,9,ch240data};
+
+/* char: 0xef */
+
+static const GLubyte ch239data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x50,0x50,
+};
+
+static const BitmapCharRec ch239 = {5,11,-2,0,9,ch239data};
+
+/* char: 0xee */
+
+static const GLubyte ch238data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x90,0x60,
+};
+
+static const BitmapCharRec ch238 = {5,11,-2,0,9,ch238data};
+
+/* char: 0xed */
+
+static const GLubyte ch237data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60,0x10,
+};
+
+static const BitmapCharRec ch237 = {5,11,-2,0,9,ch237data};
+
+/* char: 0xec */
+
+static const GLubyte ch236data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x30,0x40,
+};
+
+static const BitmapCharRec ch236 = {5,11,-2,0,9,ch236data};
+
+/* char: 0xeb */
+
+static const GLubyte ch235data[] = {
+0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch235 = {7,11,-1,0,9,ch235data};
+
+/* char: 0xea */
+
+static const GLubyte ch234data[] = {
+0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch234 = {7,11,-1,0,9,ch234data};
+
+/* char: 0xe9 */
+
+static const GLubyte ch233data[] = {
+0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch233 = {7,11,-1,0,9,ch233data};
+
+/* char: 0xe8 */
+
+static const GLubyte ch232data[] = {
+0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,0x0,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch232 = {7,11,-1,0,9,ch232data};
+
+/* char: 0xe7 */
+
+static const GLubyte ch231data[] = {
+0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x82,0x7c,
+};
+
+static const BitmapCharRec ch231 = {7,10,-1,3,9,ch231data};
+
+/* char: 0xe6 */
+
+static const GLubyte ch230data[] = {
+0x6e,0x92,0x90,0x7c,0x12,0x92,0x6c,
+};
+
+static const BitmapCharRec ch230 = {7,7,-1,0,9,ch230data};
+
+/* char: 0xe5 */
+
+static const GLubyte ch229data[] = {
+0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x18,0x24,0x18,
+};
+
+static const BitmapCharRec ch229 = {7,11,-1,0,9,ch229data};
+
+/* char: 0xe4 */
+
+static const GLubyte ch228data[] = {
+0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch228 = {7,11,-1,0,9,ch228data};
+
+/* char: 0xe3 */
+
+static const GLubyte ch227data[] = {
+0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch227 = {7,11,-1,0,9,ch227data};
+
+/* char: 0xe2 */
+
+static const GLubyte ch226data[] = {
+0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch226 = {7,11,-1,0,9,ch226data};
+
+/* char: 0xe1 */
+
+static const GLubyte ch225data[] = {
+0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch225 = {7,11,-1,0,9,ch225data};
+
+/* char: 0xe0 */
+
+static const GLubyte ch224data[] = {
+0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,0x0,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch224 = {7,11,-1,0,9,ch224data};
+
+/* char: 0xdf */
+
+static const GLubyte ch223data[] = {
+0x80,0xbc,0xc2,0x82,0x82,0xfc,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch223 = {7,9,-1,1,9,ch223data};
+
+/* char: 0xde */
+
+static const GLubyte ch222data[] = {
+0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc,0x80,0x80,
+};
+
+static const BitmapCharRec ch222 = {7,10,-1,0,9,ch222data};
+
+/* char: 0xdd */
+
+static const GLubyte ch221data[] = {
+0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch221 = {7,11,-1,0,9,ch221data};
+
+/* char: 0xdc */
+
+static const GLubyte ch220data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch220 = {7,11,-1,0,9,ch220data};
+
+/* char: 0xdb */
+
+static const GLubyte ch219data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch219 = {7,11,-1,0,9,ch219data};
+
+/* char: 0xda */
+
+static const GLubyte ch218data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch218 = {7,11,-1,0,9,ch218data};
+
+/* char: 0xd9 */
+
+static const GLubyte ch217data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch217 = {7,11,-1,0,9,ch217data};
+
+/* char: 0xd8 */
+
+static const GLubyte ch216data[] = {
+0x80,0x7c,0xc2,0xa2,0xa2,0x92,0x92,0x8a,0x8a,0x86,0x7c,0x2,
+};
+
+static const BitmapCharRec ch216 = {7,12,-1,1,9,ch216data};
+
+/* char: 0xd7 */
+
+static const GLubyte ch215data[] = {
+0x82,0x44,0x28,0x10,0x28,0x44,0x82,
+};
+
+static const BitmapCharRec ch215 = {7,7,-1,-1,9,ch215data};
+
+/* char: 0xd6 */
+
+static const GLubyte ch214data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch214 = {7,11,-1,0,9,ch214data};
+
+/* char: 0xd5 */
+
+static const GLubyte ch213data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch213 = {7,11,-1,0,9,ch213data};
+
+/* char: 0xd4 */
+
+static const GLubyte ch212data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch212 = {7,11,-1,0,9,ch212data};
+
+/* char: 0xd3 */
+
+static const GLubyte ch211data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch211 = {7,11,-1,0,9,ch211data};
+
+/* char: 0xd2 */
+
+static const GLubyte ch210data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch210 = {7,11,-1,0,9,ch210data};
+
+/* char: 0xd1 */
+
+static const GLubyte ch209data[] = {
+0x82,0x86,0x8a,0x92,0x92,0xa2,0xc2,0x82,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch209 = {7,11,-1,0,9,ch209data};
+
+/* char: 0xd0 */
+
+static const GLubyte ch208data[] = {
+0xfc,0x42,0x42,0x42,0x42,0xf2,0x42,0x42,0x42,0xfc,
+};
+
+static const BitmapCharRec ch208 = {7,10,-1,0,9,ch208data};
+
+/* char: 0xcf */
+
+static const GLubyte ch207data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x50,0x50,
+};
+
+static const BitmapCharRec ch207 = {5,11,-2,0,9,ch207data};
+
+/* char: 0xce */
+
+static const GLubyte ch206data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x88,0x70,
+};
+
+static const BitmapCharRec ch206 = {5,11,-2,0,9,ch206data};
+
+/* char: 0xcd */
+
+static const GLubyte ch205data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x60,0x10,
+};
+
+static const BitmapCharRec ch205 = {5,11,-2,0,9,ch205data};
+
+/* char: 0xcc */
+
+static const GLubyte ch204data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,0x0,0x30,0x40,
+};
+
+static const BitmapCharRec ch204 = {5,11,-2,0,9,ch204data};
+
+/* char: 0xcb */
+
+static const GLubyte ch203data[] = {
+0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch203 = {7,11,-1,0,9,ch203data};
+
+/* char: 0xca */
+
+static const GLubyte ch202data[] = {
+0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch202 = {7,11,-1,0,9,ch202data};
+
+/* char: 0xc9 */
+
+static const GLubyte ch201data[] = {
+0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch201 = {7,11,-1,0,9,ch201data};
+
+/* char: 0xc8 */
+
+static const GLubyte ch200data[] = {
+0xfe,0x40,0x40,0x40,0x78,0x40,0x40,0xfe,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch200 = {7,11,-1,0,9,ch200data};
+
+/* char: 0xc7 */
+
+static const GLubyte ch199data[] = {
+0x30,0x48,0x18,0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c,
+};
+
+static const BitmapCharRec ch199 = {7,13,-1,3,9,ch199data};
+
+/* char: 0xc6 */
+
+static const GLubyte ch198data[] = {
+0x9e,0x90,0x90,0x90,0xfc,0x90,0x90,0x90,0x90,0x6e,
+};
+
+static const BitmapCharRec ch198 = {7,10,-1,0,9,ch198data};
+
+/* char: 0xc5 */
+
+static const GLubyte ch197data[] = {
+0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x10,0x28,0x10,
+};
+
+static const BitmapCharRec ch197 = {7,11,-1,0,9,ch197data};
+
+/* char: 0xc4 */
+
+static const GLubyte ch196data[] = {
+0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x28,0x28,
+};
+
+static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data};
+
+/* char: 0xc3 */
+
+static const GLubyte ch195data[] = {
+0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch195 = {7,11,-1,0,9,ch195data};
+
+/* char: 0xc2 */
+
+static const GLubyte ch194data[] = {
+0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x44,0x38,
+};
+
+static const BitmapCharRec ch194 = {7,11,-1,0,9,ch194data};
+
+/* char: 0xc1 */
+
+static const GLubyte ch193data[] = {
+0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x30,0x8,
+};
+
+static const BitmapCharRec ch193 = {7,11,-1,0,9,ch193data};
+
+/* char: 0xc0 */
+
+static const GLubyte ch192data[] = {
+0x82,0x82,0x82,0xfe,0x82,0x82,0x44,0x38,0x0,0x18,0x20,
+};
+
+static const BitmapCharRec ch192 = {7,11,-1,0,9,ch192data};
+
+/* char: 0xbf */
+
+static const GLubyte ch191data[] = {
+0x7c,0x82,0x82,0x80,0x40,0x20,0x10,0x10,0x0,0x10,
+};
+
+static const BitmapCharRec ch191 = {7,10,-1,0,9,ch191data};
+
+/* char: 0xbe */
+
+static const GLubyte ch190data[] = {
+0x6,0x1a,0x12,0xa,0x66,0x92,0x10,0x20,0x90,0x60,
+};
+
+static const BitmapCharRec ch190 = {7,10,-1,0,9,ch190data};
+
+/* char: 0xbd */
+
+static const GLubyte ch189data[] = {
+0x1e,0x10,0xc,0x2,0xf2,0x4c,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch189 = {7,10,-1,0,9,ch189data};
+
+/* char: 0xbc */
+
+static const GLubyte ch188data[] = {
+0x6,0x1a,0x12,0xa,0xe6,0x42,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch188 = {7,10,-1,0,9,ch188data};
+
+/* char: 0xbb */
+
+static const GLubyte ch187data[] = {
+0x90,0x48,0x24,0x12,0x12,0x24,0x48,0x90,
+};
+
+static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data};
+
+/* char: 0xba */
+
+static const GLubyte ch186data[] = {
+0xf8,0x0,0x70,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch186 = {5,6,-1,-5,9,ch186data};
+
+/* char: 0xb9 */
+
+static const GLubyte ch185data[] = {
+0xe0,0x40,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch185 = {3,6,-1,-4,9,ch185data};
+
+/* char: 0xb8 */
+
+static const GLubyte ch184data[] = {
+0x60,0x90,0x30,
+};
+
+static const BitmapCharRec ch184 = {4,3,-2,3,9,ch184data};
+
+/* char: 0xb7 */
+
+static const GLubyte ch183data[] = {
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch183 = {2,2,-4,-4,9,ch183data};
+
+/* char: 0xb6 */
+
+static const GLubyte ch182data[] = {
+0xa,0xa,0xa,0xa,0xa,0x7a,0x8a,0x8a,0x8a,0x7e,
+};
+
+static const BitmapCharRec ch182 = {7,10,-1,0,9,ch182data};
+
+/* char: 0xb5 */
+
+static const GLubyte ch181data[] = {
+0x80,0x80,0xba,0xc6,0x82,0x82,0x82,0x82,0x82,
+};
+
+static const BitmapCharRec ch181 = {7,9,-1,2,9,ch181data};
+
+/* char: 0xb4 */
+
+static const GLubyte ch180data[] = {
+0xc0,0x20,
+};
+
+static const BitmapCharRec ch180 = {3,2,-3,-9,9,ch180data};
+
+/* char: 0xb3 */
+
+static const GLubyte ch179data[] = {
+0x60,0x90,0x10,0x20,0x90,0x60,
+};
+
+static const BitmapCharRec ch179 = {4,6,-1,-4,9,ch179data};
+
+/* char: 0xb2 */
+
+static const GLubyte ch178data[] = {
+0xf0,0x80,0x60,0x10,0x90,0x60,
+};
+
+static const BitmapCharRec ch178 = {4,6,-1,-4,9,ch178data};
+
+/* char: 0xb1 */
+
+static const GLubyte ch177data[] = {
+0xfe,0x0,0x10,0x10,0x10,0xfe,0x10,0x10,0x10,
+};
+
+static const BitmapCharRec ch177 = {7,9,-1,-1,9,ch177data};
+
+/* char: 0xb0 */
+
+static const GLubyte ch176data[] = {
+0x60,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch176 = {4,4,-3,-6,9,ch176data};
+
+/* char: 0xaf */
+
+static const GLubyte ch175data[] = {
+0xfc,
+};
+
+static const BitmapCharRec ch175 = {6,1,-1,-9,9,ch175data};
+
+/* char: 0xae */
+
+static const GLubyte ch174data[] = {
+0x3c,0x42,0xa5,0xa9,0xbd,0xa5,0xb9,0x42,0x3c,
+};
+
+static const BitmapCharRec ch174 = {8,9,0,-1,9,ch174data};
+
+/* char: 0xad */
+
+static const GLubyte ch173data[] = {
+0xfc,
+};
+
+static const BitmapCharRec ch173 = {6,1,-1,-4,9,ch173data};
+
+/* char: 0xac */
+
+static const GLubyte ch172data[] = {
+0x4,0x4,0x4,0xfc,
+};
+
+static const BitmapCharRec ch172 = {6,4,-1,-2,9,ch172data};
+
+/* char: 0xab */
+
+static const GLubyte ch171data[] = {
+0x12,0x24,0x48,0x90,0x90,0x48,0x24,0x12,
+};
+
+static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data};
+
+/* char: 0xaa */
+
+static const GLubyte ch170data[] = {
+0xf8,0x0,0x78,0x90,0x70,0x90,0x60,
+};
+
+static const BitmapCharRec ch170 = {5,7,-3,-3,9,ch170data};
+
+/* char: 0xa9 */
+
+static const GLubyte ch169data[] = {
+0x3c,0x42,0x99,0xa5,0xa1,0xa5,0x99,0x42,0x3c,
+};
+
+static const BitmapCharRec ch169 = {8,9,0,-1,9,ch169data};
+
+/* char: 0xa8 */
+
+static const GLubyte ch168data[] = {
+0xa0,0xa0,
+};
+
+static const BitmapCharRec ch168 = {3,2,-3,-9,9,ch168data};
+
+/* char: 0xa7 */
+
+static const GLubyte ch167data[] = {
+0x70,0x88,0x8,0x70,0x88,0x88,0x88,0x70,0x80,0x88,0x70,
+};
+
+static const BitmapCharRec ch167 = {5,11,-2,1,9,ch167data};
+
+/* char: 0xa6 */
+
+static const GLubyte ch166data[] = {
+0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch166 = {1,11,-4,1,9,ch166data};
+
+/* char: 0xa5 */
+
+static const GLubyte ch165data[] = {
+0x10,0x10,0x10,0x7c,0x10,0x7c,0x28,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch165 = {7,10,-1,0,9,ch165data};
+
+/* char: 0xa4 */
+
+static const GLubyte ch164data[] = {
+0x82,0x7c,0x44,0x44,0x7c,0x82,
+};
+
+static const BitmapCharRec ch164 = {7,6,-1,-3,9,ch164data};
+
+/* char: 0xa3 */
+
+static const GLubyte ch163data[] = {
+0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c,
+};
+
+static const BitmapCharRec ch163 = {7,10,-1,0,9,ch163data};
+
+/* char: 0xa2 */
+
+static const GLubyte ch162data[] = {
+0x40,0x78,0xa4,0xa0,0x90,0x94,0x78,0x8,
+};
+
+static const BitmapCharRec ch162 = {6,8,-1,0,9,ch162data};
+
+/* char: 0xa1 */
+
+static const GLubyte ch161data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,
+};
+
+static const BitmapCharRec ch161 = {1,11,-4,0,9,ch161data};
+
+/* char: 0x7e '~' */
+
+static const GLubyte ch126data[] = {
+0x8c,0x92,0x62,
+};
+
+static const BitmapCharRec ch126 = {7,3,-1,-7,9,ch126data};
+
+/* char: 0x7d '}' */
+
+static const GLubyte ch125data[] = {
+0xe0,0x10,0x10,0x10,0x20,0x18,0x18,0x20,0x10,0x10,0x10,0xe0,
+};
+
+static const BitmapCharRec ch125 = {5,12,-1,1,9,ch125data};
+
+/* char: 0x7c '|' */
+
+static const GLubyte ch124data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch124 = {1,12,-4,1,9,ch124data};
+
+/* char: 0x7b '{' */
+
+static const GLubyte ch123data[] = {
+0x38,0x40,0x40,0x40,0x20,0xc0,0xc0,0x20,0x40,0x40,0x40,0x38,
+};
+
+static const BitmapCharRec ch123 = {5,12,-3,1,9,ch123data};
+
+/* char: 0x7a 'z' */
+
+static const GLubyte ch122data[] = {
+0xfe,0x40,0x20,0x10,0x8,0x4,0xfe,
+};
+
+static const BitmapCharRec ch122 = {7,7,-1,0,9,ch122data};
+
+/* char: 0x79 'y' */
+
+static const GLubyte ch121data[] = {
+0x78,0x84,0x4,0x74,0x8c,0x84,0x84,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch121 = {6,10,-1,3,9,ch121data};
+
+/* char: 0x78 'x' */
+
+static const GLubyte ch120data[] = {
+0x82,0x44,0x28,0x10,0x28,0x44,0x82,
+};
+
+static const BitmapCharRec ch120 = {7,7,-1,0,9,ch120data};
+
+/* char: 0x77 'w' */
+
+static const GLubyte ch119data[] = {
+0x44,0xaa,0x92,0x92,0x92,0x82,0x82,
+};
+
+static const BitmapCharRec ch119 = {7,7,-1,0,9,ch119data};
+
+/* char: 0x76 'v' */
+
+static const GLubyte ch118data[] = {
+0x10,0x28,0x28,0x44,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch118 = {7,7,-1,0,9,ch118data};
+
+/* char: 0x75 'u' */
+
+static const GLubyte ch117data[] = {
+0x7a,0x84,0x84,0x84,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch117 = {7,7,-1,0,9,ch117data};
+
+/* char: 0x74 't' */
+
+static const GLubyte ch116data[] = {
+0x1c,0x22,0x20,0x20,0x20,0x20,0xfc,0x20,0x20,
+};
+
+static const BitmapCharRec ch116 = {7,9,-1,0,9,ch116data};
+
+/* char: 0x73 's' */
+
+static const GLubyte ch115data[] = {
+0x7c,0x82,0x2,0x7c,0x80,0x82,0x7c,
+};
+
+static const BitmapCharRec ch115 = {7,7,-1,0,9,ch115data};
+
+/* char: 0x72 'r' */
+
+static const GLubyte ch114data[] = {
+0x40,0x40,0x40,0x40,0x42,0x62,0x9c,
+};
+
+static const BitmapCharRec ch114 = {7,7,-1,0,9,ch114data};
+
+/* char: 0x71 'q' */
+
+static const GLubyte ch113data[] = {
+0x2,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x86,0x7a,
+};
+
+static const BitmapCharRec ch113 = {7,10,-1,3,9,ch113data};
+
+/* char: 0x70 'p' */
+
+static const GLubyte ch112data[] = {
+0x80,0x80,0x80,0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,
+};
+
+static const BitmapCharRec ch112 = {7,10,-1,3,9,ch112data};
+
+/* char: 0x6f 'o' */
+
+static const GLubyte ch111data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch111 = {7,7,-1,0,9,ch111data};
+
+/* char: 0x6e 'n' */
+
+static const GLubyte ch110data[] = {
+0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,
+};
+
+static const BitmapCharRec ch110 = {7,7,-1,0,9,ch110data};
+
+/* char: 0x6d 'm' */
+
+static const GLubyte ch109data[] = {
+0x82,0x92,0x92,0x92,0x92,0x92,0xec,
+};
+
+static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data};
+
+/* char: 0x6c 'l' */
+
+static const GLubyte ch108data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,
+};
+
+static const BitmapCharRec ch108 = {5,10,-2,0,9,ch108data};
+
+/* char: 0x6b 'k' */
+
+static const GLubyte ch107data[] = {
+0x82,0x8c,0xb0,0xc0,0xb0,0x8c,0x82,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch107 = {7,10,-1,0,9,ch107data};
+
+/* char: 0x6a 'j' */
+
+static const GLubyte ch106data[] = {
+0x78,0x84,0x84,0x84,0x4,0x4,0x4,0x4,0x4,0x1c,0x0,0x0,0xc,
+};
+
+static const BitmapCharRec ch106 = {6,13,-1,3,9,ch106data};
+
+/* char: 0x69 'i' */
+
+static const GLubyte ch105data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0xe0,0x0,0x0,0x60,
+};
+
+static const BitmapCharRec ch105 = {5,10,-2,0,9,ch105data};
+
+/* char: 0x68 'h' */
+
+static const GLubyte ch104data[] = {
+0x82,0x82,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch104 = {7,10,-1,0,9,ch104data};
+
+/* char: 0x67 'g' */
+
+static const GLubyte ch103data[] = {
+0x7c,0x82,0x82,0x7c,0x80,0x78,0x84,0x84,0x84,0x7a,
+};
+
+static const BitmapCharRec ch103 = {7,10,-1,3,9,ch103data};
+
+/* char: 0x66 'f' */
+
+static const GLubyte ch102data[] = {
+0x20,0x20,0x20,0x20,0xf8,0x20,0x20,0x22,0x22,0x1c,
+};
+
+static const BitmapCharRec ch102 = {7,10,-1,0,9,ch102data};
+
+/* char: 0x65 'e' */
+
+static const GLubyte ch101data[] = {
+0x7c,0x80,0x80,0xfe,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch101 = {7,7,-1,0,9,ch101data};
+
+/* char: 0x64 'd' */
+
+static const GLubyte ch100data[] = {
+0x7a,0x86,0x82,0x82,0x82,0x86,0x7a,0x2,0x2,0x2,
+};
+
+static const BitmapCharRec ch100 = {7,10,-1,0,9,ch100data};
+
+/* char: 0x63 'c' */
+
+static const GLubyte ch99data[] = {
+0x7c,0x82,0x80,0x80,0x80,0x82,0x7c,
+};
+
+static const BitmapCharRec ch99 = {7,7,-1,0,9,ch99data};
+
+/* char: 0x62 'b' */
+
+static const GLubyte ch98data[] = {
+0xbc,0xc2,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch98 = {7,10,-1,0,9,ch98data};
+
+/* char: 0x61 'a' */
+
+static const GLubyte ch97data[] = {
+0x7a,0x86,0x82,0x7e,0x2,0x2,0x7c,
+};
+
+static const BitmapCharRec ch97 = {7,7,-1,0,9,ch97data};
+
+/* char: 0x60 '`' */
+
+static const GLubyte ch96data[] = {
+0x10,0x20,0x40,0xc0,
+};
+
+static const BitmapCharRec ch96 = {4,4,-3,-6,9,ch96data};
+
+/* char: 0x5f '_' */
+
+static const GLubyte ch95data[] = {
+0xff,
+};
+
+static const BitmapCharRec ch95 = {8,1,0,1,9,ch95data};
+
+/* char: 0x5e '^' */
+
+static const GLubyte ch94data[] = {
+0x82,0x44,0x28,0x10,
+};
+
+static const BitmapCharRec ch94 = {7,4,-1,-6,9,ch94data};
+
+/* char: 0x5d ']' */
+
+static const GLubyte ch93data[] = {
+0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xf0,
+};
+
+static const BitmapCharRec ch93 = {4,12,-2,1,9,ch93data};
+
+/* char: 0x5c '\' */
+
+static const GLubyte ch92data[] = {
+0x2,0x4,0x4,0x8,0x10,0x10,0x20,0x40,0x40,0x80,
+};
+
+static const BitmapCharRec ch92 = {7,10,-1,0,9,ch92data};
+
+/* char: 0x5b '[' */
+
+static const GLubyte ch91data[] = {
+0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xf0,
+};
+
+static const BitmapCharRec ch91 = {4,12,-3,1,9,ch91data};
+
+/* char: 0x5a 'Z' */
+
+static const GLubyte ch90data[] = {
+0xfe,0x80,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe,
+};
+
+static const BitmapCharRec ch90 = {7,10,-1,0,9,ch90data};
+
+/* char: 0x59 'Y' */
+
+static const GLubyte ch89data[] = {
+0x10,0x10,0x10,0x10,0x10,0x10,0x28,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch89 = {7,10,-1,0,9,ch89data};
+
+/* char: 0x58 'X' */
+
+static const GLubyte ch88data[] = {
+0x82,0x82,0x44,0x28,0x10,0x10,0x28,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch88 = {7,10,-1,0,9,ch88data};
+
+/* char: 0x57 'W' */
+
+static const GLubyte ch87data[] = {
+0x44,0xaa,0x92,0x92,0x92,0x92,0x82,0x82,0x82,0x82,
+};
+
+static const BitmapCharRec ch87 = {7,10,-1,0,9,ch87data};
+
+/* char: 0x56 'V' */
+
+static const GLubyte ch86data[] = {
+0x10,0x28,0x28,0x28,0x44,0x44,0x44,0x82,0x82,0x82,
+};
+
+static const BitmapCharRec ch86 = {7,10,-1,0,9,ch86data};
+
+/* char: 0x55 'U' */
+
+static const GLubyte ch85data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+};
+
+static const BitmapCharRec ch85 = {7,10,-1,0,9,ch85data};
+
+/* char: 0x54 'T' */
+
+static const GLubyte ch84data[] = {
+0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe,
+};
+
+static const BitmapCharRec ch84 = {7,10,-1,0,9,ch84data};
+
+/* char: 0x53 'S' */
+
+static const GLubyte ch83data[] = {
+0x7c,0x82,0x82,0x2,0xc,0x70,0x80,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch83 = {7,10,-1,0,9,ch83data};
+
+/* char: 0x52 'R' */
+
+static const GLubyte ch82data[] = {
+0x82,0x82,0x84,0x88,0x90,0xfc,0x82,0x82,0x82,0xfc,
+};
+
+static const BitmapCharRec ch82 = {7,10,-1,0,9,ch82data};
+
+/* char: 0x51 'Q' */
+
+static const GLubyte ch81data[] = {
+0x6,0x8,0x7c,0x92,0xa2,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch81 = {7,12,-1,2,9,ch81data};
+
+/* char: 0x50 'P' */
+
+static const GLubyte ch80data[] = {
+0x80,0x80,0x80,0x80,0x80,0xfc,0x82,0x82,0x82,0xfc,
+};
+
+static const BitmapCharRec ch80 = {7,10,-1,0,9,ch80data};
+
+/* char: 0x4f 'O' */
+
+static const GLubyte ch79data[] = {
+0x7c,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch79 = {7,10,-1,0,9,ch79data};
+
+/* char: 0x4e 'N' */
+
+static const GLubyte ch78data[] = {
+0x82,0x82,0x82,0x86,0x8a,0x92,0xa2,0xc2,0x82,0x82,
+};
+
+static const BitmapCharRec ch78 = {7,10,-1,0,9,ch78data};
+
+/* char: 0x4d 'M' */
+
+static const GLubyte ch77data[] = {
+0x82,0x82,0x82,0x92,0x92,0xaa,0xaa,0xc6,0x82,0x82,
+};
+
+static const BitmapCharRec ch77 = {7,10,-1,0,9,ch77data};
+
+/* char: 0x4c 'L' */
+
+static const GLubyte ch76data[] = {
+0xfe,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch76 = {7,10,-1,0,9,ch76data};
+
+/* char: 0x4b 'K' */
+
+static const GLubyte ch75data[] = {
+0x82,0x84,0x88,0x90,0xa0,0xe0,0x90,0x88,0x84,0x82,
+};
+
+static const BitmapCharRec ch75 = {7,10,-1,0,9,ch75data};
+
+/* char: 0x4a 'J' */
+
+static const GLubyte ch74data[] = {
+0x78,0x84,0x4,0x4,0x4,0x4,0x4,0x4,0x4,0x1e,
+};
+
+static const BitmapCharRec ch74 = {7,10,-1,0,9,ch74data};
+
+/* char: 0x49 'I' */
+
+static const GLubyte ch73data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,
+};
+
+static const BitmapCharRec ch73 = {5,10,-2,0,9,ch73data};
+
+/* char: 0x48 'H' */
+
+static const GLubyte ch72data[] = {
+0x82,0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82,
+};
+
+static const BitmapCharRec ch72 = {7,10,-1,0,9,ch72data};
+
+/* char: 0x47 'G' */
+
+static const GLubyte ch71data[] = {
+0x7c,0x82,0x82,0x82,0x8e,0x80,0x80,0x80,0x82,0x7c,
+};
+
+static const BitmapCharRec ch71 = {7,10,-1,0,9,ch71data};
+
+/* char: 0x46 'F' */
+
+static const GLubyte ch70data[] = {
+0x40,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe,
+};
+
+static const BitmapCharRec ch70 = {7,10,-1,0,9,ch70data};
+
+/* char: 0x45 'E' */
+
+static const GLubyte ch69data[] = {
+0xfe,0x40,0x40,0x40,0x40,0x78,0x40,0x40,0x40,0xfe,
+};
+
+static const BitmapCharRec ch69 = {7,10,-1,0,9,ch69data};
+
+/* char: 0x44 'D' */
+
+static const GLubyte ch68data[] = {
+0xfc,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xfc,
+};
+
+static const BitmapCharRec ch68 = {7,10,-1,0,9,ch68data};
+
+/* char: 0x43 'C' */
+
+static const GLubyte ch67data[] = {
+0x7c,0x82,0x80,0x80,0x80,0x80,0x80,0x80,0x82,0x7c,
+};
+
+static const BitmapCharRec ch67 = {7,10,-1,0,9,ch67data};
+
+/* char: 0x42 'B' */
+
+static const GLubyte ch66data[] = {
+0xfc,0x42,0x42,0x42,0x42,0x7c,0x42,0x42,0x42,0xfc,
+};
+
+static const BitmapCharRec ch66 = {7,10,-1,0,9,ch66data};
+
+/* char: 0x41 'A' */
+
+static const GLubyte ch65data[] = {
+0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x44,0x28,0x10,
+};
+
+static const BitmapCharRec ch65 = {7,10,-1,0,9,ch65data};
+
+/* char: 0x40 '@' */
+
+static const GLubyte ch64data[] = {
+0x7c,0x80,0x80,0x9a,0xa6,0xa2,0x9e,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch64 = {7,10,-1,0,9,ch64data};
+
+/* char: 0x3f '?' */
+
+static const GLubyte ch63data[] = {
+0x10,0x0,0x10,0x10,0x8,0x4,0x2,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch63 = {7,10,-1,0,9,ch63data};
+
+/* char: 0x3e '>' */
+
+static const GLubyte ch62data[] = {
+0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80,
+};
+
+static const BitmapCharRec ch62 = {5,10,-2,0,9,ch62data};
+
+/* char: 0x3d '=' */
+
+static const GLubyte ch61data[] = {
+0xfe,0x0,0x0,0xfe,
+};
+
+static const BitmapCharRec ch61 = {7,4,-1,-2,9,ch61data};
+
+/* char: 0x3c '<' */
+
+static const GLubyte ch60data[] = {
+0x8,0x10,0x20,0x40,0x80,0x80,0x40,0x20,0x10,0x8,
+};
+
+static const BitmapCharRec ch60 = {5,10,-2,0,9,ch60data};
+
+/* char: 0x3b ';' */
+
+static const GLubyte ch59data[] = {
+0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch59 = {2,10,-4,3,9,ch59data};
+
+/* char: 0x3a ':' */
+
+static const GLubyte ch58data[] = {
+0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch58 = {2,7,-4,0,9,ch58data};
+
+/* char: 0x39 '9' */
+
+static const GLubyte ch57data[] = {
+0x78,0x4,0x2,0x2,0x7a,0x86,0x82,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch57 = {7,10,-1,0,9,ch57data};
+
+/* char: 0x38 '8' */
+
+static const GLubyte ch56data[] = {
+0x38,0x44,0x82,0x82,0x44,0x38,0x44,0x82,0x44,0x38,
+};
+
+static const BitmapCharRec ch56 = {7,10,-1,0,9,ch56data};
+
+/* char: 0x37 '7' */
+
+static const GLubyte ch55data[] = {
+0x40,0x40,0x20,0x20,0x10,0x8,0x4,0x2,0x2,0xfe,
+};
+
+static const BitmapCharRec ch55 = {7,10,-1,0,9,ch55data};
+
+/* char: 0x36 '6' */
+
+static const GLubyte ch54data[] = {
+0x7c,0x82,0x82,0x82,0xc2,0xbc,0x80,0x80,0x40,0x3c,
+};
+
+static const BitmapCharRec ch54 = {7,10,-1,0,9,ch54data};
+
+/* char: 0x35 '5' */
+
+static const GLubyte ch53data[] = {
+0x7c,0x82,0x2,0x2,0x2,0xc2,0xbc,0x80,0x80,0xfe,
+};
+
+static const BitmapCharRec ch53 = {7,10,-1,0,9,ch53data};
+
+/* char: 0x34 '4' */
+
+static const GLubyte ch52data[] = {
+0x4,0x4,0x4,0xfe,0x84,0x44,0x24,0x14,0xc,0x4,
+};
+
+static const BitmapCharRec ch52 = {7,10,-1,0,9,ch52data};
+
+/* char: 0x33 '3' */
+
+static const GLubyte ch51data[] = {
+0x7c,0x82,0x2,0x2,0x2,0x1c,0x8,0x4,0x2,0xfe,
+};
+
+static const BitmapCharRec ch51 = {7,10,-1,0,9,ch51data};
+
+/* char: 0x32 '2' */
+
+static const GLubyte ch50data[] = {
+0xfe,0x80,0x40,0x30,0x8,0x4,0x2,0x82,0x82,0x7c,
+};
+
+static const BitmapCharRec ch50 = {7,10,-1,0,9,ch50data};
+
+/* char: 0x31 '1' */
+
+static const GLubyte ch49data[] = {
+0xfe,0x10,0x10,0x10,0x10,0x10,0x90,0x50,0x30,0x10,
+};
+
+static const BitmapCharRec ch49 = {7,10,-1,0,9,ch49data};
+
+/* char: 0x30 '0' */
+
+static const GLubyte ch48data[] = {
+0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38,
+};
+
+static const BitmapCharRec ch48 = {7,10,-1,0,9,ch48data};
+
+/* char: 0x2f '/' */
+
+static const GLubyte ch47data[] = {
+0x80,0x40,0x40,0x20,0x10,0x10,0x8,0x4,0x4,0x2,
+};
+
+static const BitmapCharRec ch47 = {7,10,-1,0,9,ch47data};
+
+/* char: 0x2e '.' */
+
+static const GLubyte ch46data[] = {
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch46 = {2,2,-4,0,9,ch46data};
+
+/* char: 0x2d '-' */
+
+static const GLubyte ch45data[] = {
+0xfe,
+};
+
+static const BitmapCharRec ch45 = {7,1,-1,-4,9,ch45data};
+
+/* char: 0x2c ',' */
+
+static const GLubyte ch44data[] = {
+0x80,0x40,0x40,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch44 = {2,5,-4,3,9,ch44data};
+
+/* char: 0x2b '+' */
+
+static const GLubyte ch43data[] = {
+0x10,0x10,0x10,0xfe,0x10,0x10,0x10,
+};
+
+static const BitmapCharRec ch43 = {7,7,-1,-1,9,ch43data};
+
+/* char: 0x2a '*' */
+
+static const GLubyte ch42data[] = {
+0x10,0x92,0x54,0x38,0x54,0x92,0x10,
+};
+
+static const BitmapCharRec ch42 = {7,7,-1,-1,9,ch42data};
+
+/* char: 0x29 ')' */
+
+static const GLubyte ch41data[] = {
+0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80,
+};
+
+static const BitmapCharRec ch41 = {3,12,-3,1,9,ch41data};
+
+/* char: 0x28 '(' */
+
+static const GLubyte ch40data[] = {
+0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20,
+};
+
+static const BitmapCharRec ch40 = {3,12,-3,1,9,ch40data};
+
+/* char: 0x27 ''' */
+
+static const GLubyte ch39data[] = {
+0x80,0x40,0x20,0x30,
+};
+
+static const BitmapCharRec ch39 = {4,4,-3,-6,9,ch39data};
+
+/* char: 0x26 '&' */
+
+static const GLubyte ch38data[] = {
+0x62,0x94,0x88,0x94,0x62,0x60,0x90,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch38 = {7,10,-1,0,9,ch38data};
+
+/* char: 0x25 '%' */
+
+static const GLubyte ch37data[] = {
+0x84,0x4a,0x4a,0x24,0x10,0x10,0x48,0xa4,0xa4,0x42,
+};
+
+static const BitmapCharRec ch37 = {7,10,-1,0,9,ch37data};
+
+/* char: 0x24 '$' */
+
+static const GLubyte ch36data[] = {
+0x10,0x7c,0x92,0x12,0x12,0x14,0x38,0x50,0x90,0x92,0x7c,0x10,
+};
+
+static const BitmapCharRec ch36 = {7,12,-1,1,9,ch36data};
+
+/* char: 0x23 '#' */
+
+static const GLubyte ch35data[] = {
+0x48,0x48,0xfc,0x48,0x48,0xfc,0x48,0x48,
+};
+
+static const BitmapCharRec ch35 = {6,8,-1,-1,9,ch35data};
+
+/* char: 0x22 '"' */
+
+static const GLubyte ch34data[] = {
+0x90,0x90,0x90,
+};
+
+static const BitmapCharRec ch34 = {4,3,-3,-7,9,ch34data};
+
+/* char: 0x21 '!' */
+
+static const GLubyte ch33data[] = {
+0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch33 = {1,11,-4,0,9,ch33data};
+
+/* char: 0x1f */
+
+static const GLubyte ch31data[] = {
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch31 = {2,2,-4,-2,9,ch31data};
+
+/* char: 0x1e */
+
+static const GLubyte ch30data[] = {
+0x5c,0xa2,0x60,0x20,0x20,0xf8,0x20,0x20,0x22,0x1c,
+};
+
+static const BitmapCharRec ch30 = {7,10,-1,0,9,ch30data};
+
+/* char: 0x1d */
+
+static const GLubyte ch29data[] = {
+0x80,0x40,0xfe,0x10,0xfe,0x4,0x2,
+};
+
+static const BitmapCharRec ch29 = {7,7,-1,0,9,ch29data};
+
+/* char: 0x1c */
+
+static const GLubyte ch28data[] = {
+0x44,0x24,0x24,0x24,0x24,0x24,0xfe,
+};
+
+static const BitmapCharRec ch28 = {7,7,-1,0,9,ch28data};
+
+/* char: 0x1b */
+
+static const GLubyte ch27data[] = {
+0xfe,0x0,0x80,0x40,0x20,0x10,0x8,0x8,0x10,0x20,0x40,0x80,
+};
+
+static const BitmapCharRec ch27 = {7,12,-1,2,9,ch27data};
+
+/* char: 0x1a */
+
+static const GLubyte ch26data[] = {
+0xfc,0x0,0x4,0x8,0x10,0x20,0x40,0x40,0x20,0x10,0x8,0x4,
+};
+
+static const BitmapCharRec ch26 = {6,12,-2,2,9,ch26data};
+
+/* char: 0x19 */
+
+static const GLubyte ch25data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch25 = {1,15,-4,3,9,ch25data};
+
+/* char: 0x18 */
+
+static const GLubyte ch24data[] = {
+0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,
+};
+
+static const BitmapCharRec ch24 = {9,7,0,3,9,ch24data};
+
+/* char: 0x17 */
+
+static const GLubyte ch23data[] = {
+0xff,0x80,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,
+0x8,0x0,
+};
+
+static const BitmapCharRec ch23 = {9,9,0,-3,9,ch23data};
+
+/* char: 0x16 */
+
+static const GLubyte ch22data[] = {
+0x8,0x8,0x8,0x8,0x8,0x8,0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,
+};
+
+static const BitmapCharRec ch22 = {5,15,0,3,9,ch22data};
+
+/* char: 0x15 */
+
+static const GLubyte ch21data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch21 = {5,15,-4,3,9,ch21data};
+
+/* char: 0x14 */
+
+static const GLubyte ch20data[] = {
+0xff,0x80,
+};
+
+static const BitmapCharRec ch20 = {9,1,0,1,9,ch20data};
+
+/* char: 0x13 */
+
+static const GLubyte ch19data[] = {
+0xff,0x80,
+};
+
+static const BitmapCharRec ch19 = {9,1,0,-1,9,ch19data};
+
+/* char: 0x12 */
+
+static const GLubyte ch18data[] = {
+0xff,0x80,
+};
+
+static const BitmapCharRec ch18 = {9,1,0,-3,9,ch18data};
+
+/* char: 0x11 */
+
+static const GLubyte ch17data[] = {
+0xff,0x80,
+};
+
+static const BitmapCharRec ch17 = {9,1,0,-5,9,ch17data};
+
+/* char: 0x10 */
+
+static const GLubyte ch16data[] = {
+0xff,0x80,
+};
+
+static const BitmapCharRec ch16 = {9,1,0,-7,9,ch16data};
+
+/* char: 0xf */
+
+static const GLubyte ch15data[] = {
+0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0xff,0x80,0x8,0x0,
+0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,0x8,0x0,
+};
+
+static const BitmapCharRec ch15 = {9,15,0,3,9,ch15data};
+
+/* char: 0xe */
+
+static const GLubyte ch14data[] = {
+0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch14 = {5,9,-4,-3,9,ch14data};
+
+/* char: 0xd */
+
+static const GLubyte ch13data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0xf8,
+};
+
+static const BitmapCharRec ch13 = {5,7,-4,3,9,ch13data};
+
+/* char: 0xc */
+
+static const GLubyte ch12data[] = {
+0x8,0x8,0x8,0x8,0x8,0x8,0xf8,
+};
+
+static const BitmapCharRec ch12 = {5,7,0,3,9,ch12data};
+
+/* char: 0xb */
+
+static const GLubyte ch11data[] = {
+0xf8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,
+};
+
+static const BitmapCharRec ch11 = {5,9,0,-3,9,ch11data};
+
+/* char: 0xa */
+
+static const GLubyte ch10data[] = {
+0x8,0x8,0x8,0x8,0x3e,0x0,0x20,0x50,0x88,0x88,
+};
+
+static const BitmapCharRec ch10 = {7,10,-1,2,9,ch10data};
+
+/* char: 0x9 */
+
+static const GLubyte ch9data[] = {
+0x3e,0x20,0x20,0x20,0x20,0x88,0x98,0xa8,0xc8,0x88,
+};
+
+static const BitmapCharRec ch9 = {7,10,-1,2,9,ch9data};
+
+/* char: 0x8 */
+
+static const GLubyte ch8data[] = {
+0xfe,0x10,0x10,0xfe,0x10,0x10,
+};
+
+static const BitmapCharRec ch8 = {7,6,-1,0,9,ch8data};
+
+/* char: 0x7 */
+
+static const GLubyte ch7data[] = {
+0x70,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch7 = {5,4,-2,-6,9,ch7data};
+
+/* char: 0x6 */
+
+static const GLubyte ch6data[] = {
+0x20,0x20,0x3c,0x20,0x3e,0x0,0xf8,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch6 = {7,10,-1,2,9,ch6data};
+
+/* char: 0x5 */
+
+static const GLubyte ch5data[] = {
+0x22,0x22,0x3c,0x22,0x3c,0x0,0x78,0x80,0x80,0x78,
+};
+
+static const BitmapCharRec ch5 = {7,10,-1,2,9,ch5data};
+
+/* char: 0x4 */
+
+static const GLubyte ch4data[] = {
+0x10,0x10,0x1c,0x10,0x1e,0x80,0x80,0xe0,0x80,0xf0,
+};
+
+static const BitmapCharRec ch4 = {7,10,-1,2,9,ch4data};
+
+/* char: 0x3 */
+
+static const GLubyte ch3data[] = {
+0x8,0x8,0x8,0x3e,0x0,0x88,0x88,0xf8,0x88,0x88,
+};
+
+static const BitmapCharRec ch3 = {7,10,-1,2,9,ch3data};
+
+/* char: 0x2 */
+
+static const GLubyte ch2data[] = {
+0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,
+};
+
+static const BitmapCharRec ch2 = {8,14,0,3,9,ch2data};
+
+/* char: 0x1 */
+
+static const GLubyte ch1data[] = {
+0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,
+};
+
+static const BitmapCharRec ch1 = {7,7,-1,0,9,ch1data};
+
+static const BitmapCharRec * const chars[] = {
+&ch0,
+&ch1,
+&ch2,
+&ch3,
+&ch4,
+&ch5,
+&ch6,
+&ch7,
+&ch8,
+&ch9,
+&ch10,
+&ch11,
+&ch12,
+&ch13,
+&ch14,
+&ch15,
+&ch16,
+&ch17,
+&ch18,
+&ch19,
+&ch20,
+&ch21,
+&ch22,
+&ch23,
+&ch24,
+&ch25,
+&ch26,
+&ch27,
+&ch28,
+&ch29,
+&ch30,
+&ch31,
+&ch32,
+&ch33,
+&ch34,
+&ch35,
+&ch36,
+&ch37,
+&ch38,
+&ch39,
+&ch40,
+&ch41,
+&ch42,
+&ch43,
+&ch44,
+&ch45,
+&ch46,
+&ch47,
+&ch48,
+&ch49,
+&ch50,
+&ch51,
+&ch52,
+&ch53,
+&ch54,
+&ch55,
+&ch56,
+&ch57,
+&ch58,
+&ch59,
+&ch60,
+&ch61,
+&ch62,
+&ch63,
+&ch64,
+&ch65,
+&ch66,
+&ch67,
+&ch68,
+&ch69,
+&ch70,
+&ch71,
+&ch72,
+&ch73,
+&ch74,
+&ch75,
+&ch76,
+&ch77,
+&ch78,
+&ch79,
+&ch80,
+&ch81,
+&ch82,
+&ch83,
+&ch84,
+&ch85,
+&ch86,
+&ch87,
+&ch88,
+&ch89,
+&ch90,
+&ch91,
+&ch92,
+&ch93,
+&ch94,
+&ch95,
+&ch96,
+&ch97,
+&ch98,
+&ch99,
+&ch100,
+&ch101,
+&ch102,
+&ch103,
+&ch104,
+&ch105,
+&ch106,
+&ch107,
+&ch108,
+&ch109,
+&ch110,
+&ch111,
+&ch112,
+&ch113,
+&ch114,
+&ch115,
+&ch116,
+&ch117,
+&ch118,
+&ch119,
+&ch120,
+&ch121,
+&ch122,
+&ch123,
+&ch124,
+&ch125,
+&ch126,
+&ch127,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+&ch160,
+&ch161,
+&ch162,
+&ch163,
+&ch164,
+&ch165,
+&ch166,
+&ch167,
+&ch168,
+&ch169,
+&ch170,
+&ch171,
+&ch172,
+&ch173,
+&ch174,
+&ch175,
+&ch176,
+&ch177,
+&ch178,
+&ch179,
+&ch180,
+&ch181,
+&ch182,
+&ch183,
+&ch184,
+&ch185,
+&ch186,
+&ch187,
+&ch188,
+&ch189,
+&ch190,
+&ch191,
+&ch192,
+&ch193,
+&ch194,
+&ch195,
+&ch196,
+&ch197,
+&ch198,
+&ch199,
+&ch200,
+&ch201,
+&ch202,
+&ch203,
+&ch204,
+&ch205,
+&ch206,
+&ch207,
+&ch208,
+&ch209,
+&ch210,
+&ch211,
+&ch212,
+&ch213,
+&ch214,
+&ch215,
+&ch216,
+&ch217,
+&ch218,
+&ch219,
+&ch220,
+&ch221,
+&ch222,
+&ch223,
+&ch224,
+&ch225,
+&ch226,
+&ch227,
+&ch228,
+&ch229,
+&ch230,
+&ch231,
+&ch232,
+&ch233,
+&ch234,
+&ch235,
+&ch236,
+&ch237,
+&ch238,
+&ch239,
+&ch240,
+&ch241,
+&ch242,
+&ch243,
+&ch244,
+&ch245,
+&ch246,
+&ch247,
+&ch248,
+&ch249,
+&ch250,
+&ch251,
+&ch252,
+&ch253,
+&ch254,
+&ch255,
+};
+#if !defined(__IBMCPP__)
+const 
+#endif
+ BitmapFontRec glutBitmap9By15 = {
+"-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1",
+256,
+0,
+chars
+};
+
index 789a89ae73e968ef9be23159162e804a013c6d79..40530b69c1381e5dd61a00cb888687e24a1e3903 100644 (file)
@@ -1,57 +1,57 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1994. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include "glutint.h"\r
-#include "glutbitmap.h"\r
-\r
-void GLUTAPIENTRY\r
-glutBitmapCharacter(GLUTbitmapFont font, int c)\r
-{\r
-  const BitmapCharRec *ch;\r
-  BitmapFontPtr fontinfo;\r
-  GLint swapbytes, lsbfirst, rowlength;\r
-  GLint skiprows, skippixels, alignment;\r
-\r
-#if defined(_WIN32)\r
-  fontinfo = (BitmapFontPtr) __glutFont(font);\r
-#else\r
-  fontinfo = (BitmapFontPtr) font;\r
-#endif\r
-\r
-  if (c < fontinfo->first ||\r
-    c >= fontinfo->first + fontinfo->num_chars)\r
-    return;\r
-  ch = fontinfo->ch[c - fontinfo->first];\r
-  if (ch) {\r
-    /* Save current modes. */\r
-    glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes);\r
-    glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst);\r
-    glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength);\r
-    glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows);\r
-    glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels);\r
-    glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);\r
-    /* Little endian machines (DEC Alpha for example) could\r
-       benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE\r
-       instead of GL_FALSE, but this would require changing the\r
-       generated bitmaps too. */\r
-    glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);\r
-    glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);\r
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);\r
-    glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);\r
-    glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);\r
-    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\r
-    glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,\r
-      ch->advance, 0, ch->bitmap);\r
-    /* Restore saved modes. */\r
-    glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes);\r
-    glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst);\r
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength);\r
-    glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows);\r
-    glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);\r
-    glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);\r
-  }\r
-}\r
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* 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. */
+
+#include "glutint.h"
+#include "glutbitmap.h"
+
+void GLUTAPIENTRY
+glutBitmapCharacter(GLUTbitmapFont font, int c)
+{
+  const BitmapCharRec *ch;
+  BitmapFontPtr fontinfo;
+  GLint swapbytes, lsbfirst, rowlength;
+  GLint skiprows, skippixels, alignment;
+
+#if defined(_WIN32)
+  fontinfo = (BitmapFontPtr) __glutFont(font);
+#else
+  fontinfo = (BitmapFontPtr) font;
+#endif
+
+  if (c < fontinfo->first ||
+    c >= fontinfo->first + fontinfo->num_chars)
+    return;
+  ch = fontinfo->ch[c - fontinfo->first];
+  if (ch) {
+    /* Save current modes. */
+    glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes);
+    glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst);
+    glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength);
+    glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows);
+    glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels);
+    glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+    /* Little endian machines (DEC Alpha for example) could
+       benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE
+       instead of GL_FALSE, but this would require changing the
+       generated bitmaps too. */
+    glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
+    glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
+    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+    glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+    glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,
+      ch->advance, 0, ch->bitmap);
+    /* Restore saved modes. */
+    glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes);
+    glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst);
+    glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength);
+    glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows);
+    glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
+  }
+}
index d5b8d436a5d6ae7b1d77c0c7d52bfa90ba33ff61..afe44f0aca185e107d4b00b2902b03b4ef234db2 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997.  */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#ifdef __VMS\r
-//EK#include <GL/vms_x_fix.h>\r
-#endif\r
-\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <stdio.h>  /* SunOS multithreaded assert() needs <stdio.h>.  Lame. */\r
-#include <assert.h>\r
-#if !defined(_WIN32) && !defined(__OS2__)\r
- #include <X11/Xlib.h>\r
- #include <X11/Xutil.h>\r
- #include <X11/Xatom.h>  /* for XA_RGB_DEFAULT_MAP atom */\r
- #if defined(__vms)\r
-   #include <Xmu/StdCmap.h>  /* for XmuLookupStandardColormap */\r
- #else\r
-   #include <X11/Xmu/StdCmap.h>  /* for XmuLookupStandardColormap */\r
- #endif\r
-#endif\r
-\r
-/* SGI optimization introduced in IRIX 6.3 to avoid X server\r
-   round trips for interning common X atoms. */\r
-#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)\r
-#include <X11/SGIFastAtom.h>\r
-#else\r
-#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)\r
-#endif\r
-\r
-#include "glutint.h"\r
-#include "layerutil.h"\r
-\r
-GLUTcolormap *__glutColormapList = NULL;\r
-\r
-GLUTcolormap *\r
-__glutAssociateNewColormap(XVisualInfo * vis)\r
-{\r
-  GLUTcolormap *cmap;\r
-  int transparentPixel, i;\r
-  unsigned long pixels[255];\r
-\r
-  cmap = (GLUTcolormap *) malloc(sizeof(GLUTcolormap));\r
-  if (!cmap)\r
-    __glutFatalError("out of memory.");\r
-#if defined(_WIN32)  || defined(__OS2__)\r
-  pixels[0] = 0;        /* avoid compilation warnings on win32 */\r
-  cmap->visual = 0;\r
-  cmap->size = 256;     /* always assume 256 on Win32 */\r
-#else\r
-  cmap->visual = vis->visual;\r
-  cmap->size = vis->visual->map_entries;\r
-#endif\r
-  cmap->refcnt = 1;\r
-  cmap->cells = (GLUTcolorcell *)\r
-    malloc(sizeof(GLUTcolorcell) * cmap->size);\r
-  if (!cmap->cells)\r
-    __glutFatalError("out of memory.");\r
-  /* make all color cell entries be invalid */\r
-  for (i = cmap->size - 1; i >= 0; i--) {\r
-    cmap->cells[i].component[GLUT_RED] = -1.0;\r
-    cmap->cells[i].component[GLUT_GREEN] = -1.0;\r
-    cmap->cells[i].component[GLUT_BLUE] = -1.0;\r
-  }\r
-  transparentPixel = __glutGetTransparentPixel(__glutDisplay, vis);\r
-  if (transparentPixel == -1 || transparentPixel >= cmap->size) {\r
-\r
-    /* If there is no transparent pixel or if the transparent\r
-       pixel is outside the range of valid colormap cells (HP\r
-       can implement their overlays this smart way since their\r
-       transparent pixel is 255), we can AllocAll the colormap.\r
-       See note below.  */\r
-\r
-    cmap->cmap = XCreateColormap(__glutDisplay,\r
-      __glutRoot, cmap->visual, AllocAll);\r
-  } else {\r
-\r
-    /* On machines where zero (or some other value in the range\r
-       of 0 through map_entries-1), BadAlloc may be generated\r
-       when an AllocAll overlay colormap is allocated since the\r
-       transparent pixel precludes all the cells in the colormap\r
-       being allocated (the transparent pixel is pre-allocated).\r
-       So in this case, use XAllocColorCells to allocate\r
-       map_entries-1 pixels (that is, all but the transparent\r
-       pixel.  */\r
-\r
-#if defined(_WIN32)  || defined(__OS2__)\r
-    cmap->cmap = XCreateColormap(__glutDisplay,\r
-      __glutRoot, 0, AllocNone);\r
-#else\r
-    cmap->cmap = XCreateColormap(__glutDisplay,\r
-      __glutRoot, vis->visual, AllocNone);\r
-    XAllocColorCells(__glutDisplay, cmap->cmap, False, 0, 0,\r
-      pixels, cmap->size - 1);\r
-#endif\r
-  }\r
-  cmap->next = __glutColormapList;\r
-  __glutColormapList = cmap;\r
-  return cmap;\r
-}\r
-\r
-static GLUTcolormap *\r
-associateColormap(XVisualInfo * vis)\r
-{\r
-#if !defined(_WIN32)  && !defined(__OS2__)\r
-  GLUTcolormap *cmap = __glutColormapList;\r
-\r
-  while (cmap != NULL) {\r
-    /* Play safe: compare visual IDs, not Visual*'s. */\r
-    if (cmap->visual->visualid == vis->visual->visualid) {\r
-      /* Already have created colormap for the visual. */\r
-      cmap->refcnt++;\r
-      return cmap;\r
-    }\r
-    cmap = cmap->next;\r
-  }\r
-#endif\r
-  return __glutAssociateNewColormap(vis);\r
-}\r
-\r
-void\r
-__glutSetupColormap(XVisualInfo * vi, GLUTcolormap ** colormap, Colormap * cmap)\r
-{\r
-#if defined(_WIN32)  || defined(__OS2__)\r
-  if (vi->dwFlags & PFD_NEED_PALETTE || vi->iPixelType == PFD_TYPE_COLORINDEX) {\r
-    *colormap = associateColormap(vi);\r
-    *cmap = (*colormap)->cmap;\r
-  } else {\r
-    *colormap = NULL;\r
-    *cmap = 0;\r
-  }\r
-#else\r
-  Status status;\r
-  XStandardColormap *standardCmaps;\r
-  int i, numCmaps;\r
-  static Atom hpColorRecoveryAtom = -1;\r
-  int isRGB, visualClass, rc;\r
-\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-  visualClass = vi->c_class;\r
-#else\r
-  visualClass = vi->class;\r
-#endif\r
-  switch (visualClass) {\r
-  case PseudoColor:\r
-    /* Mesa might return a PseudoColor visual for RGB mode. */\r
-    rc = glXGetConfig(__glutDisplay, vi, GLX_RGBA, &isRGB);\r
-    if (rc == 0 && isRGB) {\r
-      /* Must be Mesa. */\r
-      *colormap = NULL;\r
-      if (MaxCmapsOfScreen(DefaultScreenOfDisplay(__glutDisplay)) == 1\r
-        && vi->visual == DefaultVisual(__glutDisplay, __glutScreen)) {\r
-        char *privateCmap = getenv("MESA_PRIVATE_CMAP");\r
-\r
-        if (privateCmap) {\r
-          /* User doesn't want to share colormaps. */\r
-          *cmap = XCreateColormap(__glutDisplay, __glutRoot,\r
-            vi->visual, AllocNone);\r
-        } else {\r
-          /* Share the root colormap. */\r
-          *cmap = DefaultColormap(__glutDisplay, __glutScreen);\r
-        }\r
-      } else {\r
-        /* Get our own PseudoColor colormap. */\r
-        *cmap = XCreateColormap(__glutDisplay, __glutRoot,\r
-          vi->visual, AllocNone);\r
-      }\r
-    } else {\r
-      /* CI mode, real GLX never returns a PseudoColor visual\r
-         for RGB mode. */\r
-      *colormap = associateColormap(vi);\r
-      *cmap = (*colormap)->cmap;\r
-    }\r
-    break;\r
-  case TrueColor:\r
-  case DirectColor:\r
-    *colormap = NULL;   /* NULL if RGBA */\r
-\r
-    /* Hewlett-Packard supports a feature called "HP Color\r
-       Recovery". Mesa has code to use HP Color Recovery.  For\r
-       Mesa to use this feature, the atom\r
-       _HP_RGB_SMOOTH_MAP_LIST must be defined on the root\r
-       window AND the colormap obtainable by XGetRGBColormaps\r
-       for that atom must be set on the window.  If that\r
-       colormap is not set, the output will look stripy. */\r
-\r
-    if (hpColorRecoveryAtom == -1) {\r
-      char *xvendor;\r
-\r
-#define VENDOR_HP "Hewlett-Packard"\r
-\r
-      /* Only makes sense to make XInternAtom round-trip if we\r
-         know that we are connected to an HP X server. */\r
-      xvendor = ServerVendor(__glutDisplay);\r
-      if (!strncmp(xvendor, VENDOR_HP, sizeof(VENDOR_HP) - 1)) {\r
-        hpColorRecoveryAtom = XInternAtom(__glutDisplay, "_HP_RGB_SMOOTH_MAP_LIST", True);\r
-      } else {\r
-        hpColorRecoveryAtom = None;\r
-      }\r
-    }\r
-    if (hpColorRecoveryAtom != None) {\r
-      status = XGetRGBColormaps(__glutDisplay, __glutRoot,\r
-        &standardCmaps, &numCmaps, hpColorRecoveryAtom);\r
-      if (status == 1) {\r
-        for (i = 0; i < numCmaps; i++) {\r
-          if (standardCmaps[i].visualid == vi->visualid) {\r
-            *cmap = standardCmaps[i].colormap;\r
-            XFree(standardCmaps);\r
-            return;\r
-          }\r
-        }\r
-        XFree(standardCmaps);\r
-      }\r
-    }\r
-#ifndef SOLARIS_2_4_BUG\r
-    /* Solaris 2.4 and 2.5 have a bug in their\r
-       XmuLookupStandardColormap implementations.  Please\r
-       compile your Solaris 2.4 or 2.5 version of GLUT with\r
-       -DSOLARIS_2_4_BUG to work around this bug. The symptom\r
-       of the bug is that programs will get a BadMatch error\r
-       from X_CreateWindow when creating a GLUT window because\r
-       Solaris 2.4 and 2.5 create a  corrupted RGB_DEFAULT_MAP\r
-       property.  Note that this workaround prevents Colormap\r
-       sharing between applications, perhaps leading\r
-       unnecessary colormap installations or colormap flashing.\r
-       Sun fixed this bug in Solaris 2.6. */\r
-    status = XmuLookupStandardColormap(__glutDisplay,\r
-      vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP,\r
-      /* replace */ False, /* retain */ True);\r
-    if (status == 1) {\r
-      status = XGetRGBColormaps(__glutDisplay, __glutRoot,\r
-        &standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP);\r
-      if (status == 1) {\r
-        for (i = 0; i < numCmaps; i++) {\r
-          if (standardCmaps[i].visualid == vi->visualid) {\r
-            *cmap = standardCmaps[i].colormap;\r
-            XFree(standardCmaps);\r
-            return;\r
-          }\r
-        }\r
-        XFree(standardCmaps);\r
-      }\r
-    }\r
-#endif\r
-    /* If no standard colormap but TrueColor, just make a\r
-       private one. */\r
-    /* XXX Should do a better job of internal sharing for\r
-       privately allocated TrueColor colormaps. */\r
-    /* XXX DirectColor probably needs ramps hand initialized! */\r
-    *cmap = XCreateColormap(__glutDisplay, __glutRoot,\r
-      vi->visual, AllocNone);\r
-    break;\r
-  case StaticColor:\r
-  case StaticGray:\r
-  case GrayScale:\r
-    /* Mesa supports these visuals */\r
-    *colormap = NULL;\r
-    *cmap = XCreateColormap(__glutDisplay, __glutRoot,\r
-      vi->visual, AllocNone);\r
-    break;\r
-  default:\r
-    __glutFatalError(\r
-      "could not allocate colormap for visual type: %d.",\r
-      visualClass);\r
-  }\r
-  return;\r
-#endif\r
-}\r
-\r
-#if !defined(_WIN32)  && !defined(__OS2__)\r
-static int\r
-findColormaps(GLUTwindow * window,\r
-  Window * winlist, Colormap * cmaplist, int num, int max)\r
-{\r
-  GLUTwindow *child;\r
-  int i;\r
-\r
-  /* Do not allow more entries that maximum number of\r
-     colormaps! */\r
-  if (num >= max)\r
-    return num;\r
-  /* Is cmap for this window already on the list? */\r
-  for (i = 0; i < num; i++) {\r
-    if (cmaplist[i] == window->cmap)\r
-      goto normalColormapAlreadyListed;\r
-  }\r
-  /* Not found on the list; add colormap and window. */\r
-  winlist[num] = window->win;\r
-  cmaplist[num] = window->cmap;\r
-  num++;\r
-\r
-normalColormapAlreadyListed:\r
-\r
-  /* Repeat above but for the overlay colormap if there one. */\r
-  if (window->overlay) {\r
-    if (num >= max)\r
-      return num;\r
-    for (i = 0; i < num; i++) {\r
-      if (cmaplist[i] == window->overlay->cmap)\r
-        goto overlayColormapAlreadyListed;\r
-    }\r
-    winlist[num] = window->overlay->win;\r
-    cmaplist[num] = window->overlay->cmap;\r
-    num++;\r
-  }\r
-overlayColormapAlreadyListed:\r
-\r
-  /* Recursively search children. */\r
-  child = window->children;\r
-  while (child) {\r
-    num = findColormaps(child, winlist, cmaplist, num, max);\r
-    child = child->siblings;\r
-  }\r
-  return num;\r
-}\r
-\r
-void\r
-__glutEstablishColormapsProperty(GLUTwindow * window)\r
-{\r
-  /* this routine is strictly X.  Win32 doesn't need to do\r
-     anything of this sort (but has to do other wacky stuff\r
-     later). */\r
-  static Atom wmColormapWindows = None;\r
-  Window *winlist;\r
-  Colormap *cmaplist;\r
-  Status status;\r
-  int maxcmaps, num;\r
-\r
-  assert(!window->parent);\r
-  maxcmaps = MaxCmapsOfScreen(ScreenOfDisplay(__glutDisplay,\r
-      __glutScreen));\r
-  /* For portability reasons we don't use alloca for winlist\r
-     and cmaplist, but we could. */\r
-  winlist = (Window *) malloc(maxcmaps * sizeof(Window));\r
-  cmaplist = (Colormap *) malloc(maxcmaps * sizeof(Colormap));\r
-  num = findColormaps(window, winlist, cmaplist, 0, maxcmaps);\r
-  if (num < 2) {\r
-    /* Property no longer needed; remove it. */\r
-    wmColormapWindows = XSGIFastInternAtom(__glutDisplay,\r
-      "WM_COLORMAP_WINDOWS", SGI_XA_WM_COLORMAP_WINDOWS, False);\r
-    if (wmColormapWindows == None) {\r
-      __glutWarning("Could not intern X atom for WM_COLORMAP_WINDOWS.");\r
-      return;\r
-    }\r
-    XDeleteProperty(__glutDisplay, window->win, wmColormapWindows);\r
-  } else {\r
-    status = XSetWMColormapWindows(__glutDisplay, window->win,\r
-      winlist, num);\r
-    /* XSetWMColormapWindows should always work unless the\r
-       WM_COLORMAP_WINDOWS property cannot be intern'ed.  We\r
-       check to be safe. */\r
-    if (status == False)\r
-      __glutFatalError("XSetWMColormapWindows returned False.");\r
-  }\r
-  /* For portability reasons we don't use alloca for winlist\r
-     and cmaplist, but we could. */\r
-  free(winlist);\r
-  free(cmaplist);\r
-}\r
-\r
-GLUTwindow *\r
-__glutToplevelOf(GLUTwindow * window)\r
-{\r
-  while (window->parent) {\r
-    window = window->parent;\r
-  }\r
-  return window;\r
-}\r
-#endif\r
-\r
-void\r
-__glutFreeColormap(GLUTcolormap * cmap)\r
-{\r
-  GLUTcolormap *cur, **prev;\r
-\r
-  cmap->refcnt--;\r
-  if (cmap->refcnt == 0) {\r
-    /* remove from colormap list */\r
-    cur = __glutColormapList;\r
-    prev = &__glutColormapList;\r
-    while (cur) {\r
-      if (cur == cmap) {\r
-        *prev = cmap->next;\r
-        break;\r
-      }\r
-      prev = &(cur->next);\r
-      cur = cur->next;\r
-    }\r
-    /* actually free colormap */\r
-    XFreeColormap(__glutDisplay, cmap->cmap);\r
-    free(cmap->cells);\r
-    free(cmap);\r
-  }\r
-}\r
-\r
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997.  */
+
+/* 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. */
+
+#ifdef __VMS
+//EK#include <GL/vms_x_fix.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>  /* SunOS multithreaded assert() needs <stdio.h>.  Lame. */
+#include <assert.h>
+#if !defined(_WIN32) && !defined(__OS2__)
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>  /* for XA_RGB_DEFAULT_MAP atom */
+ #if defined(__vms)
+   #include <Xmu/StdCmap.h>  /* for XmuLookupStandardColormap */
+ #else
+   #include <X11/Xmu/StdCmap.h>  /* for XmuLookupStandardColormap */
+ #endif
+#endif
+
+/* SGI optimization introduced in IRIX 6.3 to avoid X server
+   round trips for interning common X atoms. */
+#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
+#include <X11/SGIFastAtom.h>
+#else
+#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
+#endif
+
+#include "glutint.h"
+#include "layerutil.h"
+
+GLUTcolormap *__glutColormapList = NULL;
+
+GLUTcolormap *
+__glutAssociateNewColormap(XVisualInfo * vis)
+{
+  GLUTcolormap *cmap;
+  int transparentPixel, i;
+  unsigned long pixels[255];
+
+  cmap = (GLUTcolormap *) malloc(sizeof(GLUTcolormap));
+  if (!cmap)
+    __glutFatalError("out of memory.");
+#if defined(_WIN32)  || defined(__OS2__)
+  pixels[0] = 0;        /* avoid compilation warnings on win32 */
+  cmap->visual = 0;
+  cmap->size = 256;     /* always assume 256 on Win32 */
+#else
+  cmap->visual = vis->visual;
+  cmap->size = vis->visual->map_entries;
+#endif
+  cmap->refcnt = 1;
+  cmap->cells = (GLUTcolorcell *)
+    malloc(sizeof(GLUTcolorcell) * cmap->size);
+  if (!cmap->cells)
+    __glutFatalError("out of memory.");
+  /* make all color cell entries be invalid */
+  for (i = cmap->size - 1; i >= 0; i--) {
+    cmap->cells[i].component[GLUT_RED] = -1.0;
+    cmap->cells[i].component[GLUT_GREEN] = -1.0;
+    cmap->cells[i].component[GLUT_BLUE] = -1.0;
+  }
+  transparentPixel = __glutGetTransparentPixel(__glutDisplay, vis);
+  if (transparentPixel == -1 || transparentPixel >= cmap->size) {
+
+    /* If there is no transparent pixel or if the transparent
+       pixel is outside the range of valid colormap cells (HP
+       can implement their overlays this smart way since their
+       transparent pixel is 255), we can AllocAll the colormap.
+       See note below.  */
+
+    cmap->cmap = XCreateColormap(__glutDisplay,
+      __glutRoot, cmap->visual, AllocAll);
+  } else {
+
+    /* On machines where zero (or some other value in the range
+       of 0 through map_entries-1), BadAlloc may be generated
+       when an AllocAll overlay colormap is allocated since the
+       transparent pixel precludes all the cells in the colormap
+       being allocated (the transparent pixel is pre-allocated).
+       So in this case, use XAllocColorCells to allocate
+       map_entries-1 pixels (that is, all but the transparent
+       pixel.  */
+
+#if defined(_WIN32)  || defined(__OS2__)
+    cmap->cmap = XCreateColormap(__glutDisplay,
+      __glutRoot, 0, AllocNone);
+#else
+    cmap->cmap = XCreateColormap(__glutDisplay,
+      __glutRoot, vis->visual, AllocNone);
+    XAllocColorCells(__glutDisplay, cmap->cmap, False, 0, 0,
+      pixels, cmap->size - 1);
+#endif
+  }
+  cmap->next = __glutColormapList;
+  __glutColormapList = cmap;
+  return cmap;
+}
+
+static GLUTcolormap *
+associateColormap(XVisualInfo * vis)
+{
+#if !defined(_WIN32)  && !defined(__OS2__)
+  GLUTcolormap *cmap = __glutColormapList;
+
+  while (cmap != NULL) {
+    /* Play safe: compare visual IDs, not Visual*'s. */
+    if (cmap->visual->visualid == vis->visual->visualid) {
+      /* Already have created colormap for the visual. */
+      cmap->refcnt++;
+      return cmap;
+    }
+    cmap = cmap->next;
+  }
+#endif
+  return __glutAssociateNewColormap(vis);
+}
+
+void
+__glutSetupColormap(XVisualInfo * vi, GLUTcolormap ** colormap, Colormap * cmap)
+{
+#if defined(_WIN32)  || defined(__OS2__)
+  if (vi->dwFlags & PFD_NEED_PALETTE || vi->iPixelType == PFD_TYPE_COLORINDEX) {
+    *colormap = associateColormap(vi);
+    *cmap = (*colormap)->cmap;
+  } else {
+    *colormap = NULL;
+    *cmap = 0;
+  }
+#else
+  Status status;
+  XStandardColormap *standardCmaps;
+  int i, numCmaps;
+  static Atom hpColorRecoveryAtom = -1;
+  int isRGB, visualClass, rc;
+
+#if defined(__cplusplus) || defined(c_plusplus)
+  visualClass = vi->c_class;
+#else
+  visualClass = vi->class;
+#endif
+  switch (visualClass) {
+  case PseudoColor:
+    /* Mesa might return a PseudoColor visual for RGB mode. */
+    rc = glXGetConfig(__glutDisplay, vi, GLX_RGBA, &isRGB);
+    if (rc == 0 && isRGB) {
+      /* Must be Mesa. */
+      *colormap = NULL;
+      if (MaxCmapsOfScreen(DefaultScreenOfDisplay(__glutDisplay)) == 1
+        && vi->visual == DefaultVisual(__glutDisplay, __glutScreen)) {
+        char *privateCmap = getenv("MESA_PRIVATE_CMAP");
+
+        if (privateCmap) {
+          /* User doesn't want to share colormaps. */
+          *cmap = XCreateColormap(__glutDisplay, __glutRoot,
+            vi->visual, AllocNone);
+        } else {
+          /* Share the root colormap. */
+          *cmap = DefaultColormap(__glutDisplay, __glutScreen);
+        }
+      } else {
+        /* Get our own PseudoColor colormap. */
+        *cmap = XCreateColormap(__glutDisplay, __glutRoot,
+          vi->visual, AllocNone);
+      }
+    } else {
+      /* CI mode, real GLX never returns a PseudoColor visual
+         for RGB mode. */
+      *colormap = associateColormap(vi);
+      *cmap = (*colormap)->cmap;
+    }
+    break;
+  case TrueColor:
+  case DirectColor:
+    *colormap = NULL;   /* NULL if RGBA */
+
+    /* Hewlett-Packard supports a feature called "HP Color
+       Recovery". Mesa has code to use HP Color Recovery.  For
+       Mesa to use this feature, the atom
+       _HP_RGB_SMOOTH_MAP_LIST must be defined on the root
+       window AND the colormap obtainable by XGetRGBColormaps
+       for that atom must be set on the window.  If that
+       colormap is not set, the output will look stripy. */
+
+    if (hpColorRecoveryAtom == -1) {
+      char *xvendor;
+
+#define VENDOR_HP "Hewlett-Packard"
+
+      /* Only makes sense to make XInternAtom round-trip if we
+         know that we are connected to an HP X server. */
+      xvendor = ServerVendor(__glutDisplay);
+      if (!strncmp(xvendor, VENDOR_HP, sizeof(VENDOR_HP) - 1)) {
+        hpColorRecoveryAtom = XInternAtom(__glutDisplay, "_HP_RGB_SMOOTH_MAP_LIST", True);
+      } else {
+        hpColorRecoveryAtom = None;
+      }
+    }
+    if (hpColorRecoveryAtom != None) {
+      status = XGetRGBColormaps(__glutDisplay, __glutRoot,
+        &standardCmaps, &numCmaps, hpColorRecoveryAtom);
+      if (status == 1) {
+        for (i = 0; i < numCmaps; i++) {
+          if (standardCmaps[i].visualid == vi->visualid) {
+            *cmap = standardCmaps[i].colormap;
+            XFree(standardCmaps);
+            return;
+          }
+        }
+        XFree(standardCmaps);
+      }
+    }
+#ifndef SOLARIS_2_4_BUG
+    /* Solaris 2.4 and 2.5 have a bug in their
+       XmuLookupStandardColormap implementations.  Please
+       compile your Solaris 2.4 or 2.5 version of GLUT with
+       -DSOLARIS_2_4_BUG to work around this bug. The symptom
+       of the bug is that programs will get a BadMatch error
+       from X_CreateWindow when creating a GLUT window because
+       Solaris 2.4 and 2.5 create a  corrupted RGB_DEFAULT_MAP
+       property.  Note that this workaround prevents Colormap
+       sharing between applications, perhaps leading
+       unnecessary colormap installations or colormap flashing.
+       Sun fixed this bug in Solaris 2.6. */
+    status = XmuLookupStandardColormap(__glutDisplay,
+      vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP,
+      /* replace */ False, /* retain */ True);
+    if (status == 1) {
+      status = XGetRGBColormaps(__glutDisplay, __glutRoot,
+        &standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP);
+      if (status == 1) {
+        for (i = 0; i < numCmaps; i++) {
+          if (standardCmaps[i].visualid == vi->visualid) {
+            *cmap = standardCmaps[i].colormap;
+            XFree(standardCmaps);
+            return;
+          }
+        }
+        XFree(standardCmaps);
+      }
+    }
+#endif
+    /* If no standard colormap but TrueColor, just make a
+       private one. */
+    /* XXX Should do a better job of internal sharing for
+       privately allocated TrueColor colormaps. */
+    /* XXX DirectColor probably needs ramps hand initialized! */
+    *cmap = XCreateColormap(__glutDisplay, __glutRoot,
+      vi->visual, AllocNone);
+    break;
+  case StaticColor:
+  case StaticGray:
+  case GrayScale:
+    /* Mesa supports these visuals */
+    *colormap = NULL;
+    *cmap = XCreateColormap(__glutDisplay, __glutRoot,
+      vi->visual, AllocNone);
+    break;
+  default:
+    __glutFatalError(
+      "could not allocate colormap for visual type: %d.",
+      visualClass);
+  }
+  return;
+#endif
+}
+
+#if !defined(_WIN32)  && !defined(__OS2__)
+static int
+findColormaps(GLUTwindow * window,
+  Window * winlist, Colormap * cmaplist, int num, int max)
+{
+  GLUTwindow *child;
+  int i;
+
+  /* Do not allow more entries that maximum number of
+     colormaps! */
+  if (num >= max)
+    return num;
+  /* Is cmap for this window already on the list? */
+  for (i = 0; i < num; i++) {
+    if (cmaplist[i] == window->cmap)
+      goto normalColormapAlreadyListed;
+  }
+  /* Not found on the list; add colormap and window. */
+  winlist[num] = window->win;
+  cmaplist[num] = window->cmap;
+  num++;
+
+normalColormapAlreadyListed:
+
+  /* Repeat above but for the overlay colormap if there one. */
+  if (window->overlay) {
+    if (num >= max)
+      return num;
+    for (i = 0; i < num; i++) {
+      if (cmaplist[i] == window->overlay->cmap)
+        goto overlayColormapAlreadyListed;
+    }
+    winlist[num] = window->overlay->win;
+    cmaplist[num] = window->overlay->cmap;
+    num++;
+  }
+overlayColormapAlreadyListed:
+
+  /* Recursively search children. */
+  child = window->children;
+  while (child) {
+    num = findColormaps(child, winlist, cmaplist, num, max);
+    child = child->siblings;
+  }
+  return num;
+}
+
+void
+__glutEstablishColormapsProperty(GLUTwindow * window)
+{
+  /* this routine is strictly X.  Win32 doesn't need to do
+     anything of this sort (but has to do other wacky stuff
+     later). */
+  static Atom wmColormapWindows = None;
+  Window *winlist;
+  Colormap *cmaplist;
+  Status status;
+  int maxcmaps, num;
+
+  assert(!window->parent);
+  maxcmaps = MaxCmapsOfScreen(ScreenOfDisplay(__glutDisplay,
+      __glutScreen));
+  /* For portability reasons we don't use alloca for winlist
+     and cmaplist, but we could. */
+  winlist = (Window *) malloc(maxcmaps * sizeof(Window));
+  cmaplist = (Colormap *) malloc(maxcmaps * sizeof(Colormap));
+  num = findColormaps(window, winlist, cmaplist, 0, maxcmaps);
+  if (num < 2) {
+    /* Property no longer needed; remove it. */
+    wmColormapWindows = XSGIFastInternAtom(__glutDisplay,
+      "WM_COLORMAP_WINDOWS", SGI_XA_WM_COLORMAP_WINDOWS, False);
+    if (wmColormapWindows == None) {
+      __glutWarning("Could not intern X atom for WM_COLORMAP_WINDOWS.");
+      return;
+    }
+    XDeleteProperty(__glutDisplay, window->win, wmColormapWindows);
+  } else {
+    status = XSetWMColormapWindows(__glutDisplay, window->win,
+      winlist, num);
+    /* XSetWMColormapWindows should always work unless the
+       WM_COLORMAP_WINDOWS property cannot be intern'ed.  We
+       check to be safe. */
+    if (status == False)
+      __glutFatalError("XSetWMColormapWindows returned False.");
+  }
+  /* For portability reasons we don't use alloca for winlist
+     and cmaplist, but we could. */
+  free(winlist);
+  free(cmaplist);
+}
+
+GLUTwindow *
+__glutToplevelOf(GLUTwindow * window)
+{
+  while (window->parent) {
+    window = window->parent;
+  }
+  return window;
+}
+#endif
+
+void
+__glutFreeColormap(GLUTcolormap * cmap)
+{
+  GLUTcolormap *cur, **prev;
+
+  cmap->refcnt--;
+  if (cmap->refcnt == 0) {
+    /* remove from colormap list */
+    cur = __glutColormapList;
+    prev = &__glutColormapList;
+    while (cur) {
+      if (cur == cmap) {
+        *prev = cmap->next;
+        break;
+      }
+      prev = &(cur->next);
+      cur = cur->next;
+    }
+    /* actually free colormap */
+    XFreeColormap(__glutDisplay, cmap->cmap);
+    free(cmap->cells);
+    free(cmap);
+  }
+}
+
index 9784e9b62260e4ee7600f18abaa703a21cdb4e7d..0db0aa64a427c275dbba5bebcfba53beb135d254 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1995, 1998. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include "glutint.h"\r
-\r
-#if !defined(_WIN32) && !defined(__OS2PM__)\r
-#include <X11/Xatom.h>  /* For XA_CURSOR */\r
-#include <X11/cursorfont.h>\r
-#endif\r
-\r
-typedef struct _CursorTable {\r
-#if defined(_WIN32)\r
-  char* glyph;\r
-#else\r
-  int glyph;\r
-#endif\r
-  Cursor cursor;\r
-} CursorTable;\r
-/* *INDENT-OFF* */\r
-\r
-static CursorTable cursorTable[] = {\r
-  {XC_arrow, None},              /* GLUT_CURSOR_RIGHT_ARROW */\r
-  {XC_top_left_arrow, None},     /* GLUT_CURSOR_LEFT_ARROW */\r
-  {XC_hand1, None},              /* GLUT_CURSOR_INFO */\r
-  {XC_pirate, None},             /* GLUT_CURSOR_DESTROY */\r
-  {XC_question_arrow, None},     /* GLUT_CURSOR_HELP */\r
-  {XC_exchange, None},           /* GLUT_CURSOR_CYCLE */\r
-  {XC_spraycan, None},           /* GLUT_CURSOR_SPRAY */\r
-  {XC_watch, None},              /* GLUT_CURSOR_WAIT */\r
-  {XC_xterm, None},              /* GLUT_CURSOR_TEXT */\r
-  {XC_crosshair, None},                  /* GLUT_CURSOR_CROSSHAIR */\r
-  {XC_sb_v_double_arrow, None},          /* GLUT_CURSOR_UP_DOWN */\r
-  {XC_sb_h_double_arrow, None},          /* GLUT_CURSOR_LEFT_RIGHT */\r
-  {XC_top_side, None},           /* GLUT_CURSOR_TOP_SIDE */\r
-  {XC_bottom_side, None},        /* GLUT_CURSOR_BOTTOM_SIDE */\r
-  {XC_left_side, None},                  /* GLUT_CURSOR_LEFT_SIDE */\r
-  {XC_right_side, None},         /* GLUT_CURSOR_RIGHT_SIDE */\r
-  {XC_top_left_corner, None},    /* GLUT_CURSOR_TOP_LEFT_CORNER */\r
-  {XC_top_right_corner, None},   /* GLUT_CURSOR_TOP_RIGHT_CORNER */\r
-  {XC_bottom_right_corner, None}, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */\r
-  {XC_bottom_left_corner, None},  /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */\r
-};\r
-/* *INDENT-ON* */\r
-\r
-#if !defined(_WIN32) && !defined(__OS2PM__)\r
-static Cursor blankCursor = None;\r
-static Cursor fullCrosshairCusor = None;\r
-\r
-/* SGI X server's support a special property called the\r
-   _SGI_CROSSHAIR_CURSOR that when installed as a window's\r
-   cursor, becomes a full screen crosshair cursor.  SGI\r
-   has special cursor generation hardware for this case. */\r
-static Cursor\r
-getFullCrosshairCursor(void)\r
-{\r
-  Cursor cursor;\r
-  Atom crosshairAtom, actualType;\r
-  int rc, actualFormat;\r
-  unsigned long n, left;\r
-  unsigned long *value;\r
-\r
-  if (fullCrosshairCusor == None) {\r
-    crosshairAtom = XInternAtom(__glutDisplay,\r
-      "_SGI_CROSSHAIR_CURSOR", True);\r
-    if (crosshairAtom != None) {\r
-      value = 0;        /* Make compiler happy. */\r
-      rc = XGetWindowProperty(__glutDisplay, __glutRoot,\r
-        crosshairAtom, 0, 1, False, XA_CURSOR, &actualType,\r
-        &actualFormat, &n, &left, (unsigned char **) &value);\r
-      if (rc == Success && actualFormat == 32 && n >= 1) {\r
-        cursor = value[0];\r
-        XFree(value);\r
-        return cursor;\r
-      }\r
-    }\r
-  }\r
-  return XCreateFontCursor(__glutDisplay, XC_crosshair);\r
-}\r
-\r
-/* X11 forces you to create a blank cursor if you want\r
-   to disable the cursor. */\r
-static Cursor\r
-makeBlankCursor(void)\r
-{\r
-  static char data[1] =\r
-  {0};\r
-  Cursor cursor;\r
-  Pixmap blank;\r
-  XColor dummy;\r
-\r
-  blank = XCreateBitmapFromData(__glutDisplay, __glutRoot,\r
-    data, 1, 1);\r
-  if (blank == None)\r
-    __glutFatalError("out of memory.");\r
-  cursor = XCreatePixmapCursor(__glutDisplay, blank, blank,\r
-    &dummy, &dummy, 0, 0);\r
-  XFreePixmap(__glutDisplay, blank);\r
-\r
-  return cursor;\r
-}\r
-#endif /* !_WIN32 && !__OS2PM__*/\r
-\r
-/* Win32 and X11 use this same function to accomplish\r
-   fairly different tasks.  X11 lets you just define the\r
-   cursor for a window and the window system takes care\r
-   of making sure that the window's cursor is installed\r
-   when the mouse is in the window.  Win32 requires the\r
-   application to handle a WM_SETCURSOR message to install\r
-   the right cursor when windows are entered.  Think of\r
-   the Win32 __glutSetCursor (called from __glutWindowProc)\r
-   as "install cursor".  Think of the X11 __glutSetCursor\r
-   (called from glutSetCursor) as "define cursor". */\r
-void\r
-__glutSetCursor(GLUTwindow *window)\r
-{\r
-  int cursor = window->cursor;\r
-  Cursor xcursor = 0;\r
-\r
-  if (cursor >= 0 &&\r
-    cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) {\r
-    if (cursorTable[cursor].cursor == None) {\r
-      cursorTable[cursor].cursor = XCreateFontCursor(__glutDisplay,\r
-        cursorTable[cursor].glyph);\r
-    }\r
-    xcursor = cursorTable[cursor].cursor;\r
-  } else {\r
-    /* Special cases. */\r
-    switch (cursor) {\r
-    case GLUT_CURSOR_INHERIT:\r
-#if defined(_WIN32)\r
-      while (window->parent) {\r
-        window = window->parent;\r
-        if (window->cursor != GLUT_CURSOR_INHERIT) {\r
-          __glutSetCursor(window);\r
-          return;\r
-        }\r
-      }\r
-      /* XXX Default to an arrow cursor.  Is this\r
-         right or should we be letting the default\r
-         window proc be installing some system cursor? */\r
-      xcursor = cursorTable[0].cursor;\r
-      if (xcursor == NULL) {\r
-        xcursor =\r
-          cursorTable[0].cursor =\r
-          LoadCursor(NULL, cursorTable[0].glyph);\r
-      }\r
-\r
-#elif defined(__OS2PM__)\r
-//todo\r
-      xcursor = None;\r
-\r
-#else\r
-      xcursor = None;\r
-#endif\r
-      break;\r
-    case GLUT_CURSOR_NONE:\r
-#if defined(_WIN32) || defined(__OS2PM__)\r
-      xcursor = NULL;\r
-#else\r
-      if (blankCursor == None) {\r
-        blankCursor = makeBlankCursor();\r
-      }\r
-      xcursor = blankCursor;\r
-#endif\r
-      break;\r
-    case GLUT_CURSOR_FULL_CROSSHAIR:\r
-#if defined(_WIN32)\r
-      xcursor = (HICON) IDC_CROSS;\r
-#elif defined(__OS2PM__)\r
-//todo\r
-#else\r
-      if (fullCrosshairCusor == None) {\r
-        fullCrosshairCusor = getFullCrosshairCursor();\r
-      }\r
-      xcursor = fullCrosshairCusor;\r
-#endif\r
-      break;\r
-    }\r
-  }\r
-  XDefineCursor(__glutDisplay,\r
-    window->win, xcursor);\r
-  XFlush(__glutDisplay);\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutSetCursor(int cursor)\r
-{\r
-#ifdef _WIN32\r
-  POINT point;\r
-\r
-  __glutCurrentWindow->cursor = cursor;\r
-  /* Are we in the window right now?  If so,\r
-     install the cursor. */\r
-  GetCursorPos(&point);\r
-  if (__glutCurrentWindow->win == WindowFromPoint(point)) {\r
-    __glutSetCursor(__glutCurrentWindow);\r
-  }\r
-#elif defined(__OS2PM__)\r
-//todo\r
-#else\r
-  __glutCurrentWindow->cursor = cursor;\r
-  __glutSetCursor(__glutCurrentWindow);\r
-#endif\r
-}\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1995, 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. */
+
+#include "glutint.h"
+
+#if !defined(_WIN32) && !defined(__OS2PM__)
+#include <X11/Xatom.h>  /* For XA_CURSOR */
+#include <X11/cursorfont.h>
+#endif
+
+typedef struct _CursorTable {
+#if defined(_WIN32)
+  char* glyph;
+#else
+  int glyph;
+#endif
+  Cursor cursor;
+} CursorTable;
+/* *INDENT-OFF* */
+
+static CursorTable cursorTable[] = {
+  {XC_arrow, None},              /* GLUT_CURSOR_RIGHT_ARROW */
+  {XC_top_left_arrow, None},     /* GLUT_CURSOR_LEFT_ARROW */
+  {XC_hand1, None},              /* GLUT_CURSOR_INFO */
+  {XC_pirate, None},             /* GLUT_CURSOR_DESTROY */
+  {XC_question_arrow, None},     /* GLUT_CURSOR_HELP */
+  {XC_exchange, None},           /* GLUT_CURSOR_CYCLE */
+  {XC_spraycan, None},           /* GLUT_CURSOR_SPRAY */
+  {XC_watch, None},              /* GLUT_CURSOR_WAIT */
+  {XC_xterm, None},              /* GLUT_CURSOR_TEXT */
+  {XC_crosshair, None},                  /* GLUT_CURSOR_CROSSHAIR */
+  {XC_sb_v_double_arrow, None},          /* GLUT_CURSOR_UP_DOWN */
+  {XC_sb_h_double_arrow, None},          /* GLUT_CURSOR_LEFT_RIGHT */
+  {XC_top_side, None},           /* GLUT_CURSOR_TOP_SIDE */
+  {XC_bottom_side, None},        /* GLUT_CURSOR_BOTTOM_SIDE */
+  {XC_left_side, None},                  /* GLUT_CURSOR_LEFT_SIDE */
+  {XC_right_side, None},         /* GLUT_CURSOR_RIGHT_SIDE */
+  {XC_top_left_corner, None},    /* GLUT_CURSOR_TOP_LEFT_CORNER */
+  {XC_top_right_corner, None},   /* GLUT_CURSOR_TOP_RIGHT_CORNER */
+  {XC_bottom_right_corner, None}, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */
+  {XC_bottom_left_corner, None},  /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */
+};
+/* *INDENT-ON* */
+
+#if !defined(_WIN32) && !defined(__OS2PM__)
+static Cursor blankCursor = None;
+static Cursor fullCrosshairCusor = None;
+
+/* SGI X server's support a special property called the
+   _SGI_CROSSHAIR_CURSOR that when installed as a window's
+   cursor, becomes a full screen crosshair cursor.  SGI
+   has special cursor generation hardware for this case. */
+static Cursor
+getFullCrosshairCursor(void)
+{
+  Cursor cursor;
+  Atom crosshairAtom, actualType;
+  int rc, actualFormat;
+  unsigned long n, left;
+  unsigned long *value;
+
+  if (fullCrosshairCusor == None) {
+    crosshairAtom = XInternAtom(__glutDisplay,
+      "_SGI_CROSSHAIR_CURSOR", True);
+    if (crosshairAtom != None) {
+      value = 0;        /* Make compiler happy. */
+      rc = XGetWindowProperty(__glutDisplay, __glutRoot,
+        crosshairAtom, 0, 1, False, XA_CURSOR, &actualType,
+        &actualFormat, &n, &left, (unsigned char **) &value);
+      if (rc == Success && actualFormat == 32 && n >= 1) {
+        cursor = value[0];
+        XFree(value);
+        return cursor;
+      }
+    }
+  }
+  return XCreateFontCursor(__glutDisplay, XC_crosshair);
+}
+
+/* X11 forces you to create a blank cursor if you want
+   to disable the cursor. */
+static Cursor
+makeBlankCursor(void)
+{
+  static char data[1] =
+  {0};
+  Cursor cursor;
+  Pixmap blank;
+  XColor dummy;
+
+  blank = XCreateBitmapFromData(__glutDisplay, __glutRoot,
+    data, 1, 1);
+  if (blank == None)
+    __glutFatalError("out of memory.");
+  cursor = XCreatePixmapCursor(__glutDisplay, blank, blank,
+    &dummy, &dummy, 0, 0);
+  XFreePixmap(__glutDisplay, blank);
+
+  return cursor;
+}
+#endif /* !_WIN32 && !__OS2PM__*/
+
+/* Win32 and X11 use this same function to accomplish
+   fairly different tasks.  X11 lets you just define the
+   cursor for a window and the window system takes care
+   of making sure that the window's cursor is installed
+   when the mouse is in the window.  Win32 requires the
+   application to handle a WM_SETCURSOR message to install
+   the right cursor when windows are entered.  Think of
+   the Win32 __glutSetCursor (called from __glutWindowProc)
+   as "install cursor".  Think of the X11 __glutSetCursor
+   (called from glutSetCursor) as "define cursor". */
+void
+__glutSetCursor(GLUTwindow *window)
+{
+  int cursor = window->cursor;
+  Cursor xcursor = 0;
+
+  if (cursor >= 0 &&
+    cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) {
+    if (cursorTable[cursor].cursor == None) {
+      cursorTable[cursor].cursor = XCreateFontCursor(__glutDisplay,
+        cursorTable[cursor].glyph);
+    }
+    xcursor = cursorTable[cursor].cursor;
+  } else {
+    /* Special cases. */
+    switch (cursor) {
+    case GLUT_CURSOR_INHERIT:
+#if defined(_WIN32)
+      while (window->parent) {
+        window = window->parent;
+        if (window->cursor != GLUT_CURSOR_INHERIT) {
+          __glutSetCursor(window);
+          return;
+        }
+      }
+      /* XXX Default to an arrow cursor.  Is this
+         right or should we be letting the default
+         window proc be installing some system cursor? */
+      xcursor = cursorTable[0].cursor;
+      if (xcursor == NULL) {
+        xcursor =
+          cursorTable[0].cursor =
+          LoadCursor(NULL, cursorTable[0].glyph);
+      }
+
+#elif defined(__OS2PM__)
+//todo
+      xcursor = None;
+
+#else
+      xcursor = None;
+#endif
+      break;
+    case GLUT_CURSOR_NONE:
+#if defined(_WIN32) || defined(__OS2PM__)
+      xcursor = NULL;
+#else
+      if (blankCursor == None) {
+        blankCursor = makeBlankCursor();
+      }
+      xcursor = blankCursor;
+#endif
+      break;
+    case GLUT_CURSOR_FULL_CROSSHAIR:
+#if defined(_WIN32)
+      xcursor = (HICON) IDC_CROSS;
+#elif defined(__OS2PM__)
+//todo
+#else
+      if (fullCrosshairCusor == None) {
+        fullCrosshairCusor = getFullCrosshairCursor();
+      }
+      xcursor = fullCrosshairCusor;
+#endif
+      break;
+    }
+  }
+  XDefineCursor(__glutDisplay,
+    window->win, xcursor);
+  XFlush(__glutDisplay);
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutSetCursor(int cursor)
+{
+#ifdef _WIN32
+  POINT point;
+
+  __glutCurrentWindow->cursor = cursor;
+  /* Are we in the window right now?  If so,
+     install the cursor. */
+  GetCursorPos(&point);
+  if (__glutCurrentWindow->win == WindowFromPoint(point)) {
+    __glutSetCursor(__glutCurrentWindow);
+  }
+#elif defined(__OS2PM__)
+//todo
+#else
+  __glutCurrentWindow->cursor = cursor;
+  __glutSetCursor(__glutCurrentWindow);
+#endif
+}
+/* ENDCENTRY */
index c556ef2826580cd767c2f7910a61dbe34e9933b6..4ece82e52b69cfed185226e3567ea7958fa228d0 100644 (file)
-/* glut_event.c */\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 1998. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#ifdef __VMS\r
-#include <GL/vms_x_fix.h>\r
-#endif\r
-\r
-#include <stdlib.h>\r
-#include <stdio.h>\r
-#include <errno.h>\r
-#include <assert.h>\r
-#include <string.h>  /* Some FD_ZERO macros use memset without\r
-                        prototyping memset. */\r
-\r
-/* Much of the following #ifdef logic to include the proper\r
-   prototypes for the select system call is based on logic\r
-   from the X11R6.3 version of <X11/Xpoll.h>. */\r
-\r
-#if !defined(_WIN32)\r
-# ifdef __sgi\r
-#  include <bstring.h>    /* prototype for bzero used by FD_ZERO */\r
-# endif\r
-# if (defined(SVR4) || defined(CRAY) || defined(AIXV3)) && !defined(FD_SETSIZE)\r
-#  include <sys/select.h> /* select system call interface */\r
-#  ifdef luna\r
-#   include <sysent.h>\r
-#  endif\r
-# endif\r
-  /* AIX 4.2 fubar-ed <sys/select.h>, so go to heroic measures to get it */\r
-# if defined(AIXV4) && !defined(NFDBITS)\r
-#  include <sys/select.h>\r
-# endif\r
-#endif /* !_WIN32 */\r
-\r
-#include <sys/types.h>\r
-\r
-#if defined(__OS2__)\r
-//??? Â­Â Ã¤Â¨Â£Â  ??     #   include <sys/time.h>\r
-#elif !defined(_WIN32)\r
-# if defined(__vms) && ( __VMS_VER < 70000000 )\r
-#  include <sys/time.h>\r
-# else\r
-#  ifndef __vms\r
-#   include <sys/time.h>\r
-#  endif\r
-# endif\r
-# include <unistd.h>\r
-# include <X11/Xlib.h>\r
-# include <X11/keysym.h>\r
-#else\r
-# ifdef __CYGWIN32__\r
-#  include <sys/time.h>\r
-# else\r
-#  include <sys/timeb.h>\r
-# endif\r
-# ifdef __hpux\r
-   /* XXX Bert Gijsbers <bert@mc.bio.uva.nl> reports that HP-UX\r
-      needs different keysyms for the End, Insert, and Delete keys\r
-      to work on an HP 715.  It would be better if HP generated\r
-      standard keysyms for standard keys. */\r
-#  include <X11/HPkeysym.h>\r
-# endif\r
-#endif /* !_WIN32 */\r
-\r
-#include "glutint.h"\r
-\r
-#if defined(__vms) && ( __VMS_VER < 70000000 )\r
-#include <ssdef.h>\r
-#include <psldef.h>\r
-extern int SYS$CLREF(int efn);\r
-extern int SYS$SETIMR(unsigned int efn, struct timeval6 *timeout, void *ast,\r
-  unsigned int request_id, unsigned int flags);\r
-extern int SYS$WFLOR(unsigned int efn, unsigned int mask);\r
-extern int SYS$CANTIM(unsigned int request_id, unsigned int mode);\r
-#endif /* __vms, VMs 6.2 or earlier */\r
-\r
-static GLUTtimer *freeTimerList = NULL;\r
-\r
-GLUTidleCB __glutIdleFunc = NULL;\r
-GLUTtimer *__glutTimerList = NULL;\r
-#ifdef SUPPORT_FORTRAN\r
-GLUTtimer *__glutNewTimer;\r
-#endif\r
-GLUTwindow *__glutWindowWorkList = NULL;\r
-GLUTmenu *__glutMappedMenu;\r
-GLUTmenu *__glutCurrentMenu = NULL;\r
-\r
-void (*__glutUpdateInputDeviceMaskFunc) (GLUTwindow *);\r
-#if !defined(_WIN32) && !defined(__OS2__)\r
-void (*__glutMenuItemEnterOrLeave)(GLUTmenuItem * item, int num, int type) = NULL;\r
-void (*__glutFinishMenu)(Window win, int x, int y);\r
-void (*__glutPaintMenu)(GLUTmenu * menu);\r
-void (*__glutStartMenu)(GLUTmenu * menu, GLUTwindow * window, int x, int y, int x_win, int y_win);\r
-GLUTmenu * (*__glutGetMenuByNum)(int menunum);\r
-GLUTmenuItem * (*__glutGetMenuItem)(GLUTmenu * menu, Window win, int *which);\r
-GLUTmenu * (*__glutGetMenu)(Window win);\r
-#endif\r
-\r
-Atom __glutMotifHints = None;\r
-/* Modifier mask of ~0 implies not in core input callback. */\r
-unsigned int __glutModifierMask = (unsigned int) ~0;\r
-int __glutWindowDamaged = 0;\r
-\r
-void GLUTAPIENTRY\r
-glutIdleFunc(GLUTidleCB idleFunc)\r
-{\r
-  __glutIdleFunc = idleFunc;\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutTimerFunc(unsigned int interval, GLUTtimerCB timerFunc, int value)\r
-{\r
-  GLUTtimer *timer, *other;\r
-  GLUTtimer **prevptr;\r
-#ifdef OLD_VMS\r
-   struct timeval6 now;\r
-#else\r
-   struct timeval now;\r
-#endif\r
-\r
-  if (!timerFunc)\r
-    return;\r
-\r
-  if (freeTimerList) {\r
-    timer = freeTimerList;\r
-    freeTimerList = timer->next;\r
-  } else {\r
-    timer = (GLUTtimer *) malloc(sizeof(GLUTtimer));\r
-    if (!timer)\r
-      __glutFatalError("out of memory.");\r
-  }\r
-\r
-  timer->func = timerFunc;\r
-#if defined(__vms) && ( __VMS_VER < 70000000 )\r
-  /* VMS time is expressed in units of 100 ns */\r
-  timer->timeout.val = interval * TICKS_PER_MILLISECOND;\r
-#else\r
-  timer->timeout.tv_sec = (int) interval / 1000;\r
-  timer->timeout.tv_usec = (int) (interval % 1000) * 1000;\r
-#endif\r
-  timer->value = value;\r
-  timer->next = NULL;\r
-  GETTIMEOFDAY(&now);\r
-  ADD_TIME(timer->timeout, timer->timeout, now);\r
-  prevptr = &__glutTimerList;\r
-  other = *prevptr;\r
-  while (other && IS_AFTER(other->timeout, timer->timeout)) {\r
-    prevptr = &other->next;\r
-    other = *prevptr;\r
-  }\r
-  timer->next = other;\r
-#ifdef SUPPORT_FORTRAN\r
-  __glutNewTimer = timer;  /* for Fortran binding! */\r
-#endif\r
-  *prevptr = timer;\r
-}\r
-\r
-void\r
-handleTimeouts(void)\r
-{\r
-#ifdef OLD_VMS\r
-   struct timeval6 now;\r
-#else\r
-   struct timeval now;\r
-#endif\r
-   GLUTtimer *timer;\r
-\r
-  /* Assumption is that __glutTimerList is already determined\r
-     to be non-NULL. */\r
-  GETTIMEOFDAY(&now);\r
-  while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) {\r
-    timer = __glutTimerList;\r
-    timer->func(timer->value);\r
-    __glutTimerList = timer->next;\r
-    timer->next = freeTimerList;\r
-    freeTimerList = timer;\r
-    if (!__glutTimerList)\r
-      break;\r
-  }\r
-}\r
-\r
-void\r
-__glutPutOnWorkList(GLUTwindow * window, int workMask)\r
-{\r
-  if (window->workMask) {\r
-    /* Already on list; just OR in new workMask. */\r
-    window->workMask |= workMask;\r
-  } else {\r
-    /* Update work mask and add to window work list. */\r
-    window->workMask = workMask;\r
-    /* Assert that if the window does not have a\r
-       workMask already, the window should definitely\r
-       not be the head of the work list. */\r
-    assert(window != __glutWindowWorkList);\r
-    window->prevWorkWin = __glutWindowWorkList;\r
-    __glutWindowWorkList = window;\r
-  }\r
-}\r
-\r
-void\r
-__glutPostRedisplay(GLUTwindow * window, int layerMask)\r
-{\r
-  int shown = (layerMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) ?\r
-    window->shownState : window->overlay->shownState;\r
-\r
-  /* Post a redisplay if the window is visible (or the\r
-     visibility of the window is unknown, ie. window->visState\r
-     == -1) _and_ the layer is known to be shown. */\r
-  if (window->visState != GLUT_HIDDEN\r
-    && window->visState != GLUT_FULLY_COVERED && shown) {\r
-    __glutPutOnWorkList(window, layerMask);\r
-  }\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutPostRedisplay(void)\r
-{\r
-  __glutPostRedisplay(__glutCurrentWindow, GLUT_REDISPLAY_WORK);\r
-}\r
-\r
-/* The advantage of this routine is that it saves the cost of a\r
-   glutSetWindow call (entailing an expensive OpenGL context switch),\r
-   particularly useful when multiple windows need redisplays posted at\r
-   the same times.  See also glutPostWindowOverlayRedisplay. */\r
-void GLUTAPIENTRY\r
-glutPostWindowRedisplay(int win)\r
-{\r
-  __glutPostRedisplay(__glutWindowList[win - 1], GLUT_REDISPLAY_WORK);\r
-}\r
-\r
-/* ENDCENTRY */\r
-static GLUTeventParser *eventParserList = NULL;\r
-\r
-/* __glutRegisterEventParser allows another module to register\r
-   to intercept X events types not otherwise acted on by the\r
-   GLUT processEventsAndTimeouts routine.  The X Input\r
-   extension support code uses an event parser for handling X\r
-   Input extension events.  */\r
-\r
-void\r
-__glutRegisterEventParser(GLUTeventParser * parser)\r
-{\r
-  parser->next = eventParserList;\r
-  eventParserList = parser;\r
-}\r
-\r
-static void\r
-markWindowHidden(GLUTwindow * window)\r
-{\r
-  if (GLUT_HIDDEN != window->visState) {\r
-    GLUTwindow *child;\r
-\r
-    if (window->windowStatus) {\r
-      window->visState = GLUT_HIDDEN;\r
-      __glutSetWindow(window);\r
-      window->windowStatus(GLUT_HIDDEN);\r
-    }\r
-    /* An unmap is only reported on a single window; its\r
-       descendents need to know they are no longer visible. */\r
-    child = window->children;\r
-    while (child) {\r
-      markWindowHidden(child);\r
-      child = child->siblings;\r
-    }\r
-  }\r
-}\r
-\r
-#if !defined(_WIN32) && !defined(__OS2__)\r
-\r
-static void\r
-purgeStaleWindow(Window win)\r
-{\r
-  GLUTstale **pEntry = &__glutStaleWindowList;\r
-  GLUTstale *entry = __glutStaleWindowList;\r
-\r
-  /* Tranverse singly-linked stale window list look for the\r
-     window ID. */\r
-  while (entry) {\r
-    if (entry->win == win) {\r
-      /* Found it; delete it. */\r
-      *pEntry = entry->next;\r
-      free(entry);\r
-      return;\r
-    } else {\r
-      pEntry = &entry->next;\r
-      entry = *pEntry;\r
-    }\r
-  }\r
-}\r
-\r
-/* Unlike XNextEvent, if a signal arrives,\r
-   interruptibleXNextEvent will return (with a zero return\r
-   value).  This helps GLUT drop out of XNextEvent if a signal\r
-   is delivered.  The intent is so that a GLUT program can call\r
-   glutIdleFunc in a signal handler to register an idle func\r
-   and then immediately get dropped into the idle func (after\r
-   returning from the signal handler).  The idea is to make\r
-   GLUT's main loop reliably interruptible by signals. */\r
-static int\r
-interruptibleXNextEvent(Display * dpy, XEvent * event)\r
-{\r
-  fd_set fds;\r
-  int rc;\r
-\r
-  /* Flush X protocol since XPending does not do this\r
-     implicitly. */\r
-  XFlush(__glutDisplay);\r
-  for (;;) {\r
-    if (XPending(__glutDisplay)) {\r
-      XNextEvent(dpy, event);\r
-      return 1;\r
-    }\r
-#ifndef VMS\r
-    /* the combination ConectionNumber-select is buggy on VMS. Sometimes it\r
-     * fails. This part of the code hangs the program on VMS7.2. But even\r
-     * without it the program seems to run correctly.\r
-     * Note that this is a bug in the VMS/DECWindows run-time-libraries.\r
-     * Compaq engeneering does not want or is not able to make a fix.\r
-     * (last sentence is a quotation from Compaq when I reported the\r
-     * problem January 2000) */\r
-    FD_ZERO(&fds);\r
-    FD_SET(__glutConnectionFD, &fds);\r
-    rc = select(__glutConnectionFD + 1, &fds, NULL, NULL, NULL);\r
-    if (rc < 0) {\r
-      if (errno == EINTR) {\r
-        return 0;\r
-      } else {\r
-        __glutFatalError("select error.");\r
-      }\r
-    }\r
-#endif\r
-  }\r
-}\r
-\r
-#endif\r
-\r
-static void\r
-processEventsAndTimeouts(void)\r
-{\r
-  do {\r
-#if defined(__OS2__)\r
-   QMSG  qmsg;   /* message from message queue     */\r
-   extern HAB   hab;      /* PM anchor block handle         */\r
-\r
-   if(! WinGetMsg( hab, &qmsg, 0UL, 0UL, 0UL ) )\r
-                 exit(0);\r
-    WinDispatchMsg( hab,     /* PM anchor block handle  */\r
-                    &qmsg ); /* pointer to message      */\r
-\r
-#elif defined(_WIN32)\r
-    MSG event;\r
-\r
-    if(!GetMessage(&event, NULL, 0, 0))        /* bail if no more messages */\r
-      exit(0);\r
-    TranslateMessage(&event);          /* translate virtual-key messages */\r
-    DispatchMessage(&event);           /* call the window proc */\r
-    /* see win32_event.c for event (message) processing procedures */\r
-#else\r
-    static int mappedMenuButton;\r
-    GLUTeventParser *parser;\r
-    XEvent event, ahead;\r
-    GLUTwindow *window;\r
-    GLUTkeyboardCB keyboard;\r
-    GLUTspecialCB special;\r
-    int gotEvent, width, height;\r
-\r
-    gotEvent = interruptibleXNextEvent(__glutDisplay, &event);\r
-    if (gotEvent) {\r
-      switch (event.type) {\r
-      case MappingNotify:\r
-        XRefreshKeyboardMapping((XMappingEvent *) & event);\r
-        break;\r
-      case ConfigureNotify:\r
-        window = __glutGetWindow(event.xconfigure.window);\r
-        if (window) {\r
-          if (window->win != event.xconfigure.window) {\r
-            /* Ignore ConfigureNotify sent to the overlay\r
-               planes. GLUT could get here because overlays\r
-               select for StructureNotify events to receive\r
-               DestroyNotify. */\r
-            break;\r
-          }\r
-          width = event.xconfigure.width;\r
-          height = event.xconfigure.height;\r
-          if (width != window->width || height != window->height) {\r
-            if (window->overlay) {\r
-              XResizeWindow(__glutDisplay, window->overlay->win, width, height);\r
-            }\r
-            window->width = width;\r
-            window->height = height;\r
-            __glutSetWindow(window);\r
-            /* Do not execute OpenGL out of sequence with\r
-               respect to the XResizeWindow request! */\r
-            glXWaitX();\r
-            window->reshape(width, height);\r
-            window->forceReshape = False;\r
-            /* A reshape should be considered like posting a\r
-               repair; this is necessary for the "Mesa\r
-               glXSwapBuffers to repair damage" hack to operate\r
-               correctly.  Without it, there's not an initial\r
-               back buffer render from which to blit from when\r
-               damage happens to the window. */\r
-            __glutPostRedisplay(window, GLUT_REPAIR_WORK);\r
-          }\r
-        }\r
-        break;\r
-      case Expose:\r
-        /* compress expose events */\r
-        while (XEventsQueued(__glutDisplay, QueuedAfterReading)\r
-          > 0) {\r
-          XPeekEvent(__glutDisplay, &ahead);\r
-          if (ahead.type != Expose ||\r
-            ahead.xexpose.window != event.xexpose.window) {\r
-            break;\r
-          }\r
-          XNextEvent(__glutDisplay, &event);\r
-        }\r
-        if (event.xexpose.count == 0) {\r
-          GLUTmenu *menu;\r
-\r
-          if (__glutMappedMenu &&\r
-            (menu = __glutGetMenu(event.xexpose.window))) {\r
-            __glutPaintMenu(menu);\r
-          } else {\r
-            window = __glutGetWindow(event.xexpose.window);\r
-            if (window) {\r
-              if (window->win == event.xexpose.window) {\r
-                __glutPostRedisplay(window, GLUT_REPAIR_WORK);\r
-              } else if (window->overlay && window->overlay->win == event.xexpose.window) {\r
-                __glutPostRedisplay(window, GLUT_OVERLAY_REPAIR_WORK);\r
-              }\r
-            }\r
-          }\r
-        } else {\r
-          /* there are more exposes to read; wait to redisplay */\r
-        }\r
-        break;\r
-      case ButtonPress:\r
-      case ButtonRelease:\r
-        if (__glutMappedMenu && event.type == ButtonRelease\r
-          && mappedMenuButton == event.xbutton.button) {\r
-          /* Menu is currently popped up and its button is\r
-             released. */\r
-          __glutFinishMenu(event.xbutton.window, event.xbutton.x, event.xbutton.y);\r
-        } else {\r
-          window = __glutGetWindow(event.xbutton.window);\r
-          if (window) {\r
-            GLUTmenu *menu;\r
-           int menuNum;\r
-\r
-            menuNum = window->menu[event.xbutton.button - 1];\r
-            /* Make sure that __glutGetMenuByNum is only called if there\r
-              really is a menu present. */\r
-            if ((menuNum > 0) && (menu = __glutGetMenuByNum(menuNum))) {\r
-              if (event.type == ButtonPress && !__glutMappedMenu) {\r
-                __glutStartMenu(menu, window,\r
-                  event.xbutton.x_root, event.xbutton.y_root,\r
-                  event.xbutton.x, event.xbutton.y);\r
-                mappedMenuButton = event.xbutton.button;\r
-              } else {\r
-                /* Ignore a release of a button with a menu\r
-                   attatched to it when no menu is popped up,\r
-                   or ignore a press when another menu is\r
-                   already popped up. */\r
-              }\r
-            } else if (window->mouse) {\r
-              __glutSetWindow(window);\r
-              __glutModifierMask = event.xbutton.state;\r
-              window->mouse(event.xbutton.button - 1,\r
-                event.type == ButtonRelease ?\r
-                GLUT_UP : GLUT_DOWN,\r
-                event.xbutton.x, event.xbutton.y);\r
-              __glutModifierMask = ~0;\r
-            } else {\r
-              /* Stray mouse events.  Ignore. */\r
-            }\r
-          } else {\r
-            /* Window might have been destroyed and all the\r
-               events for the window may not yet be received. */\r
-          }\r
-        }\r
-        break;\r
-      case MotionNotify:\r
-        if (!__glutMappedMenu) {\r
-          window = __glutGetWindow(event.xmotion.window);\r
-          if (window) {\r
-            /* If motion function registered _and_ buttons held\r
-               * down, call motion function...  */\r
-            if (window->motion && event.xmotion.state &\r
-              (Button1Mask | Button2Mask | Button3Mask)) {\r
-              __glutSetWindow(window);\r
-              window->motion(event.xmotion.x, event.xmotion.y);\r
-            }\r
-            /* If passive motion function registered _and_\r
-               buttons not held down, call passive motion\r
-               function...  */\r
-            else if (window->passive &&\r
-                ((event.xmotion.state &\r
-                    (Button1Mask | Button2Mask | Button3Mask)) ==\r
-                0)) {\r
-              __glutSetWindow(window);\r
-              window->passive(event.xmotion.x,\r
-                event.xmotion.y);\r
-            }\r
-          }\r
-        } else {\r
-          /* Motion events are thrown away when a pop up menu\r
-             is active. */\r
-        }\r
-        break;\r
-      case KeyPress:\r
-      case KeyRelease:\r
-        window = __glutGetWindow(event.xkey.window);\r
-        if (!window) {\r
-          break;\r
-        }\r
-       if (event.type == KeyPress) {\r
-         keyboard = window->keyboard;\r
-       } else {\r
-\r
-         /* If we are ignoring auto repeated keys for this window,\r
-            check if the next event in the X event queue is a KeyPress\r
-            for the exact same key (and at the exact same time) as the\r
-            key being released.  The X11 protocol will send auto\r
-            repeated keys as such KeyRelease/KeyPress pairs. */\r
-\r
-         if (window->ignoreKeyRepeat) {\r
-           if (XEventsQueued(__glutDisplay, QueuedAfterReading)) {\r
-             XPeekEvent(__glutDisplay, &ahead);\r
-             if (ahead.type == KeyPress\r
-               && ahead.xkey.window == event.xkey.window\r
-               && ahead.xkey.keycode == event.xkey.keycode\r
-               && ahead.xkey.time == event.xkey.time) {\r
-               /* Pop off the repeated KeyPress and ignore\r
-                  the auto repeated KeyRelease/KeyPress pair. */\r
-               XNextEvent(__glutDisplay, &event);\r
-               break;\r
-             }\r
-           }\r
-         }\r
-         keyboard = window->keyboardUp;\r
-       }\r
-        if (keyboard) {\r
-          char tmp[1];\r
-          int rc;\r
-\r
-          rc = XLookupString(&event.xkey, tmp, sizeof(tmp),\r
-            NULL, NULL);\r
-          if (rc) {\r
-            __glutSetWindow(window);\r
-            __glutModifierMask = event.xkey.state;\r
-            keyboard(tmp[0],\r
-              event.xkey.x, event.xkey.y);\r
-            __glutModifierMask = ~0;\r
-            break;\r
-          }\r
-        }\r
-       if (event.type == KeyPress) {\r
-         special = window->special;\r
-        } else {\r
-         special = window->specialUp;\r
-       }\r
-        if (special) {\r
-          KeySym ks;\r
-          int key;\r
-\r
-/* Introduced in X11R6:  (Partial list of) Keypad Functions.  Define\r
-   in place in case compiling against an older pre-X11R6\r
-   X11/keysymdef.h file. */\r
-#ifndef XK_KP_Home\r
-#define XK_KP_Home              0xFF95\r
-#endif\r
-#ifndef XK_KP_Left\r
-#define XK_KP_Left              0xFF96\r
-#endif\r
-#ifndef XK_KP_Up\r
-#define XK_KP_Up                0xFF97\r
-#endif\r
-#ifndef XK_KP_Right\r
-#define XK_KP_Right             0xFF98\r
-#endif\r
-#ifndef XK_KP_Down\r
-#define XK_KP_Down              0xFF99\r
-#endif\r
-#ifndef XK_KP_Prior\r
-#define XK_KP_Prior             0xFF9A\r
-#endif\r
-#ifndef XK_KP_Next\r
-#define XK_KP_Next              0xFF9B\r
-#endif\r
-#ifndef XK_KP_End\r
-#define XK_KP_End               0xFF9C\r
-#endif\r
-#ifndef XK_KP_Insert\r
-#define XK_KP_Insert            0xFF9E\r
-#endif\r
-#ifndef XK_KP_Delete\r
-#define XK_KP_Delete            0xFF9F\r
-#endif\r
-\r
-          ks = XLookupKeysym((XKeyEvent *) & event, 0);\r
-          /* XXX Verbose, but makes no assumptions about keysym\r
-             layout. */\r
-          switch (ks) {\r
-/* *INDENT-OFF* */\r
-          /* function keys */\r
-          case XK_F1:    key = GLUT_KEY_F1; break;\r
-          case XK_F2:    key = GLUT_KEY_F2; break;\r
-          case XK_F3:    key = GLUT_KEY_F3; break;\r
-          case XK_F4:    key = GLUT_KEY_F4; break;\r
-          case XK_F5:    key = GLUT_KEY_F5; break;\r
-          case XK_F6:    key = GLUT_KEY_F6; break;\r
-          case XK_F7:    key = GLUT_KEY_F7; break;\r
-          case XK_F8:    key = GLUT_KEY_F8; break;\r
-          case XK_F9:    key = GLUT_KEY_F9; break;\r
-          case XK_F10:   key = GLUT_KEY_F10; break;\r
-          case XK_F11:   key = GLUT_KEY_F11; break;\r
-          case XK_F12:   key = GLUT_KEY_F12; break;\r
-          /* directional keys */\r
-         case XK_KP_Left:\r
-          case XK_Left:  key = GLUT_KEY_LEFT; break;\r
-         case XK_KP_Up: /* Introduced in X11R6. */\r
-          case XK_Up:    key = GLUT_KEY_UP; break;\r
-         case XK_KP_Right: /* Introduced in X11R6. */\r
-          case XK_Right: key = GLUT_KEY_RIGHT; break;\r
-         case XK_KP_Down: /* Introduced in X11R6. */\r
-          case XK_Down:  key = GLUT_KEY_DOWN; break;\r
-/* *INDENT-ON* */\r
-\r
-         case XK_KP_Prior: /* Introduced in X11R6. */\r
-          case XK_Prior:\r
-            /* XK_Prior same as X11R6's XK_Page_Up */\r
-            key = GLUT_KEY_PAGE_UP;\r
-            break;\r
-         case XK_KP_Next: /* Introduced in X11R6. */\r
-          case XK_Next:\r
-            /* XK_Next same as X11R6's XK_Page_Down */\r
-            key = GLUT_KEY_PAGE_DOWN;\r
-            break;\r
-         case XK_KP_Home: /* Introduced in X11R6. */\r
-          case XK_Home:\r
-            key = GLUT_KEY_HOME;\r
-            break;\r
-#ifdef __hpux\r
-          case XK_Select:\r
-#endif\r
-         case XK_KP_End: /* Introduced in X11R6. */\r
-          case XK_End:\r
-            key = GLUT_KEY_END;\r
-            break;\r
-#ifdef __hpux\r
-          case XK_InsertChar:\r
-#endif\r
-         case XK_KP_Insert: /* Introduced in X11R6. */\r
-          case XK_Insert:\r
-            key = GLUT_KEY_INSERT;\r
-            break;\r
-#ifdef __hpux\r
-          case XK_DeleteChar:\r
-#endif\r
-         case XK_KP_Delete: /* Introduced in X11R6. */\r
-            /* The Delete character is really an ASCII key. */\r
-            __glutSetWindow(window);\r
-            keyboard(127,  /* ASCII Delete character. */\r
-              event.xkey.x, event.xkey.y);\r
-            goto skip;\r
-          default:\r
-            goto skip;\r
-          }\r
-          __glutSetWindow(window);\r
-          __glutModifierMask = event.xkey.state;\r
-          special(key, event.xkey.x, event.xkey.y);\r
-          __glutModifierMask = ~0;\r
-        skip:;\r
-        }\r
-        break;\r
-      case EnterNotify:\r
-      case LeaveNotify:\r
-        if (event.xcrossing.mode != NotifyNormal ||\r
-          event.xcrossing.detail == NotifyNonlinearVirtual ||\r
-          event.xcrossing.detail == NotifyVirtual) {\r
-\r
-          /* Careful to ignore Enter/LeaveNotify events that\r
-             come from the pop-up menu pointer grab and ungrab.\r
-             Also, ignore "virtual" Enter/LeaveNotify events\r
-             since they represent the pointer passing through\r
-             the window hierarchy without actually entering or\r
-             leaving the actual real estate of a window.  */\r
-\r
-          break;\r
-        }\r
-        if (__glutMappedMenu) {\r
-          GLUTmenuItem *item;\r
-          int num;\r
-\r
-          item = __glutGetMenuItem(__glutMappedMenu,\r
-            event.xcrossing.window, &num);\r
-          if (item) {\r
-            __glutMenuItemEnterOrLeave(item, num, event.type);\r
-            break;\r
-          }\r
-        }\r
-        window = __glutGetWindow(event.xcrossing.window);\r
-        if (window) {\r
-          if (window->entry) {\r
-            if (event.type == EnterNotify) {\r
-\r
-              /* With overlays established, X can report two\r
-                 enter events for both the overlay and normal\r
-                 plane window. Do not generate a second enter\r
-                 callback if we reported one without an\r
-                 intervening leave. */\r
-\r
-              if (window->entryState != EnterNotify) {\r
-                int num = window->num;\r
-                Window xid = window->win;\r
-\r
-                window->entryState = EnterNotify;\r
-                __glutSetWindow(window);\r
-                window->entry(GLUT_ENTERED);\r
-\r
-                if (__glutMappedMenu) {\r
-\r
-                  /* Do not generate any passive motion events\r
-                     when menus are in use. */\r
-\r
-                } else {\r
-\r
-                  /* An EnterNotify event can result in a\r
-                     "compound" callback if a passive motion\r
-                     callback is also registered. In this case,\r
-                     be a little paranoid about the possibility\r
-                     the window could have been destroyed in the\r
-                     entry callback. */\r
-\r
-                  window = __glutWindowList[num];\r
-                  if (window && window->passive && window->win == xid) {\r
-                    __glutSetWindow(window);\r
-                    window->passive(event.xcrossing.x, event.xcrossing.y);\r
-                  }\r
-                }\r
-              }\r
-            } else {\r
-              if (window->entryState != LeaveNotify) {\r
-\r
-                /* When an overlay is established for a window\r
-                   already mapped and with the pointer in it,\r
-                   the X server will generate a leave/enter\r
-                   event pair as the pointer leaves (without\r
-                   moving) from the normal plane X window to\r
-                   the newly mapped overlay  X window (or vice\r
-                   versa). This enter/leave pair should not be\r
-                   reported to the GLUT program since the pair\r
-                   is a consequence of creating (or destroying)\r
-                   the overlay, not an actual leave from the\r
-                   GLUT window. */\r
-\r
-                if (XEventsQueued(__glutDisplay, QueuedAfterReading)) {\r
-                  XPeekEvent(__glutDisplay, &ahead);\r
-                  if (ahead.type == EnterNotify &&\r
-                    __glutGetWindow(ahead.xcrossing.window) == window) {\r
-                    XNextEvent(__glutDisplay, &event);\r
-                    break;\r
-                  }\r
-                }\r
-                window->entryState = LeaveNotify;\r
-                __glutSetWindow(window);\r
-                window->entry(GLUT_LEFT);\r
-              }\r
-            }\r
-          } else if (window->passive) {\r
-            __glutSetWindow(window);\r
-            window->passive(event.xcrossing.x, event.xcrossing.y);\r
-          }\r
-        }\r
-        break;\r
-      case UnmapNotify:\r
-        /* MapNotify events are not needed to maintain\r
-           visibility state since VisibilityNotify events will\r
-           be delivered when a window becomes visible from\r
-           mapping.  However, VisibilityNotify events are not\r
-           delivered when a window is unmapped (for the window\r
-           or its children). */\r
-        window = __glutGetWindow(event.xunmap.window);\r
-        if (window) {\r
-          if (window->win != event.xconfigure.window) {\r
-            /* Ignore UnmapNotify sent to the overlay planes.\r
-               GLUT could get here because overlays select for\r
-               StructureNotify events to receive DestroyNotify.\r
-             */\r
-            break;\r
-          }\r
-          markWindowHidden(window);\r
-        }\r
-        break;\r
-      case VisibilityNotify:\r
-        window = __glutGetWindow(event.xvisibility.window);\r
-        if (window) {\r
-          /* VisibilityUnobscured+1 = GLUT_FULLY_RETAINED,\r
-             VisibilityPartiallyObscured+1 =\r
-             GLUT_PARTIALLY_RETAINED, VisibilityFullyObscured+1\r
-             =  GLUT_FULLY_COVERED. */\r
-          int visState = event.xvisibility.state + 1;\r
-\r
-          if (visState != window->visState) {\r
-            if (window->windowStatus) {\r
-              window->visState = visState;\r
-              __glutSetWindow(window);\r
-              window->windowStatus(visState);\r
-            }\r
-          }\r
-        }\r
-        break;\r
-      case ClientMessage:\r
-        if (event.xclient.data.l[0] == __glutWMDeleteWindow)\r
-          exit(0);\r
-        break;\r
-      case DestroyNotify:\r
-        purgeStaleWindow(event.xdestroywindow.window);\r
-        break;\r
-      case CirculateNotify:\r
-      case CreateNotify:\r
-      case GravityNotify:\r
-      case ReparentNotify:\r
-        /* Uninteresting to GLUT (but possible for GLUT to\r
-           receive). */\r
-        break;\r
-      default:\r
-        /* Pass events not directly handled by the GLUT main\r
-           event loop to any event parsers that have been\r
-           registered.  In this way, X Input extension events\r
-           are passed to the correct handler without forcing\r
-           all GLUT programs to support X Input event handling.\r
-         */\r
-        parser = eventParserList;\r
-        while (parser) {\r
-          if (parser->func(&event))\r
-            break;\r
-          parser = parser->next;\r
-        }\r
-        break;\r
-      }\r
-    }\r
-#endif /* _WIN32 */\r
-    if (__glutTimerList) {\r
-      handleTimeouts();\r
-    }\r
-  }\r
-  while (XPending(__glutDisplay));\r
-}\r
-\r
-static void\r
-waitForSomething(void)\r
-{\r
-#if defined(__vms) && ( __VMS_VER < 70000000 )\r
-  static struct timeval6 zerotime =\r
-  {0};\r
-  unsigned int timer_efn;\r
-#define timer_id 'glut' /* random :-) number */\r
-  unsigned int wait_mask;\r
-#else\r
-  static struct timeval zerotime =\r
-  {0, 0};\r
-#if defined(__OS2__)\r
-\r
-#elif !defined(_WIN32)\r
-  fd_set fds;\r
-#endif\r
-#endif\r
-#ifdef OLD_VMS\r
-   struct timeval6 now, timeout, waittime;\r
-#else\r
-   struct timeval now, timeout, waittime;\r
-#endif\r
-#if !defined(_WIN32)\r
-  int rc;\r
-#endif\r
-\r
-  /* Flush X protocol since XPending does not do this\r
-     implicitly. */\r
-  XFlush(__glutDisplay);\r
-  if (XPending(__glutDisplay)) {\r
-    /* It is possible (but quite rare) that XFlush may have\r
-       needed to wait for a writable X connection file\r
-       descriptor, and in the process, may have had to read off\r
-       X protocol from the file descriptor. If XPending is true,\r
-       this case occured and we should avoid waiting in select\r
-       since X protocol buffered within Xlib is due to be\r
-       processed and potentially no more X protocol is on the\r
-       file descriptor, so we would risk waiting improperly in\r
-       select. */\r
-    goto immediatelyHandleXinput;\r
-  }\r
-#if defined(__vms) && ( __VMS_VER < 70000000 )\r
-  timeout = __glutTimerList->timeout;\r
-  GETTIMEOFDAY(&now);\r
-  wait_mask = 1 << (__glutConnectionFD & 31);\r
-  if (IS_AFTER(now, timeout)) {\r
-    /* We need an event flag for the timer. */\r
-    /* XXX The `right' way to do this is to use LIB$GET_EF, but\r
-       since it needs to be in the same cluster as the EFN for\r
-       the display, we will have hack it. */\r
-    timer_efn = __glutConnectionFD - 1;\r
-    if ((timer_efn / 32) != (__glutConnectionFD / 32)) {\r
-      timer_efn = __glutConnectionFD + 1;\r
-    }\r
-    rc = SYS$CLREF(timer_efn);\r
-    rc = SYS$SETIMR(timer_efn, &timeout, NULL, timer_id, 0);\r
-    wait_mask |= 1 << (timer_efn & 31);\r
-  } else {\r
-    timer_efn = 0;\r
-  }\r
-  rc = SYS$WFLOR(__glutConnectionFD, wait_mask);\r
-  if (timer_efn != 0 && SYS$CLREF(timer_efn) == SS$_WASCLR) {\r
-    rc = SYS$CANTIM(timer_id, PSL$C_USER);\r
-  }\r
-  /* XXX There does not seem to be checking of "rc" in the code\r
-     above.  Can any of the SYS$ routines above fail? */\r
-#else /* not vms6.2 or lower */\r
-#if defined(__OS2__)\r
-\r
-#elif !defined(_WIN32)\r
-  FD_ZERO(&fds);\r
-  FD_SET(__glutConnectionFD, &fds);\r
-#endif\r
-  timeout = __glutTimerList->timeout;\r
-  GETTIMEOFDAY(&now);\r
-  if (IS_AFTER(now, timeout)) {\r
-    TIMEDELTA(waittime, timeout, now);\r
-  } else {\r
-    waittime = zerotime;\r
-  }\r
-\r
-#if defined(__OS2__)\r
-  DosSleep(0);\r
-#elif !defined(_WIN32)\r
-  rc = select(__glutConnectionFD + 1, &fds,\r
-    NULL, NULL, &waittime);\r
-  if (rc < 0 && errno != EINTR)\r
-    __glutFatalError("select error.");\r
-#else\r
-\r
-  MsgWaitForMultipleObjects(0, NULL, FALSE,\r
-    waittime.tv_sec*1000 + waittime.tv_usec/1000, QS_ALLINPUT);\r
-\r
-#endif\r
-#endif /* not vms6.2 or lower */\r
-  /* Without considering the cause of select unblocking, check\r
-     for pending X events and handle any timeouts (by calling\r
-     processEventsAndTimeouts).  We always look for X events\r
-     even if select returned with 0 (indicating a timeout);\r
-     otherwise we risk starving X event processing by continous\r
-     timeouts. */\r
-  if (XPending(__glutDisplay)) {\r
-  immediatelyHandleXinput:\r
-    processEventsAndTimeouts();\r
-  } else {\r
-    if (__glutTimerList)\r
-      handleTimeouts();\r
-  }\r
-}\r
-\r
-static void\r
-idleWait(void)\r
-{\r
-  if (XPending(__glutDisplay)) {\r
-    processEventsAndTimeouts();\r
-  } else {\r
-    if (__glutTimerList) {\r
-      handleTimeouts();\r
-    }\r
-  }\r
-  /* Make sure idle func still exists! */\r
-  if (__glutIdleFunc) {\r
-    __glutIdleFunc();\r
-  }\r
-}\r
-\r
-static GLUTwindow **beforeEnd;\r
-\r
-static GLUTwindow *\r
-processWindowWorkList(GLUTwindow * window)\r
-{\r
-  int workMask;\r
-\r
-  if (window->prevWorkWin) {\r
-    window->prevWorkWin = processWindowWorkList(window->prevWorkWin);\r
-  } else {\r
-    beforeEnd = &window->prevWorkWin;\r
-  }\r
-\r
-  /* Capture work mask for work that needs to be done to this\r
-     window, then clear the window's work mask (excepting the\r
-     dummy work bit, see below).  Then, process the captured\r
-     work mask.  This allows callbacks in the processing the\r
-     captured work mask to set the window's work mask for\r
-     subsequent processing. */\r
-\r
-  workMask = window->workMask;\r
-  assert((workMask & GLUT_DUMMY_WORK) == 0);\r
-\r
-  /* Set the dummy work bit, clearing all other bits, to\r
-     indicate that the window is currently on the window work\r
-     list _and_ that the window's work mask is currently being\r
-     processed.  This convinces __glutPutOnWorkList that this\r
-     window is on the work list still. */\r
-  window->workMask = GLUT_DUMMY_WORK;\r
-\r
-  /* Optimization: most of the time, the work to do is a\r
-     redisplay and not these other types of work.  Check for\r
-     the following cases as a group to before checking each one\r
-     individually one by one. This saves about 25 MIPS\r
-     instructions in the common redisplay only case. */\r
-  if (workMask & (GLUT_EVENT_MASK_WORK | GLUT_DEVICE_MASK_WORK |\r
-      GLUT_CONFIGURE_WORK | GLUT_COLORMAP_WORK | GLUT_MAP_WORK)) {\r
-\r
-#if !defined(_WIN32) && !defined(__OS2__)\r
-    /* Be sure to set event mask BEFORE map window is done. */\r
-    if (workMask & GLUT_EVENT_MASK_WORK) {\r
-      long eventMask;\r
-\r
-      /* Make sure children are not propogating events this\r
-         window is selecting for.  Be sure to do this before\r
-         enabling events on the children's parent. */\r
-      if (window->children) {\r
-        GLUTwindow *child = window->children;\r
-        unsigned long attribMask = CWDontPropagate;\r
-        XSetWindowAttributes wa;\r
-\r
-        wa.do_not_propagate_mask = window->eventMask & GLUT_DONT_PROPAGATE_FILTER_MASK;\r
-        if (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) {\r
-          wa.event_mask = child->eventMask | (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK);\r
-          attribMask |= CWEventMask;\r
-        }\r
-        do {\r
-          XChangeWindowAttributes(__glutDisplay, child->win,\r
-            attribMask, &wa);\r
-          child = child->siblings;\r
-        } while (child);\r
-      }\r
-      eventMask = window->eventMask;\r
-      if (window->parent && window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK)\r
-        eventMask |= (window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK);\r
-      XSelectInput(__glutDisplay, window->win, eventMask);\r
-      if (window->overlay)\r
-        XSelectInput(__glutDisplay, window->overlay->win,\r
-          window->eventMask & GLUT_OVERLAY_EVENT_FILTER_MASK);\r
-    }\r
-#endif /* !_WIN32 */\r
-    /* Be sure to set device mask BEFORE map window is done. */\r
-    if (workMask & GLUT_DEVICE_MASK_WORK) {\r
-      __glutUpdateInputDeviceMaskFunc(window);\r
-    }\r
-    /* Be sure to configure window BEFORE map window is done. */\r
-    if (workMask & GLUT_CONFIGURE_WORK) {\r
-#if defined(__OS2__)\r
-      RECTL changes;\r
-\r
-#elif defined(_WIN32)\r
-      RECT changes;\r
-      POINT point;\r
-      UINT flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER\r
-       | SWP_NOSENDCHANGING | SWP_NOSIZE | SWP_NOZORDER;\r
-\r
-      GetClientRect(window->win, &changes);\r
-\r
-      /* If this window is a toplevel window, translate the 0,0 client\r
-         coordinate into a screen coordinate for proper placement. */\r
-      if (!window->parent) {\r
-        point.x = 0;\r
-        point.y = 0;\r
-        ClientToScreen(window->win, &point);\r
-        changes.left = point.x;\r
-        changes.top = point.y;\r
-      }\r
-      if (window->desiredConfMask & (CWX | CWY)) {\r
-        changes.left = window->desiredX;\r
-        changes.top = window->desiredY;\r
-       flags &= ~SWP_NOMOVE;\r
-      }\r
-      if (window->desiredConfMask & (CWWidth | CWHeight)) {\r
-        changes.right = changes.left + window->desiredWidth;\r
-        changes.bottom = changes.top + window->desiredHeight;\r
-       flags &= ~SWP_NOSIZE;\r
-       /* XXX If overlay exists, resize the overlay here, ie.\r
-          if (window->overlay) ... */\r
-      }\r
-      if (window->desiredConfMask & CWStackMode) {\r
-       flags &= ~SWP_NOZORDER;\r
-       /* XXX Overlay support might require something special here. */\r
-      }\r
-\r
-      /* Adjust the window rectangle because Win32 thinks that the x, y,\r
-         width & height are the WHOLE window (including decorations),\r
-         whereas GLUT treats the x, y, width & height as only the CLIENT\r
-         area of the window.  Only do this to top level windows\r
-         that are not in game mode (since game mode windows do\r
-         not have any decorations). */\r
-      if (!window->parent && window != __glutGameModeWindow) {\r
-        AdjustWindowRect(&changes,\r
-          WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,\r
-          FALSE);\r
-      }\r
-\r
-      /* Do the repositioning, moving, and push/pop. */\r
-      SetWindowPos(window->win,\r
-        window->desiredStack == Above ? HWND_TOP : HWND_NOTOPMOST,\r
-        changes.left, changes.top,\r
-        changes.right - changes.left, changes.bottom - changes.top,\r
-        flags);\r
-\r
-      /* Zero out the mask. */\r
-      window->desiredConfMask = 0;\r
-\r
-      /* This hack causes the window to go back to the right position\r
-         when it is taken out of fullscreen mode. */\r
-      if (workMask & GLUT_FULL_SCREEN_WORK) {\r
-        window->desiredConfMask |= CWX | CWY;\r
-        window->desiredX = point.x;\r
-        window->desiredY = point.y;\r
-      }\r
-#else /* !_WIN32 */\r
-      XWindowChanges changes;\r
-\r
-      changes.x = window->desiredX;\r
-      changes.y = window->desiredY;\r
-      if (window->desiredConfMask & (CWWidth | CWHeight)) {\r
-        changes.width = window->desiredWidth;\r
-        changes.height = window->desiredHeight;\r
-        if (window->overlay)\r
-          XResizeWindow(__glutDisplay, window->overlay->win,\r
-            window->desiredWidth, window->desiredHeight);\r
-        if (__glutMotifHints != None) {\r
-          if (workMask & GLUT_FULL_SCREEN_WORK) {\r
-            MotifWmHints hints;\r
-\r
-            hints.flags = MWM_HINTS_DECORATIONS;\r
-            hints.decorations = 0;  /* Absolutely no\r
-                                       decorations. */\r
-            XChangeProperty(__glutDisplay, window->win,\r
-              __glutMotifHints, __glutMotifHints, 32,\r
-              PropModeReplace, (unsigned char *) &hints, 4);\r
-            if (workMask & GLUT_MAP_WORK) {\r
-              /* Handle case where glutFullScreen is called\r
-                 before the first time that the window is\r
-                 mapped. Some window managers will randomly or\r
-                 interactively position the window the first\r
-                 time it is mapped if the window's\r
-                 WM_NORMAL_HINTS property does not request an\r
-                 explicit position. We don't want any such\r
-                 window manager interaction when going\r
-                 fullscreen.  Overwrite the WM_NORMAL_HINTS\r
-                 property installed by glutCreateWindow's\r
-                 XSetWMProperties property with one explicitly\r
-                 requesting a fullscreen window. */\r
-              XSizeHints hints;\r
-\r
-              hints.flags = USPosition | USSize;\r
-              hints.x = 0;\r
-              hints.y = 0;\r
-              hints.width = window->desiredWidth;\r
-              hints.height = window->desiredHeight;\r
-              XSetWMNormalHints(__glutDisplay, window->win, &hints);\r
-            }\r
-          } else {\r
-            XDeleteProperty(__glutDisplay, window->win, __glutMotifHints);\r
-          }\r
-        }\r
-      }\r
-      if (window->desiredConfMask & CWStackMode) {\r
-        changes.stack_mode = window->desiredStack;\r
-        /* Do not let glutPushWindow push window beneath the\r
-           underlay. */\r
-        if (window->parent && window->parent->overlay\r
-          && window->desiredStack == Below) {\r
-          changes.stack_mode = Above;\r
-          changes.sibling = window->parent->overlay->win;\r
-          window->desiredConfMask |= CWSibling;\r
-        }\r
-      }\r
-      XConfigureWindow(__glutDisplay, window->win,\r
-        window->desiredConfMask, &changes);\r
-      window->desiredConfMask = 0;\r
-#endif\r
-    }\r
-#if !defined(_WIN32) && !defined(__OS2__)\r
-    /* Be sure to establish the colormaps BEFORE map window is\r
-       done. */\r
-    if (workMask & GLUT_COLORMAP_WORK) {\r
-      __glutEstablishColormapsProperty(window);\r
-    }\r
-#endif\r
-    if (workMask & GLUT_MAP_WORK) {\r
-      switch (window->desiredMapState) {\r
-      case WithdrawnState:\r
-        if (window->parent) {\r
-          XUnmapWindow(__glutDisplay, window->win);\r
-        } else {\r
-          XWithdrawWindow(__glutDisplay, window->win,\r
-            __glutScreen);\r
-        }\r
-        window->shownState = 0;\r
-        break;\r
-      case NormalState:\r
-        XMapWindow(__glutDisplay, window->win);\r
-        window->shownState = 1;\r
-        break;\r
-#ifdef _WIN32\r
-      case GameModeState:  /* Not an Xlib value. */\r
-        ShowWindow(window->win, SW_SHOW);\r
-        window->shownState = 1;\r
-        break;\r
-#endif\r
-      case IconicState:\r
-        XIconifyWindow(__glutDisplay, window->win, __glutScreen);\r
-        window->shownState = 0;\r
-        break;\r
-      }\r
-    }\r
-  }\r
-  if (workMask & (GLUT_REDISPLAY_WORK | GLUT_OVERLAY_REDISPLAY_WORK | GLUT_REPAIR_WORK | GLUT_OVERLAY_REPAIR_WORK)) {\r
-    if (window->forceReshape) {\r
-      /* Guarantee that before a display callback is generated\r
-         for a window, a reshape callback must be generated. */\r
-      __glutSetWindow(window);\r
-      window->reshape(window->width, window->height);\r
-      window->forceReshape = False;\r
-\r
-      /* Setting the redisplay bit on the first reshape is\r
-         necessary to make the "Mesa glXSwapBuffers to repair\r
-         damage" hack operate correctly.  Without indicating a\r
-         redisplay is necessary, there's not an initial back\r
-         buffer render from which to blit from when damage\r
-         happens to the window. */\r
-      workMask |= GLUT_REDISPLAY_WORK;\r
-    }\r
-    /* The code below is more involved than otherwise necessary\r
-       because it is paranoid about the overlay or entire window\r
-       being removed or destroyed in the course of the callbacks.\r
-       Notice how the global __glutWindowDamaged is used to record\r
-       the layers' damage status.  See the code in glutLayerGet for\r
-       how __glutWindowDamaged is used. The  point is to not have to\r
-       update the "damaged" field after  the callback since the\r
-       window (or overlay) may be destroyed (or removed) when the\r
-       callback returns. */\r
-\r
-    if (window->overlay && window->overlay->display) {\r
-      int num = window->num;\r
-      Window xid = window->overlay ? window->overlay->win : None;\r
-\r
-      /* If an overlay display callback is registered, we\r
-         differentiate between a redisplay needed for the\r
-         overlay and/or normal plane.  If there is no overlay\r
-         display callback registered, we simply use the\r
-         standard display callback. */\r
-\r
-      if (workMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) {\r
-        if (__glutMesaSwapHackSupport) {\r
-          if (window->usedSwapBuffers) {\r
-            if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) {\r
-             SWAP_BUFFERS_WINDOW(window);\r
-              goto skippedDisplayCallback1;\r
-            }\r
-          }\r
-        }\r
-        /* Render to normal plane. */\r
-#ifdef _WIN32\r
-        window->renderDc = window->hdc;\r
-#endif\r
-        window->renderWin = window->win;\r
-        window->renderCtx = window->ctx;\r
-        __glutWindowDamaged = (workMask & GLUT_REPAIR_WORK);\r
-        __glutSetWindow(window);\r
-        window->usedSwapBuffers = 0;\r
-        window->display();\r
-        __glutWindowDamaged = 0;\r
-\r
-      skippedDisplayCallback1:;\r
-      }\r
-      if (workMask & (GLUT_OVERLAY_REDISPLAY_WORK | GLUT_OVERLAY_REPAIR_WORK)) {\r
-        window = __glutWindowList[num];\r
-        if (window && window->overlay &&\r
-          window->overlay->win == xid && window->overlay->display) {\r
-\r
-          /* Render to overlay. */\r
-#ifdef _WIN32\r
-          window->renderDc = window->overlay->hdc;\r
-#endif\r
-          window->renderWin = window->overlay->win;\r
-          window->renderCtx = window->overlay->ctx;\r
-          __glutWindowDamaged = (workMask & GLUT_OVERLAY_REPAIR_WORK);\r
-          __glutSetWindow(window);\r
-          window->overlay->display();\r
-          __glutWindowDamaged = 0;\r
-        } else {\r
-          /* Overlay may have since been destroyed or the\r
-             overlay callback may have been disabled during\r
-             normal display callback. */\r
-        }\r
-      }\r
-    } else {\r
-      if (__glutMesaSwapHackSupport) {\r
-        if (!window->overlay && window->usedSwapBuffers) {\r
-          if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) {\r
-           SWAP_BUFFERS_WINDOW(window);\r
-            goto skippedDisplayCallback2;\r
-          }\r
-        }\r
-      }\r
-      /* Render to normal plane (and possibly overlay). */\r
-      __glutWindowDamaged = (workMask & (GLUT_OVERLAY_REPAIR_WORK | GLUT_REPAIR_WORK));\r
-      __glutSetWindow(window);\r
-      window->usedSwapBuffers = 0;\r
-      window->display();\r
-      __glutWindowDamaged = 0;\r
-\r
-    skippedDisplayCallback2:;\r
-    }\r
-  }\r
-  /* Combine workMask with window->workMask to determine what\r
-     finish and debug work there is. */\r
-  workMask |= window->workMask;\r
-\r
-  if (workMask & GLUT_FINISH_WORK) {\r
-    /* Finish work makes sure a glFinish gets done to indirect\r
-       rendering contexts.  Indirect contexts tend to have much\r
-       longer latency because lots of OpenGL extension requests\r
-       can queue up in the X protocol stream. __glutSetWindow\r
-       is where the finish works gets queued for indirect\r
-       contexts. */\r
-    __glutSetWindow(window);\r
-    glFinish();\r
-  }\r
-  if (workMask & GLUT_DEBUG_WORK) {\r
-    __glutSetWindow(window);\r
-    glutReportErrors();\r
-  }\r
-  /* Strip out dummy, finish, and debug work bits. */\r
-  window->workMask &= ~(GLUT_DUMMY_WORK | GLUT_FINISH_WORK | GLUT_DEBUG_WORK);\r
-  if (window->workMask) {\r
-    /* Leave on work list. */\r
-    return window;\r
-  } else {\r
-    /* Remove current window from work list. */\r
-    return window->prevWorkWin;\r
-  }\r
-}\r
-\r
-#ifndef _WIN32\r
-static  /* X11 implementations do not need this global. */\r
-#endif\r
-void\r
-__glutProcessWindowWorkLists(void)\r
-{\r
-  if (__glutWindowWorkList) {\r
-    GLUTwindow *remainder, *work;\r
-\r
-    work = __glutWindowWorkList;\r
-    __glutWindowWorkList = NULL;\r
-    if (work) {\r
-      remainder = processWindowWorkList(work);\r
-      if (remainder) {\r
-        *beforeEnd = __glutWindowWorkList;\r
-        __glutWindowWorkList = remainder;\r
-      }\r
-    }\r
-  }\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutMainLoop(void)\r
-{\r
-#if !defined(_WIN32)\r
-  if (!__glutDisplay)\r
-    __glutFatalUsage("main loop entered with out proper initialization.");\r
-#endif\r
-  if (!__glutWindowListSize)\r
-    __glutFatalUsage(\r
-      "main loop entered with no windows created.");\r
-  for (;;) {\r
-    __glutProcessWindowWorkLists();\r
-    if (__glutIdleFunc || __glutWindowWorkList) {\r
-      idleWait();\r
-    } else {\r
-      if (__glutTimerList) {\r
-        waitForSomething();\r
-      } else {\r
-        processEventsAndTimeouts();\r
-      }\r
-    }\r
-  }\r
-}\r
-/* ENDCENTRY */\r
+/* glut_event.c */
+/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1997, 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. */
+
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <string.h>  /* Some FD_ZERO macros use memset without
+                        prototyping memset. */
+
+/* Much of the following #ifdef logic to include the proper
+   prototypes for the select system call is based on logic
+   from the X11R6.3 version of <X11/Xpoll.h>. */
+
+#if !defined(_WIN32)
+# ifdef __sgi
+#  include <bstring.h>    /* prototype for bzero used by FD_ZERO */
+# endif
+# if (defined(SVR4) || defined(CRAY) || defined(AIXV3)) && !defined(FD_SETSIZE)
+#  include <sys/select.h> /* select system call interface */
+#  ifdef luna
+#   include <sysent.h>
+#  endif
+# endif
+  /* AIX 4.2 fubar-ed <sys/select.h>, so go to heroic measures to get it */
+# if defined(AIXV4) && !defined(NFDBITS)
+#  include <sys/select.h>
+# endif
+#endif /* !_WIN32 */
+
+#include <sys/types.h>
+
+#if defined(__OS2__)
+//??? Â­Â Ã¤Â¨Â£Â  ??     #   include <sys/time.h>
+#elif !defined(_WIN32)
+# if defined(__vms) && ( __VMS_VER < 70000000 )
+#  include <sys/time.h>
+# else
+#  ifndef __vms
+#   include <sys/time.h>
+#  endif
+# endif
+# include <unistd.h>
+# include <X11/Xlib.h>
+# include <X11/keysym.h>
+#else
+# ifdef __CYGWIN32__
+#  include <sys/time.h>
+# else
+#  include <sys/timeb.h>
+# endif
+# ifdef __hpux
+   /* XXX Bert Gijsbers <bert@mc.bio.uva.nl> reports that HP-UX
+      needs different keysyms for the End, Insert, and Delete keys
+      to work on an HP 715.  It would be better if HP generated
+      standard keysyms for standard keys. */
+#  include <X11/HPkeysym.h>
+# endif
+#endif /* !_WIN32 */
+
+#include "glutint.h"
+
+#if defined(__vms) && ( __VMS_VER < 70000000 )
+#include <ssdef.h>
+#include <psldef.h>
+extern int SYS$CLREF(int efn);
+extern int SYS$SETIMR(unsigned int efn, struct timeval6 *timeout, void *ast,
+  unsigned int request_id, unsigned int flags);
+extern int SYS$WFLOR(unsigned int efn, unsigned int mask);
+extern int SYS$CANTIM(unsigned int request_id, unsigned int mode);
+#endif /* __vms, VMs 6.2 or earlier */
+
+static GLUTtimer *freeTimerList = NULL;
+
+GLUTidleCB __glutIdleFunc = NULL;
+GLUTtimer *__glutTimerList = NULL;
+#ifdef SUPPORT_FORTRAN
+GLUTtimer *__glutNewTimer;
+#endif
+GLUTwindow *__glutWindowWorkList = NULL;
+GLUTmenu *__glutMappedMenu;
+GLUTmenu *__glutCurrentMenu = NULL;
+
+void (*__glutUpdateInputDeviceMaskFunc) (GLUTwindow *);
+#if !defined(_WIN32) && !defined(__OS2__)
+void (*__glutMenuItemEnterOrLeave)(GLUTmenuItem * item, int num, int type) = NULL;
+void (*__glutFinishMenu)(Window win, int x, int y);
+void (*__glutPaintMenu)(GLUTmenu * menu);
+void (*__glutStartMenu)(GLUTmenu * menu, GLUTwindow * window, int x, int y, int x_win, int y_win);
+GLUTmenu * (*__glutGetMenuByNum)(int menunum);
+GLUTmenuItem * (*__glutGetMenuItem)(GLUTmenu * menu, Window win, int *which);
+GLUTmenu * (*__glutGetMenu)(Window win);
+#endif
+
+Atom __glutMotifHints = None;
+/* Modifier mask of ~0 implies not in core input callback. */
+unsigned int __glutModifierMask = (unsigned int) ~0;
+int __glutWindowDamaged = 0;
+
+void GLUTAPIENTRY
+glutIdleFunc(GLUTidleCB idleFunc)
+{
+  __glutIdleFunc = idleFunc;
+}
+
+void GLUTAPIENTRY
+glutTimerFunc(unsigned int interval, GLUTtimerCB timerFunc, int value)
+{
+  GLUTtimer *timer, *other;
+  GLUTtimer **prevptr;
+#ifdef OLD_VMS
+   struct timeval6 now;
+#else
+   struct timeval now;
+#endif
+
+  if (!timerFunc)
+    return;
+
+  if (freeTimerList) {
+    timer = freeTimerList;
+    freeTimerList = timer->next;
+  } else {
+    timer = (GLUTtimer *) malloc(sizeof(GLUTtimer));
+    if (!timer)
+      __glutFatalError("out of memory.");
+  }
+
+  timer->func = timerFunc;
+#if defined(__vms) && ( __VMS_VER < 70000000 )
+  /* VMS time is expressed in units of 100 ns */
+  timer->timeout.val = interval * TICKS_PER_MILLISECOND;
+#else
+  timer->timeout.tv_sec = (int) interval / 1000;
+  timer->timeout.tv_usec = (int) (interval % 1000) * 1000;
+#endif
+  timer->value = value;
+  timer->next = NULL;
+  GETTIMEOFDAY(&now);
+  ADD_TIME(timer->timeout, timer->timeout, now);
+  prevptr = &__glutTimerList;
+  other = *prevptr;
+  while (other && IS_AFTER(other->timeout, timer->timeout)) {
+    prevptr = &other->next;
+    other = *prevptr;
+  }
+  timer->next = other;
+#ifdef SUPPORT_FORTRAN
+  __glutNewTimer = timer;  /* for Fortran binding! */
+#endif
+  *prevptr = timer;
+}
+
+void
+handleTimeouts(void)
+{
+#ifdef OLD_VMS
+   struct timeval6 now;
+#else
+   struct timeval now;
+#endif
+   GLUTtimer *timer;
+
+  /* Assumption is that __glutTimerList is already determined
+     to be non-NULL. */
+  GETTIMEOFDAY(&now);
+  while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) {
+    timer = __glutTimerList;
+    timer->func(timer->value);
+    __glutTimerList = timer->next;
+    timer->next = freeTimerList;
+    freeTimerList = timer;
+    if (!__glutTimerList)
+      break;
+  }
+}
+
+void
+__glutPutOnWorkList(GLUTwindow * window, int workMask)
+{
+  if (window->workMask) {
+    /* Already on list; just OR in new workMask. */
+    window->workMask |= workMask;
+  } else {
+    /* Update work mask and add to window work list. */
+    window->workMask = workMask;
+    /* Assert that if the window does not have a
+       workMask already, the window should definitely
+       not be the head of the work list. */
+    assert(window != __glutWindowWorkList);
+    window->prevWorkWin = __glutWindowWorkList;
+    __glutWindowWorkList = window;
+  }
+}
+
+void
+__glutPostRedisplay(GLUTwindow * window, int layerMask)
+{
+  int shown = (layerMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) ?
+    window->shownState : window->overlay->shownState;
+
+  /* Post a redisplay if the window is visible (or the
+     visibility of the window is unknown, ie. window->visState
+     == -1) _and_ the layer is known to be shown. */
+  if (window->visState != GLUT_HIDDEN
+    && window->visState != GLUT_FULLY_COVERED && shown) {
+    __glutPutOnWorkList(window, layerMask);
+  }
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutPostRedisplay(void)
+{
+  __glutPostRedisplay(__glutCurrentWindow, GLUT_REDISPLAY_WORK);
+}
+
+/* The advantage of this routine is that it saves the cost of a
+   glutSetWindow call (entailing an expensive OpenGL context switch),
+   particularly useful when multiple windows need redisplays posted at
+   the same times.  See also glutPostWindowOverlayRedisplay. */
+void GLUTAPIENTRY
+glutPostWindowRedisplay(int win)
+{
+  __glutPostRedisplay(__glutWindowList[win - 1], GLUT_REDISPLAY_WORK);
+}
+
+/* ENDCENTRY */
+static GLUTeventParser *eventParserList = NULL;
+
+/* __glutRegisterEventParser allows another module to register
+   to intercept X events types not otherwise acted on by the
+   GLUT processEventsAndTimeouts routine.  The X Input
+   extension support code uses an event parser for handling X
+   Input extension events.  */
+
+void
+__glutRegisterEventParser(GLUTeventParser * parser)
+{
+  parser->next = eventParserList;
+  eventParserList = parser;
+}
+
+static void
+markWindowHidden(GLUTwindow * window)
+{
+  if (GLUT_HIDDEN != window->visState) {
+    GLUTwindow *child;
+
+    if (window->windowStatus) {
+      window->visState = GLUT_HIDDEN;
+      __glutSetWindow(window);
+      window->windowStatus(GLUT_HIDDEN);
+    }
+    /* An unmap is only reported on a single window; its
+       descendents need to know they are no longer visible. */
+    child = window->children;
+    while (child) {
+      markWindowHidden(child);
+      child = child->siblings;
+    }
+  }
+}
+
+#if !defined(_WIN32) && !defined(__OS2__)
+
+static void
+purgeStaleWindow(Window win)
+{
+  GLUTstale **pEntry = &__glutStaleWindowList;
+  GLUTstale *entry = __glutStaleWindowList;
+
+  /* Tranverse singly-linked stale window list look for the
+     window ID. */
+  while (entry) {
+    if (entry->win == win) {
+      /* Found it; delete it. */
+      *pEntry = entry->next;
+      free(entry);
+      return;
+    } else {
+      pEntry = &entry->next;
+      entry = *pEntry;
+    }
+  }
+}
+
+/* Unlike XNextEvent, if a signal arrives,
+   interruptibleXNextEvent will return (with a zero return
+   value).  This helps GLUT drop out of XNextEvent if a signal
+   is delivered.  The intent is so that a GLUT program can call
+   glutIdleFunc in a signal handler to register an idle func
+   and then immediately get dropped into the idle func (after
+   returning from the signal handler).  The idea is to make
+   GLUT's main loop reliably interruptible by signals. */
+static int
+interruptibleXNextEvent(Display * dpy, XEvent * event)
+{
+  fd_set fds;
+  int rc;
+
+  /* Flush X protocol since XPending does not do this
+     implicitly. */
+  XFlush(__glutDisplay);
+  for (;;) {
+    if (XPending(__glutDisplay)) {
+      XNextEvent(dpy, event);
+      return 1;
+    }
+#ifndef VMS
+    /* the combination ConectionNumber-select is buggy on VMS. Sometimes it
+     * fails. This part of the code hangs the program on VMS7.2. But even
+     * without it the program seems to run correctly.
+     * Note that this is a bug in the VMS/DECWindows run-time-libraries.
+     * Compaq engeneering does not want or is not able to make a fix.
+     * (last sentence is a quotation from Compaq when I reported the
+     * problem January 2000) */
+    FD_ZERO(&fds);
+    FD_SET(__glutConnectionFD, &fds);
+    rc = select(__glutConnectionFD + 1, &fds, NULL, NULL, NULL);
+    if (rc < 0) {
+      if (errno == EINTR) {
+        return 0;
+      } else {
+        __glutFatalError("select error.");
+      }
+    }
+#endif
+  }
+}
+
+#endif
+
+static void
+processEventsAndTimeouts(void)
+{
+  do {
+#if defined(__OS2__)
+   QMSG  qmsg;   /* message from message queue     */
+   extern HAB   hab;      /* PM anchor block handle         */
+
+   if(! WinGetMsg( hab, &qmsg, 0UL, 0UL, 0UL ) )
+                 exit(0);
+    WinDispatchMsg( hab,     /* PM anchor block handle  */
+                    &qmsg ); /* pointer to message      */
+
+#elif defined(_WIN32)
+    MSG event;
+
+    if(!GetMessage(&event, NULL, 0, 0))        /* bail if no more messages */
+      exit(0);
+    TranslateMessage(&event);          /* translate virtual-key messages */
+    DispatchMessage(&event);           /* call the window proc */
+    /* see win32_event.c for event (message) processing procedures */
+#else
+    static int mappedMenuButton;
+    GLUTeventParser *parser;
+    XEvent event, ahead;
+    GLUTwindow *window;
+    GLUTkeyboardCB keyboard;
+    GLUTspecialCB special;
+    int gotEvent, width, height;
+
+    gotEvent = interruptibleXNextEvent(__glutDisplay, &event);
+    if (gotEvent) {
+      switch (event.type) {
+      case MappingNotify:
+        XRefreshKeyboardMapping((XMappingEvent *) & event);
+        break;
+      case ConfigureNotify:
+        window = __glutGetWindow(event.xconfigure.window);
+        if (window) {
+          if (window->win != event.xconfigure.window) {
+            /* Ignore ConfigureNotify sent to the overlay
+               planes. GLUT could get here because overlays
+               select for StructureNotify events to receive
+               DestroyNotify. */
+            break;
+          }
+          width = event.xconfigure.width;
+          height = event.xconfigure.height;
+          if (width != window->width || height != window->height) {
+            if (window->overlay) {
+              XResizeWindow(__glutDisplay, window->overlay->win, width, height);
+            }
+            window->width = width;
+            window->height = height;
+            __glutSetWindow(window);
+            /* Do not execute OpenGL out of sequence with
+               respect to the XResizeWindow request! */
+            glXWaitX();
+            window->reshape(width, height);
+            window->forceReshape = False;
+            /* A reshape should be considered like posting a
+               repair; this is necessary for the "Mesa
+               glXSwapBuffers to repair damage" hack to operate
+               correctly.  Without it, there's not an initial
+               back buffer render from which to blit from when
+               damage happens to the window. */
+            __glutPostRedisplay(window, GLUT_REPAIR_WORK);
+          }
+        }
+        break;
+      case Expose:
+        /* compress expose events */
+        while (XEventsQueued(__glutDisplay, QueuedAfterReading)
+          > 0) {
+          XPeekEvent(__glutDisplay, &ahead);
+          if (ahead.type != Expose ||
+            ahead.xexpose.window != event.xexpose.window) {
+            break;
+          }
+          XNextEvent(__glutDisplay, &event);
+        }
+        if (event.xexpose.count == 0) {
+          GLUTmenu *menu;
+
+          if (__glutMappedMenu &&
+            (menu = __glutGetMenu(event.xexpose.window))) {
+            __glutPaintMenu(menu);
+          } else {
+            window = __glutGetWindow(event.xexpose.window);
+            if (window) {
+              if (window->win == event.xexpose.window) {
+                __glutPostRedisplay(window, GLUT_REPAIR_WORK);
+              } else if (window->overlay && window->overlay->win == event.xexpose.window) {
+                __glutPostRedisplay(window, GLUT_OVERLAY_REPAIR_WORK);
+              }
+            }
+          }
+        } else {
+          /* there are more exposes to read; wait to redisplay */
+        }
+        break;
+      case ButtonPress:
+      case ButtonRelease:
+        if (__glutMappedMenu && event.type == ButtonRelease
+          && mappedMenuButton == event.xbutton.button) {
+          /* Menu is currently popped up and its button is
+             released. */
+          __glutFinishMenu(event.xbutton.window, event.xbutton.x, event.xbutton.y);
+        } else {
+          window = __glutGetWindow(event.xbutton.window);
+          if (window) {
+            GLUTmenu *menu;
+           int menuNum;
+
+            menuNum = window->menu[event.xbutton.button - 1];
+            /* Make sure that __glutGetMenuByNum is only called if there
+              really is a menu present. */
+            if ((menuNum > 0) && (menu = __glutGetMenuByNum(menuNum))) {
+              if (event.type == ButtonPress && !__glutMappedMenu) {
+                __glutStartMenu(menu, window,
+                  event.xbutton.x_root, event.xbutton.y_root,
+                  event.xbutton.x, event.xbutton.y);
+                mappedMenuButton = event.xbutton.button;
+              } else {
+                /* Ignore a release of a button with a menu
+                   attatched to it when no menu is popped up,
+                   or ignore a press when another menu is
+                   already popped up. */
+              }
+            } else if (window->mouse) {
+              __glutSetWindow(window);
+              __glutModifierMask = event.xbutton.state;
+              window->mouse(event.xbutton.button - 1,
+                event.type == ButtonRelease ?
+                GLUT_UP : GLUT_DOWN,
+                event.xbutton.x, event.xbutton.y);
+              __glutModifierMask = ~0;
+            } else {
+              /* Stray mouse events.  Ignore. */
+            }
+          } else {
+            /* Window might have been destroyed and all the
+               events for the window may not yet be received. */
+          }
+        }
+        break;
+      case MotionNotify:
+        if (!__glutMappedMenu) {
+          window = __glutGetWindow(event.xmotion.window);
+          if (window) {
+            /* If motion function registered _and_ buttons held
+               * down, call motion function...  */
+            if (window->motion && event.xmotion.state &
+              (Button1Mask | Button2Mask | Button3Mask)) {
+              __glutSetWindow(window);
+              window->motion(event.xmotion.x, event.xmotion.y);
+            }
+            /* If passive motion function registered _and_
+               buttons not held down, call passive motion
+               function...  */
+            else if (window->passive &&
+                ((event.xmotion.state &
+                    (Button1Mask | Button2Mask | Button3Mask)) ==
+                0)) {
+              __glutSetWindow(window);
+              window->passive(event.xmotion.x,
+                event.xmotion.y);
+            }
+          }
+        } else {
+          /* Motion events are thrown away when a pop up menu
+             is active. */
+        }
+        break;
+      case KeyPress:
+      case KeyRelease:
+        window = __glutGetWindow(event.xkey.window);
+        if (!window) {
+          break;
+        }
+       if (event.type == KeyPress) {
+         keyboard = window->keyboard;
+       } else {
+
+         /* If we are ignoring auto repeated keys for this window,
+            check if the next event in the X event queue is a KeyPress
+            for the exact same key (and at the exact same time) as the
+            key being released.  The X11 protocol will send auto
+            repeated keys as such KeyRelease/KeyPress pairs. */
+
+         if (window->ignoreKeyRepeat) {
+           if (XEventsQueued(__glutDisplay, QueuedAfterReading)) {
+             XPeekEvent(__glutDisplay, &ahead);
+             if (ahead.type == KeyPress
+               && ahead.xkey.window == event.xkey.window
+               && ahead.xkey.keycode == event.xkey.keycode
+               && ahead.xkey.time == event.xkey.time) {
+               /* Pop off the repeated KeyPress and ignore
+                  the auto repeated KeyRelease/KeyPress pair. */
+               XNextEvent(__glutDisplay, &event);
+               break;
+             }
+           }
+         }
+         keyboard = window->keyboardUp;
+       }
+        if (keyboard) {
+          char tmp[1];
+          int rc;
+
+          rc = XLookupString(&event.xkey, tmp, sizeof(tmp),
+            NULL, NULL);
+          if (rc) {
+            __glutSetWindow(window);
+            __glutModifierMask = event.xkey.state;
+            keyboard(tmp[0],
+              event.xkey.x, event.xkey.y);
+            __glutModifierMask = ~0;
+            break;
+          }
+        }
+       if (event.type == KeyPress) {
+         special = window->special;
+        } else {
+         special = window->specialUp;
+       }
+        if (special) {
+          KeySym ks;
+          int key;
+
+/* Introduced in X11R6:  (Partial list of) Keypad Functions.  Define
+   in place in case compiling against an older pre-X11R6
+   X11/keysymdef.h file. */
+#ifndef XK_KP_Home
+#define XK_KP_Home              0xFF95
+#endif
+#ifndef XK_KP_Left
+#define XK_KP_Left              0xFF96
+#endif
+#ifndef XK_KP_Up
+#define XK_KP_Up                0xFF97
+#endif
+#ifndef XK_KP_Right
+#define XK_KP_Right             0xFF98
+#endif
+#ifndef XK_KP_Down
+#define XK_KP_Down              0xFF99
+#endif
+#ifndef XK_KP_Prior
+#define XK_KP_Prior             0xFF9A
+#endif
+#ifndef XK_KP_Next
+#define XK_KP_Next              0xFF9B
+#endif
+#ifndef XK_KP_End
+#define XK_KP_End               0xFF9C
+#endif
+#ifndef XK_KP_Insert
+#define XK_KP_Insert            0xFF9E
+#endif
+#ifndef XK_KP_Delete
+#define XK_KP_Delete            0xFF9F
+#endif
+
+          ks = XLookupKeysym((XKeyEvent *) & event, 0);
+          /* XXX Verbose, but makes no assumptions about keysym
+             layout. */
+          switch (ks) {
+/* *INDENT-OFF* */
+          /* function keys */
+          case XK_F1:    key = GLUT_KEY_F1; break;
+          case XK_F2:    key = GLUT_KEY_F2; break;
+          case XK_F3:    key = GLUT_KEY_F3; break;
+          case XK_F4:    key = GLUT_KEY_F4; break;
+          case XK_F5:    key = GLUT_KEY_F5; break;
+          case XK_F6:    key = GLUT_KEY_F6; break;
+          case XK_F7:    key = GLUT_KEY_F7; break;
+          case XK_F8:    key = GLUT_KEY_F8; break;
+          case XK_F9:    key = GLUT_KEY_F9; break;
+          case XK_F10:   key = GLUT_KEY_F10; break;
+          case XK_F11:   key = GLUT_KEY_F11; break;
+          case XK_F12:   key = GLUT_KEY_F12; break;
+          /* directional keys */
+         case XK_KP_Left:
+          case XK_Left:  key = GLUT_KEY_LEFT; break;
+         case XK_KP_Up: /* Introduced in X11R6. */
+          case XK_Up:    key = GLUT_KEY_UP; break;
+         case XK_KP_Right: /* Introduced in X11R6. */
+          case XK_Right: key = GLUT_KEY_RIGHT; break;
+         case XK_KP_Down: /* Introduced in X11R6. */
+          case XK_Down:  key = GLUT_KEY_DOWN; break;
+/* *INDENT-ON* */
+
+         case XK_KP_Prior: /* Introduced in X11R6. */
+          case XK_Prior:
+            /* XK_Prior same as X11R6's XK_Page_Up */
+            key = GLUT_KEY_PAGE_UP;
+            break;
+         case XK_KP_Next: /* Introduced in X11R6. */
+          case XK_Next:
+            /* XK_Next same as X11R6's XK_Page_Down */
+            key = GLUT_KEY_PAGE_DOWN;
+            break;
+         case XK_KP_Home: /* Introduced in X11R6. */
+          case XK_Home:
+            key = GLUT_KEY_HOME;
+            break;
+#ifdef __hpux
+          case XK_Select:
+#endif
+         case XK_KP_End: /* Introduced in X11R6. */
+          case XK_End:
+            key = GLUT_KEY_END;
+            break;
+#ifdef __hpux
+          case XK_InsertChar:
+#endif
+         case XK_KP_Insert: /* Introduced in X11R6. */
+          case XK_Insert:
+            key = GLUT_KEY_INSERT;
+            break;
+#ifdef __hpux
+          case XK_DeleteChar:
+#endif
+         case XK_KP_Delete: /* Introduced in X11R6. */
+            /* The Delete character is really an ASCII key. */
+            __glutSetWindow(window);
+            keyboard(127,  /* ASCII Delete character. */
+              event.xkey.x, event.xkey.y);
+            goto skip;
+          default:
+            goto skip;
+          }
+          __glutSetWindow(window);
+          __glutModifierMask = event.xkey.state;
+          special(key, event.xkey.x, event.xkey.y);
+          __glutModifierMask = ~0;
+        skip:;
+        }
+        break;
+      case EnterNotify:
+      case LeaveNotify:
+        if (event.xcrossing.mode != NotifyNormal ||
+          event.xcrossing.detail == NotifyNonlinearVirtual ||
+          event.xcrossing.detail == NotifyVirtual) {
+
+          /* Careful to ignore Enter/LeaveNotify events that
+             come from the pop-up menu pointer grab and ungrab.
+             Also, ignore "virtual" Enter/LeaveNotify events
+             since they represent the pointer passing through
+             the window hierarchy without actually entering or
+             leaving the actual real estate of a window.  */
+
+          break;
+        }
+        if (__glutMappedMenu) {
+          GLUTmenuItem *item;
+          int num;
+
+          item = __glutGetMenuItem(__glutMappedMenu,
+            event.xcrossing.window, &num);
+          if (item) {
+            __glutMenuItemEnterOrLeave(item, num, event.type);
+            break;
+          }
+        }
+        window = __glutGetWindow(event.xcrossing.window);
+        if (window) {
+          if (window->entry) {
+            if (event.type == EnterNotify) {
+
+              /* With overlays established, X can report two
+                 enter events for both the overlay and normal
+                 plane window. Do not generate a second enter
+                 callback if we reported one without an
+                 intervening leave. */
+
+              if (window->entryState != EnterNotify) {
+                int num = window->num;
+                Window xid = window->win;
+
+                window->entryState = EnterNotify;
+                __glutSetWindow(window);
+                window->entry(GLUT_ENTERED);
+
+                if (__glutMappedMenu) {
+
+                  /* Do not generate any passive motion events
+                     when menus are in use. */
+
+                } else {
+
+                  /* An EnterNotify event can result in a
+                     "compound" callback if a passive motion
+                     callback is also registered. In this case,
+                     be a little paranoid about the possibility
+                     the window could have been destroyed in the
+                     entry callback. */
+
+                  window = __glutWindowList[num];
+                  if (window && window->passive && window->win == xid) {
+                    __glutSetWindow(window);
+                    window->passive(event.xcrossing.x, event.xcrossing.y);
+                  }
+                }
+              }
+            } else {
+              if (window->entryState != LeaveNotify) {
+
+                /* When an overlay is established for a window
+                   already mapped and with the pointer in it,
+                   the X server will generate a leave/enter
+                   event pair as the pointer leaves (without
+                   moving) from the normal plane X window to
+                   the newly mapped overlay  X window (or vice
+                   versa). This enter/leave pair should not be
+                   reported to the GLUT program since the pair
+                   is a consequence of creating (or destroying)
+                   the overlay, not an actual leave from the
+                   GLUT window. */
+
+                if (XEventsQueued(__glutDisplay, QueuedAfterReading)) {
+                  XPeekEvent(__glutDisplay, &ahead);
+                  if (ahead.type == EnterNotify &&
+                    __glutGetWindow(ahead.xcrossing.window) == window) {
+                    XNextEvent(__glutDisplay, &event);
+                    break;
+                  }
+                }
+                window->entryState = LeaveNotify;
+                __glutSetWindow(window);
+                window->entry(GLUT_LEFT);
+              }
+            }
+          } else if (window->passive) {
+            __glutSetWindow(window);
+            window->passive(event.xcrossing.x, event.xcrossing.y);
+          }
+        }
+        break;
+      case UnmapNotify:
+        /* MapNotify events are not needed to maintain
+           visibility state since VisibilityNotify events will
+           be delivered when a window becomes visible from
+           mapping.  However, VisibilityNotify events are not
+           delivered when a window is unmapped (for the window
+           or its children). */
+        window = __glutGetWindow(event.xunmap.window);
+        if (window) {
+          if (window->win != event.xconfigure.window) {
+            /* Ignore UnmapNotify sent to the overlay planes.
+               GLUT could get here because overlays select for
+               StructureNotify events to receive DestroyNotify.
+             */
+            break;
+          }
+          markWindowHidden(window);
+        }
+        break;
+      case VisibilityNotify:
+        window = __glutGetWindow(event.xvisibility.window);
+        if (window) {
+          /* VisibilityUnobscured+1 = GLUT_FULLY_RETAINED,
+             VisibilityPartiallyObscured+1 =
+             GLUT_PARTIALLY_RETAINED, VisibilityFullyObscured+1
+             =  GLUT_FULLY_COVERED. */
+          int visState = event.xvisibility.state + 1;
+
+          if (visState != window->visState) {
+            if (window->windowStatus) {
+              window->visState = visState;
+              __glutSetWindow(window);
+              window->windowStatus(visState);
+            }
+          }
+        }
+        break;
+      case ClientMessage:
+        if (event.xclient.data.l[0] == __glutWMDeleteWindow)
+          exit(0);
+        break;
+      case DestroyNotify:
+        purgeStaleWindow(event.xdestroywindow.window);
+        break;
+      case CirculateNotify:
+      case CreateNotify:
+      case GravityNotify:
+      case ReparentNotify:
+        /* Uninteresting to GLUT (but possible for GLUT to
+           receive). */
+        break;
+      default:
+        /* Pass events not directly handled by the GLUT main
+           event loop to any event parsers that have been
+           registered.  In this way, X Input extension events
+           are passed to the correct handler without forcing
+           all GLUT programs to support X Input event handling.
+         */
+        parser = eventParserList;
+        while (parser) {
+          if (parser->func(&event))
+            break;
+          parser = parser->next;
+        }
+        break;
+      }
+    }
+#endif /* _WIN32 */
+    if (__glutTimerList) {
+      handleTimeouts();
+    }
+  }
+  while (XPending(__glutDisplay));
+}
+
+static void
+waitForSomething(void)
+{
+#if defined(__vms) && ( __VMS_VER < 70000000 )
+  static struct timeval6 zerotime =
+  {0};
+  unsigned int timer_efn;
+#define timer_id 'glut' /* random :-) number */
+  unsigned int wait_mask;
+#else
+  static struct timeval zerotime =
+  {0, 0};
+#if defined(__OS2__)
+
+#elif !defined(_WIN32)
+  fd_set fds;
+#endif
+#endif
+#ifdef OLD_VMS
+   struct timeval6 now, timeout, waittime;
+#else
+   struct timeval now, timeout, waittime;
+#endif
+#if !defined(_WIN32)
+  int rc;
+#endif
+
+  /* Flush X protocol since XPending does not do this
+     implicitly. */
+  XFlush(__glutDisplay);
+  if (XPending(__glutDisplay)) {
+    /* It is possible (but quite rare) that XFlush may have
+       needed to wait for a writable X connection file
+       descriptor, and in the process, may have had to read off
+       X protocol from the file descriptor. If XPending is true,
+       this case occured and we should avoid waiting in select
+       since X protocol buffered within Xlib is due to be
+       processed and potentially no more X protocol is on the
+       file descriptor, so we would risk waiting improperly in
+       select. */
+    goto immediatelyHandleXinput;
+  }
+#if defined(__vms) && ( __VMS_VER < 70000000 )
+  timeout = __glutTimerList->timeout;
+  GETTIMEOFDAY(&now);
+  wait_mask = 1 << (__glutConnectionFD & 31);
+  if (IS_AFTER(now, timeout)) {
+    /* We need an event flag for the timer. */
+    /* XXX The `right' way to do this is to use LIB$GET_EF, but
+       since it needs to be in the same cluster as the EFN for
+       the display, we will have hack it. */
+    timer_efn = __glutConnectionFD - 1;
+    if ((timer_efn / 32) != (__glutConnectionFD / 32)) {
+      timer_efn = __glutConnectionFD + 1;
+    }
+    rc = SYS$CLREF(timer_efn);
+    rc = SYS$SETIMR(timer_efn, &timeout, NULL, timer_id, 0);
+    wait_mask |= 1 << (timer_efn & 31);
+  } else {
+    timer_efn = 0;
+  }
+  rc = SYS$WFLOR(__glutConnectionFD, wait_mask);
+  if (timer_efn != 0 && SYS$CLREF(timer_efn) == SS$_WASCLR) {
+    rc = SYS$CANTIM(timer_id, PSL$C_USER);
+  }
+  /* XXX There does not seem to be checking of "rc" in the code
+     above.  Can any of the SYS$ routines above fail? */
+#else /* not vms6.2 or lower */
+#if defined(__OS2__)
+
+#elif !defined(_WIN32)
+  FD_ZERO(&fds);
+  FD_SET(__glutConnectionFD, &fds);
+#endif
+  timeout = __glutTimerList->timeout;
+  GETTIMEOFDAY(&now);
+  if (IS_AFTER(now, timeout)) {
+    TIMEDELTA(waittime, timeout, now);
+  } else {
+    waittime = zerotime;
+  }
+
+#if defined(__OS2__)
+  DosSleep(0);
+#elif !defined(_WIN32)
+  rc = select(__glutConnectionFD + 1, &fds,
+    NULL, NULL, &waittime);
+  if (rc < 0 && errno != EINTR)
+    __glutFatalError("select error.");
+#else
+
+  MsgWaitForMultipleObjects(0, NULL, FALSE,
+    waittime.tv_sec*1000 + waittime.tv_usec/1000, QS_ALLINPUT);
+
+#endif
+#endif /* not vms6.2 or lower */
+  /* Without considering the cause of select unblocking, check
+     for pending X events and handle any timeouts (by calling
+     processEventsAndTimeouts).  We always look for X events
+     even if select returned with 0 (indicating a timeout);
+     otherwise we risk starving X event processing by continous
+     timeouts. */
+  if (XPending(__glutDisplay)) {
+  immediatelyHandleXinput:
+    processEventsAndTimeouts();
+  } else {
+    if (__glutTimerList)
+      handleTimeouts();
+  }
+}
+
+static void
+idleWait(void)
+{
+  if (XPending(__glutDisplay)) {
+    processEventsAndTimeouts();
+  } else {
+    if (__glutTimerList) {
+      handleTimeouts();
+    }
+  }
+  /* Make sure idle func still exists! */
+  if (__glutIdleFunc) {
+    __glutIdleFunc();
+  }
+}
+
+static GLUTwindow **beforeEnd;
+
+static GLUTwindow *
+processWindowWorkList(GLUTwindow * window)
+{
+  int workMask;
+
+  if (window->prevWorkWin) {
+    window->prevWorkWin = processWindowWorkList(window->prevWorkWin);
+  } else {
+    beforeEnd = &window->prevWorkWin;
+  }
+
+  /* Capture work mask for work that needs to be done to this
+     window, then clear the window's work mask (excepting the
+     dummy work bit, see below).  Then, process the captured
+     work mask.  This allows callbacks in the processing the
+     captured work mask to set the window's work mask for
+     subsequent processing. */
+
+  workMask = window->workMask;
+  assert((workMask & GLUT_DUMMY_WORK) == 0);
+
+  /* Set the dummy work bit, clearing all other bits, to
+     indicate that the window is currently on the window work
+     list _and_ that the window's work mask is currently being
+     processed.  This convinces __glutPutOnWorkList that this
+     window is on the work list still. */
+  window->workMask = GLUT_DUMMY_WORK;
+
+  /* Optimization: most of the time, the work to do is a
+     redisplay and not these other types of work.  Check for
+     the following cases as a group to before checking each one
+     individually one by one. This saves about 25 MIPS
+     instructions in the common redisplay only case. */
+  if (workMask & (GLUT_EVENT_MASK_WORK | GLUT_DEVICE_MASK_WORK |
+      GLUT_CONFIGURE_WORK | GLUT_COLORMAP_WORK | GLUT_MAP_WORK)) {
+
+#if !defined(_WIN32) && !defined(__OS2__)
+    /* Be sure to set event mask BEFORE map window is done. */
+    if (workMask & GLUT_EVENT_MASK_WORK) {
+      long eventMask;
+
+      /* Make sure children are not propogating events this
+         window is selecting for.  Be sure to do this before
+         enabling events on the children's parent. */
+      if (window->children) {
+        GLUTwindow *child = window->children;
+        unsigned long attribMask = CWDontPropagate;
+        XSetWindowAttributes wa;
+
+        wa.do_not_propagate_mask = window->eventMask & GLUT_DONT_PROPAGATE_FILTER_MASK;
+        if (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK) {
+          wa.event_mask = child->eventMask | (window->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK);
+          attribMask |= CWEventMask;
+        }
+        do {
+          XChangeWindowAttributes(__glutDisplay, child->win,
+            attribMask, &wa);
+          child = child->siblings;
+        } while (child);
+      }
+      eventMask = window->eventMask;
+      if (window->parent && window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK)
+        eventMask |= (window->parent->eventMask & GLUT_HACK_STOP_PROPAGATE_MASK);
+      XSelectInput(__glutDisplay, window->win, eventMask);
+      if (window->overlay)
+        XSelectInput(__glutDisplay, window->overlay->win,
+          window->eventMask & GLUT_OVERLAY_EVENT_FILTER_MASK);
+    }
+#endif /* !_WIN32 */
+    /* Be sure to set device mask BEFORE map window is done. */
+    if (workMask & GLUT_DEVICE_MASK_WORK) {
+      __glutUpdateInputDeviceMaskFunc(window);
+    }
+    /* Be sure to configure window BEFORE map window is done. */
+    if (workMask & GLUT_CONFIGURE_WORK) {
+#if defined(__OS2__)
+      RECTL changes;
+
+#elif defined(_WIN32)
+      RECT changes;
+      POINT point;
+      UINT flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER
+       | SWP_NOSENDCHANGING | SWP_NOSIZE | SWP_NOZORDER;
+
+      GetClientRect(window->win, &changes);
+
+      /* If this window is a toplevel window, translate the 0,0 client
+         coordinate into a screen coordinate for proper placement. */
+      if (!window->parent) {
+        point.x = 0;
+        point.y = 0;
+        ClientToScreen(window->win, &point);
+        changes.left = point.x;
+        changes.top = point.y;
+      }
+      if (window->desiredConfMask & (CWX | CWY)) {
+        changes.left = window->desiredX;
+        changes.top = window->desiredY;
+       flags &= ~SWP_NOMOVE;
+      }
+      if (window->desiredConfMask & (CWWidth | CWHeight)) {
+        changes.right = changes.left + window->desiredWidth;
+        changes.bottom = changes.top + window->desiredHeight;
+       flags &= ~SWP_NOSIZE;
+       /* XXX If overlay exists, resize the overlay here, ie.
+          if (window->overlay) ... */
+      }
+      if (window->desiredConfMask & CWStackMode) {
+       flags &= ~SWP_NOZORDER;
+       /* XXX Overlay support might require something special here. */
+      }
+
+      /* Adjust the window rectangle because Win32 thinks that the x, y,
+         width & height are the WHOLE window (including decorations),
+         whereas GLUT treats the x, y, width & height as only the CLIENT
+         area of the window.  Only do this to top level windows
+         that are not in game mode (since game mode windows do
+         not have any decorations). */
+      if (!window->parent && window != __glutGameModeWindow) {
+        AdjustWindowRect(&changes,
+          WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+          FALSE);
+      }
+
+      /* Do the repositioning, moving, and push/pop. */
+      SetWindowPos(window->win,
+        window->desiredStack == Above ? HWND_TOP : HWND_NOTOPMOST,
+        changes.left, changes.top,
+        changes.right - changes.left, changes.bottom - changes.top,
+        flags);
+
+      /* Zero out the mask. */
+      window->desiredConfMask = 0;
+
+      /* This hack causes the window to go back to the right position
+         when it is taken out of fullscreen mode. */
+      if (workMask & GLUT_FULL_SCREEN_WORK) {
+        window->desiredConfMask |= CWX | CWY;
+        window->desiredX = point.x;
+        window->desiredY = point.y;
+      }
+#else /* !_WIN32 */
+      XWindowChanges changes;
+
+      changes.x = window->desiredX;
+      changes.y = window->desiredY;
+      if (window->desiredConfMask & (CWWidth | CWHeight)) {
+        changes.width = window->desiredWidth;
+        changes.height = window->desiredHeight;
+        if (window->overlay)
+          XResizeWindow(__glutDisplay, window->overlay->win,
+            window->desiredWidth, window->desiredHeight);
+        if (__glutMotifHints != None) {
+          if (workMask & GLUT_FULL_SCREEN_WORK) {
+            MotifWmHints hints;
+
+            hints.flags = MWM_HINTS_DECORATIONS;
+            hints.decorations = 0;  /* Absolutely no
+                                       decorations. */
+            XChangeProperty(__glutDisplay, window->win,
+              __glutMotifHints, __glutMotifHints, 32,
+              PropModeReplace, (unsigned char *) &hints, 4);
+            if (workMask & GLUT_MAP_WORK) {
+              /* Handle case where glutFullScreen is called
+                 before the first time that the window is
+                 mapped. Some window managers will randomly or
+                 interactively position the window the first
+                 time it is mapped if the window's
+                 WM_NORMAL_HINTS property does not request an
+                 explicit position. We don't want any such
+                 window manager interaction when going
+                 fullscreen.  Overwrite the WM_NORMAL_HINTS
+                 property installed by glutCreateWindow's
+                 XSetWMProperties property with one explicitly
+                 requesting a fullscreen window. */
+              XSizeHints hints;
+
+              hints.flags = USPosition | USSize;
+              hints.x = 0;
+              hints.y = 0;
+              hints.width = window->desiredWidth;
+              hints.height = window->desiredHeight;
+              XSetWMNormalHints(__glutDisplay, window->win, &hints);
+            }
+          } else {
+            XDeleteProperty(__glutDisplay, window->win, __glutMotifHints);
+          }
+        }
+      }
+      if (window->desiredConfMask & CWStackMode) {
+        changes.stack_mode = window->desiredStack;
+        /* Do not let glutPushWindow push window beneath the
+           underlay. */
+        if (window->parent && window->parent->overlay
+          && window->desiredStack == Below) {
+          changes.stack_mode = Above;
+          changes.sibling = window->parent->overlay->win;
+          window->desiredConfMask |= CWSibling;
+        }
+      }
+      XConfigureWindow(__glutDisplay, window->win,
+        window->desiredConfMask, &changes);
+      window->desiredConfMask = 0;
+#endif
+    }
+#if !defined(_WIN32) && !defined(__OS2__)
+    /* Be sure to establish the colormaps BEFORE map window is
+       done. */
+    if (workMask & GLUT_COLORMAP_WORK) {
+      __glutEstablishColormapsProperty(window);
+    }
+#endif
+    if (workMask & GLUT_MAP_WORK) {
+      switch (window->desiredMapState) {
+      case WithdrawnState:
+        if (window->parent) {
+          XUnmapWindow(__glutDisplay, window->win);
+        } else {
+          XWithdrawWindow(__glutDisplay, window->win,
+            __glutScreen);
+        }
+        window->shownState = 0;
+        break;
+      case NormalState:
+        XMapWindow(__glutDisplay, window->win);
+        window->shownState = 1;
+        break;
+#ifdef _WIN32
+      case GameModeState:  /* Not an Xlib value. */
+        ShowWindow(window->win, SW_SHOW);
+        window->shownState = 1;
+        break;
+#endif
+      case IconicState:
+        XIconifyWindow(__glutDisplay, window->win, __glutScreen);
+        window->shownState = 0;
+        break;
+      }
+    }
+  }
+  if (workMask & (GLUT_REDISPLAY_WORK | GLUT_OVERLAY_REDISPLAY_WORK | GLUT_REPAIR_WORK | GLUT_OVERLAY_REPAIR_WORK)) {
+    if (window->forceReshape) {
+      /* Guarantee that before a display callback is generated
+         for a window, a reshape callback must be generated. */
+      __glutSetWindow(window);
+      window->reshape(window->width, window->height);
+      window->forceReshape = False;
+
+      /* Setting the redisplay bit on the first reshape is
+         necessary to make the "Mesa glXSwapBuffers to repair
+         damage" hack operate correctly.  Without indicating a
+         redisplay is necessary, there's not an initial back
+         buffer render from which to blit from when damage
+         happens to the window. */
+      workMask |= GLUT_REDISPLAY_WORK;
+    }
+    /* The code below is more involved than otherwise necessary
+       because it is paranoid about the overlay or entire window
+       being removed or destroyed in the course of the callbacks.
+       Notice how the global __glutWindowDamaged is used to record
+       the layers' damage status.  See the code in glutLayerGet for
+       how __glutWindowDamaged is used. The  point is to not have to
+       update the "damaged" field after  the callback since the
+       window (or overlay) may be destroyed (or removed) when the
+       callback returns. */
+
+    if (window->overlay && window->overlay->display) {
+      int num = window->num;
+      Window xid = window->overlay ? window->overlay->win : None;
+
+      /* If an overlay display callback is registered, we
+         differentiate between a redisplay needed for the
+         overlay and/or normal plane.  If there is no overlay
+         display callback registered, we simply use the
+         standard display callback. */
+
+      if (workMask & (GLUT_REDISPLAY_WORK | GLUT_REPAIR_WORK)) {
+        if (__glutMesaSwapHackSupport) {
+          if (window->usedSwapBuffers) {
+            if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) {
+             SWAP_BUFFERS_WINDOW(window);
+              goto skippedDisplayCallback1;
+            }
+          }
+        }
+        /* Render to normal plane. */
+#ifdef _WIN32
+        window->renderDc = window->hdc;
+#endif
+        window->renderWin = window->win;
+        window->renderCtx = window->ctx;
+        __glutWindowDamaged = (workMask & GLUT_REPAIR_WORK);
+        __glutSetWindow(window);
+        window->usedSwapBuffers = 0;
+        window->display();
+        __glutWindowDamaged = 0;
+
+      skippedDisplayCallback1:;
+      }
+      if (workMask & (GLUT_OVERLAY_REDISPLAY_WORK | GLUT_OVERLAY_REPAIR_WORK)) {
+        window = __glutWindowList[num];
+        if (window && window->overlay &&
+          window->overlay->win == xid && window->overlay->display) {
+
+          /* Render to overlay. */
+#ifdef _WIN32
+          window->renderDc = window->overlay->hdc;
+#endif
+          window->renderWin = window->overlay->win;
+          window->renderCtx = window->overlay->ctx;
+          __glutWindowDamaged = (workMask & GLUT_OVERLAY_REPAIR_WORK);
+          __glutSetWindow(window);
+          window->overlay->display();
+          __glutWindowDamaged = 0;
+        } else {
+          /* Overlay may have since been destroyed or the
+             overlay callback may have been disabled during
+             normal display callback. */
+        }
+      }
+    } else {
+      if (__glutMesaSwapHackSupport) {
+        if (!window->overlay && window->usedSwapBuffers) {
+          if ((workMask & (GLUT_REPAIR_WORK | GLUT_REDISPLAY_WORK)) == GLUT_REPAIR_WORK) {
+           SWAP_BUFFERS_WINDOW(window);
+            goto skippedDisplayCallback2;
+          }
+        }
+      }
+      /* Render to normal plane (and possibly overlay). */
+      __glutWindowDamaged = (workMask & (GLUT_OVERLAY_REPAIR_WORK | GLUT_REPAIR_WORK));
+      __glutSetWindow(window);
+      window->usedSwapBuffers = 0;
+      window->display();
+      __glutWindowDamaged = 0;
+
+    skippedDisplayCallback2:;
+    }
+  }
+  /* Combine workMask with window->workMask to determine what
+     finish and debug work there is. */
+  workMask |= window->workMask;
+
+  if (workMask & GLUT_FINISH_WORK) {
+    /* Finish work makes sure a glFinish gets done to indirect
+       rendering contexts.  Indirect contexts tend to have much
+       longer latency because lots of OpenGL extension requests
+       can queue up in the X protocol stream. __glutSetWindow
+       is where the finish works gets queued for indirect
+       contexts. */
+    __glutSetWindow(window);
+    glFinish();
+  }
+  if (workMask & GLUT_DEBUG_WORK) {
+    __glutSetWindow(window);
+    glutReportErrors();
+  }
+  /* Strip out dummy, finish, and debug work bits. */
+  window->workMask &= ~(GLUT_DUMMY_WORK | GLUT_FINISH_WORK | GLUT_DEBUG_WORK);
+  if (window->workMask) {
+    /* Leave on work list. */
+    return window;
+  } else {
+    /* Remove current window from work list. */
+    return window->prevWorkWin;
+  }
+}
+
+#ifndef _WIN32
+static  /* X11 implementations do not need this global. */
+#endif
+void
+__glutProcessWindowWorkLists(void)
+{
+  if (__glutWindowWorkList) {
+    GLUTwindow *remainder, *work;
+
+    work = __glutWindowWorkList;
+    __glutWindowWorkList = NULL;
+    if (work) {
+      remainder = processWindowWorkList(work);
+      if (remainder) {
+        *beforeEnd = __glutWindowWorkList;
+        __glutWindowWorkList = remainder;
+      }
+    }
+  }
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutMainLoop(void)
+{
+#if !defined(_WIN32)
+  if (!__glutDisplay)
+    __glutFatalUsage("main loop entered with out proper initialization.");
+#endif
+  if (!__glutWindowListSize)
+    __glutFatalUsage(
+      "main loop entered with no windows created.");
+  for (;;) {
+    __glutProcessWindowWorkLists();
+    if (__glutIdleFunc || __glutWindowWorkList) {
+      idleWait();
+    } else {
+      if (__glutTimerList) {
+        waitForSomething();
+      } else {
+        processEventsAndTimeouts();
+      }
+    }
+  }
+}
+/* ENDCENTRY */
index feb6fbfa20b85117ce1074c29692b9a2f13327c9..6617fd6edb5e171fca74d3496113fe1c0bff2dfe 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1997. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-#include <string.h>\r
-\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-int GLUTAPIENTRY\r
-glutExtensionSupported(const char *extension)\r
-{\r
-  static const GLubyte *extensions = NULL;\r
-  const GLubyte *start;\r
-  GLubyte *where, *terminator;\r
-\r
-  /* Extension names should not have spaces. */\r
-  where = (GLubyte *) strchr(extension, ' ');\r
-  if (where || *extension == '\0')\r
-    return 0;\r
-\r
-  if (!extensions) {\r
-    extensions = glGetString(GL_EXTENSIONS);\r
-  }\r
-  /* It takes a bit of care to be fool-proof about parsing the\r
-     OpenGL extensions string.  Don't be fooled by sub-strings,\r
-     etc. */\r
-  start = extensions;\r
-  for (;;) {\r
-    /* If your application crashes in the strstr routine below,\r
-       you are probably calling glutExtensionSupported without\r
-       having a current window.  Calling glGetString without\r
-       a current OpenGL context has unpredictable results.\r
-       Please fix your program. */\r
-    where = (GLubyte *) strstr((const char *) start, extension);\r
-    if (!where)\r
-      break;\r
-    terminator = where + strlen(extension);\r
-    if (where == start || *(where - 1) == ' ') {\r
-      if (*terminator == ' ' || *terminator == '\0') {\r
-        return 1;\r
-      }\r
-    }\r
-    start = terminator;\r
-  }\r
-  return 0;\r
-}\r
-\r
-\r
-struct name_address_pair {\r
-   const char *name;\r
-   const void *address;\r
-};\r
-\r
-static struct name_address_pair glut_functions[] = {\r
-   { "glutInit", (const void *) glutInit },\r
-   { "glutInitDisplayMode", (const void *) glutInitDisplayMode },\r
-   { "glutInitDisplayString", (const void *) glutInitDisplayString },\r
-   { "glutInitWindowPosition", (const void *) glutInitWindowPosition },\r
-   { "glutInitWindowSize", (const void *) glutInitWindowSize },\r
-   { "glutMainLoop", (const void *) glutMainLoop },\r
-   { "glutCreateWindow", (const void *) glutCreateWindow },\r
-   { "glutCreateSubWindow", (const void *) glutCreateSubWindow },\r
-   { "glutDestroyWindow", (const void *) glutDestroyWindow },\r
-   { "glutPostRedisplay", (const void *) glutPostRedisplay },\r
-   { "glutPostWindowRedisplay", (const void *) glutPostWindowRedisplay },\r
-   { "glutSwapBuffers", (const void *) glutSwapBuffers },\r
-   { "glutGetWindow", (const void *) glutGetWindow },\r
-   { "glutSetWindow", (const void *) glutSetWindow },\r
-   { "glutSetWindowTitle", (const void *) glutSetWindowTitle },\r
-   { "glutSetIconTitle", (const void *) glutSetIconTitle },\r
-   { "glutPositionWindow", (const void *) glutPositionWindow },\r
-   { "glutReshapeWindow", (const void *) glutReshapeWindow },\r
-   { "glutPopWindow", (const void *) glutPopWindow },\r
-   { "glutPushWindow", (const void *) glutPushWindow },\r
-   { "glutIconifyWindow", (const void *) glutIconifyWindow },\r
-   { "glutShowWindow", (const void *) glutShowWindow },\r
-   { "glutHideWindow", (const void *) glutHideWindow },\r
-   { "glutFullScreen", (const void *) glutFullScreen },\r
-   { "glutSetCursor", (const void *) glutSetCursor },\r
-   { "glutWarpPointer", (const void *) glutWarpPointer },\r
-   { "glutEstablishOverlay", (const void *) glutEstablishOverlay },\r
-   { "glutRemoveOverlay", (const void *) glutRemoveOverlay },\r
-   { "glutUseLayer", (const void *) glutUseLayer },\r
-   { "glutPostOverlayRedisplay", (const void *) glutPostOverlayRedisplay },\r
-   { "glutPostWindowOverlayRedisplay", (const void *) glutPostWindowOverlayRedisplay },\r
-   { "glutShowOverlay", (const void *) glutShowOverlay },\r
-   { "glutHideOverlay", (const void *) glutHideOverlay },\r
-   { "glutCreateMenu", (const void *) glutCreateMenu },\r
-   { "glutDestroyMenu", (const void *) glutDestroyMenu },\r
-   { "glutGetMenu", (const void *) glutGetMenu },\r
-   { "glutSetMenu", (const void *) glutSetMenu },\r
-   { "glutAddMenuEntry", (const void *) glutAddMenuEntry },\r
-   { "glutAddSubMenu", (const void *) glutAddSubMenu },\r
-   { "glutChangeToMenuEntry", (const void *) glutChangeToMenuEntry },\r
-   { "glutChangeToSubMenu", (const void *) glutChangeToSubMenu },\r
-   { "glutRemoveMenuItem", (const void *) glutRemoveMenuItem },\r
-   { "glutAttachMenu", (const void *) glutAttachMenu },\r
-   { "glutDetachMenu", (const void *) glutDetachMenu },\r
-   { "glutDisplayFunc", (const void *) glutDisplayFunc },\r
-   { "glutReshapeFunc", (const void *) glutReshapeFunc },\r
-   { "glutKeyboardFunc", (const void *) glutKeyboardFunc },\r
-   { "glutMouseFunc", (const void *) glutMouseFunc },\r
-   { "glutMotionFunc", (const void *) glutMotionFunc },\r
-   { "glutPassiveMotionFunc", (const void *) glutPassiveMotionFunc },\r
-   { "glutEntryFunc", (const void *) glutEntryFunc },\r
-   { "glutVisibilityFunc", (const void *) glutVisibilityFunc },\r
-   { "glutIdleFunc", (const void *) glutIdleFunc },\r
-   { "glutTimerFunc", (const void *) glutTimerFunc },\r
-   { "glutMenuStateFunc", (const void *) glutMenuStateFunc },\r
-   { "glutSpecialFunc", (const void *) glutSpecialFunc },\r
-   { "glutSpaceballMotionFunc", (const void *) glutSpaceballMotionFunc },\r
-   { "glutSpaceballRotateFunc", (const void *) glutSpaceballRotateFunc },\r
-   { "glutSpaceballButtonFunc", (const void *) glutSpaceballButtonFunc },\r
-   { "glutButtonBoxFunc", (const void *) glutButtonBoxFunc },\r
-   { "glutDialsFunc", (const void *) glutDialsFunc },\r
-   { "glutTabletMotionFunc", (const void *) glutTabletMotionFunc },\r
-   { "glutTabletButtonFunc", (const void *) glutTabletButtonFunc },\r
-   { "glutMenuStatusFunc", (const void *) glutMenuStatusFunc },\r
-   { "glutOverlayDisplayFunc", (const void *) glutOverlayDisplayFunc },\r
-   { "glutWindowStatusFunc", (const void *) glutWindowStatusFunc },\r
-   { "glutKeyboardUpFunc", (const void *) glutKeyboardUpFunc },\r
-   { "glutSpecialUpFunc", (const void *) glutSpecialUpFunc },\r
-   { "glutJoystickFunc", (const void *) glutJoystickFunc },\r
-   { "glutSetColor", (const void *) glutSetColor },\r
-   { "glutGetColor", (const void *) glutGetColor },\r
-   { "glutCopyColormap", (const void *) glutCopyColormap },\r
-   { "glutGet", (const void *) glutGet },\r
-   { "glutDeviceGet", (const void *) glutDeviceGet },\r
-   { "glutExtensionSupported", (const void *) glutExtensionSupported },\r
-   { "glutGetModifiers", (const void *) glutGetModifiers },\r
-   { "glutLayerGet", (const void *) glutLayerGet },\r
-   { "glutGetProcAddress", (const void *) glutGetProcAddress },\r
-   { "glutBitmapCharacter", (const void *) glutBitmapCharacter },\r
-   { "glutBitmapWidth", (const void *) glutBitmapWidth },\r
-   { "glutStrokeCharacter", (const void *) glutStrokeCharacter },\r
-   { "glutStrokeWidth", (const void *) glutStrokeWidth },\r
-   { "glutBitmapLength", (const void *) glutBitmapLength },\r
-   { "glutStrokeLength", (const void *) glutStrokeLength },\r
-   { "glutWireSphere", (const void *) glutWireSphere },\r
-   { "glutSolidSphere", (const void *) glutSolidSphere },\r
-   { "glutWireCone", (const void *) glutWireCone },\r
-   { "glutSolidCone", (const void *) glutSolidCone },\r
-   { "glutWireCube", (const void *) glutWireCube },\r
-   { "glutSolidCube", (const void *) glutSolidCube },\r
-   { "glutWireTorus", (const void *) glutWireTorus },\r
-   { "glutSolidTorus", (const void *) glutSolidTorus },\r
-   { "glutWireDodecahedron", (const void *) glutWireDodecahedron },\r
-   { "glutSolidDodecahedron", (const void *) glutSolidDodecahedron },\r
-   { "glutWireTeapot", (const void *) glutWireTeapot },\r
-   { "glutSolidTeapot", (const void *) glutSolidTeapot },\r
-   { "glutWireOctahedron", (const void *) glutWireOctahedron },\r
-   { "glutSolidOctahedron", (const void *) glutSolidOctahedron },\r
-   { "glutWireTetrahedron", (const void *) glutWireTetrahedron },\r
-   { "glutSolidTetrahedron", (const void *) glutSolidTetrahedron },\r
-   { "glutWireIcosahedron", (const void *) glutWireIcosahedron },\r
-   { "glutSolidIcosahedron", (const void *) glutSolidIcosahedron },\r
-   { "glutVideoResizeGet", (const void *) glutVideoResizeGet },\r
-   { "glutSetupVideoResizing", (const void *) glutSetupVideoResizing },\r
-   { "glutStopVideoResizing", (const void *) glutStopVideoResizing },\r
-   { "glutVideoResize", (const void *) glutVideoResize },\r
-   { "glutVideoPan", (const void *) glutVideoPan },\r
-   { "glutReportErrors", (const void *) glutReportErrors },\r
-   { "glutIgnoreKeyRepeat", (const void *) glutIgnoreKeyRepeat },\r
-   { "glutSetKeyRepeat", (const void *) glutSetKeyRepeat },\r
-   { "glutForceJoystickFunc", (const void *) glutForceJoystickFunc },\r
-   { "glutGameModeString", (const void *) glutGameModeString },\r
-   { "glutEnterGameMode", (const void *) glutEnterGameMode },\r
-   { "glutLeaveGameMode", (const void *) glutLeaveGameMode },\r
-   { "glutGameModeGet", (const void *) glutGameModeGet },\r
-   { NULL, NULL }\r
-};\r
-\r
-\r
-/* XXX This isn't an official GLUT function, yet */\r
-void * GLUTAPIENTRY\r
-glutGetProcAddress(const char *procName)\r
-{\r
-   /* Try GLUT functions first */\r
-   int i;\r
-   for (i = 0; glut_functions[i].name; i++) {\r
-      if (strcmp(glut_functions[i].name, procName) == 0)\r
-         return (void *) glut_functions[i].address;\r
-   }\r
-\r
-   /* Try core GL functions */\r
-#if defined(_WIN32)\r
-  return (void *) wglGetProcAddress((LPCSTR) procName);\r
-\r
-#elif  defined(__OS2PM__)\r
-  return (void *) wglGetProcAddress((char *) procName);\r
-#elif defined(GLX_ARB_get_proc_address)\r
-  return (void *) glXGetProcAddressARB((const GLubyte *) procName);\r
-#else\r
-  return NULL;\r
-#endif\r
-}\r
-\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
+
+/* 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. */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "glutint.h"
+
+/* CENTRY */
+int GLUTAPIENTRY
+glutExtensionSupported(const char *extension)
+{
+  static const GLubyte *extensions = NULL;
+  const GLubyte *start;
+  GLubyte *where, *terminator;
+
+  /* Extension names should not have spaces. */
+  where = (GLubyte *) strchr(extension, ' ');
+  if (where || *extension == '\0')
+    return 0;
+
+  if (!extensions) {
+    extensions = glGetString(GL_EXTENSIONS);
+  }
+  /* It takes a bit of care to be fool-proof about parsing the
+     OpenGL extensions string.  Don't be fooled by sub-strings,
+     etc. */
+  start = extensions;
+  for (;;) {
+    /* If your application crashes in the strstr routine below,
+       you are probably calling glutExtensionSupported without
+       having a current window.  Calling glGetString without
+       a current OpenGL context has unpredictable results.
+       Please fix your program. */
+    where = (GLubyte *) strstr((const char *) start, extension);
+    if (!where)
+      break;
+    terminator = where + strlen(extension);
+    if (where == start || *(where - 1) == ' ') {
+      if (*terminator == ' ' || *terminator == '\0') {
+        return 1;
+      }
+    }
+    start = terminator;
+  }
+  return 0;
+}
+
+
+struct name_address_pair {
+   const char *name;
+   const void *address;
+};
+
+static struct name_address_pair glut_functions[] = {
+   { "glutInit", (const void *) glutInit },
+   { "glutInitDisplayMode", (const void *) glutInitDisplayMode },
+   { "glutInitDisplayString", (const void *) glutInitDisplayString },
+   { "glutInitWindowPosition", (const void *) glutInitWindowPosition },
+   { "glutInitWindowSize", (const void *) glutInitWindowSize },
+   { "glutMainLoop", (const void *) glutMainLoop },
+   { "glutCreateWindow", (const void *) glutCreateWindow },
+   { "glutCreateSubWindow", (const void *) glutCreateSubWindow },
+   { "glutDestroyWindow", (const void *) glutDestroyWindow },
+   { "glutPostRedisplay", (const void *) glutPostRedisplay },
+   { "glutPostWindowRedisplay", (const void *) glutPostWindowRedisplay },
+   { "glutSwapBuffers", (const void *) glutSwapBuffers },
+   { "glutGetWindow", (const void *) glutGetWindow },
+   { "glutSetWindow", (const void *) glutSetWindow },
+   { "glutSetWindowTitle", (const void *) glutSetWindowTitle },
+   { "glutSetIconTitle", (const void *) glutSetIconTitle },
+   { "glutPositionWindow", (const void *) glutPositionWindow },
+   { "glutReshapeWindow", (const void *) glutReshapeWindow },
+   { "glutPopWindow", (const void *) glutPopWindow },
+   { "glutPushWindow", (const void *) glutPushWindow },
+   { "glutIconifyWindow", (const void *) glutIconifyWindow },
+   { "glutShowWindow", (const void *) glutShowWindow },
+   { "glutHideWindow", (const void *) glutHideWindow },
+   { "glutFullScreen", (const void *) glutFullScreen },
+   { "glutSetCursor", (const void *) glutSetCursor },
+   { "glutWarpPointer", (const void *) glutWarpPointer },
+   { "glutEstablishOverlay", (const void *) glutEstablishOverlay },
+   { "glutRemoveOverlay", (const void *) glutRemoveOverlay },
+   { "glutUseLayer", (const void *) glutUseLayer },
+   { "glutPostOverlayRedisplay", (const void *) glutPostOverlayRedisplay },
+   { "glutPostWindowOverlayRedisplay", (const void *) glutPostWindowOverlayRedisplay },
+   { "glutShowOverlay", (const void *) glutShowOverlay },
+   { "glutHideOverlay", (const void *) glutHideOverlay },
+   { "glutCreateMenu", (const void *) glutCreateMenu },
+   { "glutDestroyMenu", (const void *) glutDestroyMenu },
+   { "glutGetMenu", (const void *) glutGetMenu },
+   { "glutSetMenu", (const void *) glutSetMenu },
+   { "glutAddMenuEntry", (const void *) glutAddMenuEntry },
+   { "glutAddSubMenu", (const void *) glutAddSubMenu },
+   { "glutChangeToMenuEntry", (const void *) glutChangeToMenuEntry },
+   { "glutChangeToSubMenu", (const void *) glutChangeToSubMenu },
+   { "glutRemoveMenuItem", (const void *) glutRemoveMenuItem },
+   { "glutAttachMenu", (const void *) glutAttachMenu },
+   { "glutDetachMenu", (const void *) glutDetachMenu },
+   { "glutDisplayFunc", (const void *) glutDisplayFunc },
+   { "glutReshapeFunc", (const void *) glutReshapeFunc },
+   { "glutKeyboardFunc", (const void *) glutKeyboardFunc },
+   { "glutMouseFunc", (const void *) glutMouseFunc },
+   { "glutMotionFunc", (const void *) glutMotionFunc },
+   { "glutPassiveMotionFunc", (const void *) glutPassiveMotionFunc },
+   { "glutEntryFunc", (const void *) glutEntryFunc },
+   { "glutVisibilityFunc", (const void *) glutVisibilityFunc },
+   { "glutIdleFunc", (const void *) glutIdleFunc },
+   { "glutTimerFunc", (const void *) glutTimerFunc },
+   { "glutMenuStateFunc", (const void *) glutMenuStateFunc },
+   { "glutSpecialFunc", (const void *) glutSpecialFunc },
+   { "glutSpaceballMotionFunc", (const void *) glutSpaceballMotionFunc },
+   { "glutSpaceballRotateFunc", (const void *) glutSpaceballRotateFunc },
+   { "glutSpaceballButtonFunc", (const void *) glutSpaceballButtonFunc },
+   { "glutButtonBoxFunc", (const void *) glutButtonBoxFunc },
+   { "glutDialsFunc", (const void *) glutDialsFunc },
+   { "glutTabletMotionFunc", (const void *) glutTabletMotionFunc },
+   { "glutTabletButtonFunc", (const void *) glutTabletButtonFunc },
+   { "glutMenuStatusFunc", (const void *) glutMenuStatusFunc },
+   { "glutOverlayDisplayFunc", (const void *) glutOverlayDisplayFunc },
+   { "glutWindowStatusFunc", (const void *) glutWindowStatusFunc },
+   { "glutKeyboardUpFunc", (const void *) glutKeyboardUpFunc },
+   { "glutSpecialUpFunc", (const void *) glutSpecialUpFunc },
+   { "glutJoystickFunc", (const void *) glutJoystickFunc },
+   { "glutSetColor", (const void *) glutSetColor },
+   { "glutGetColor", (const void *) glutGetColor },
+   { "glutCopyColormap", (const void *) glutCopyColormap },
+   { "glutGet", (const void *) glutGet },
+   { "glutDeviceGet", (const void *) glutDeviceGet },
+   { "glutExtensionSupported", (const void *) glutExtensionSupported },
+   { "glutGetModifiers", (const void *) glutGetModifiers },
+   { "glutLayerGet", (const void *) glutLayerGet },
+   { "glutGetProcAddress", (const void *) glutGetProcAddress },
+   { "glutBitmapCharacter", (const void *) glutBitmapCharacter },
+   { "glutBitmapWidth", (const void *) glutBitmapWidth },
+   { "glutStrokeCharacter", (const void *) glutStrokeCharacter },
+   { "glutStrokeWidth", (const void *) glutStrokeWidth },
+   { "glutBitmapLength", (const void *) glutBitmapLength },
+   { "glutStrokeLength", (const void *) glutStrokeLength },
+   { "glutWireSphere", (const void *) glutWireSphere },
+   { "glutSolidSphere", (const void *) glutSolidSphere },
+   { "glutWireCone", (const void *) glutWireCone },
+   { "glutSolidCone", (const void *) glutSolidCone },
+   { "glutWireCube", (const void *) glutWireCube },
+   { "glutSolidCube", (const void *) glutSolidCube },
+   { "glutWireTorus", (const void *) glutWireTorus },
+   { "glutSolidTorus", (const void *) glutSolidTorus },
+   { "glutWireDodecahedron", (const void *) glutWireDodecahedron },
+   { "glutSolidDodecahedron", (const void *) glutSolidDodecahedron },
+   { "glutWireTeapot", (const void *) glutWireTeapot },
+   { "glutSolidTeapot", (const void *) glutSolidTeapot },
+   { "glutWireOctahedron", (const void *) glutWireOctahedron },
+   { "glutSolidOctahedron", (const void *) glutSolidOctahedron },
+   { "glutWireTetrahedron", (const void *) glutWireTetrahedron },
+   { "glutSolidTetrahedron", (const void *) glutSolidTetrahedron },
+   { "glutWireIcosahedron", (const void *) glutWireIcosahedron },
+   { "glutSolidIcosahedron", (const void *) glutSolidIcosahedron },
+   { "glutVideoResizeGet", (const void *) glutVideoResizeGet },
+   { "glutSetupVideoResizing", (const void *) glutSetupVideoResizing },
+   { "glutStopVideoResizing", (const void *) glutStopVideoResizing },
+   { "glutVideoResize", (const void *) glutVideoResize },
+   { "glutVideoPan", (const void *) glutVideoPan },
+   { "glutReportErrors", (const void *) glutReportErrors },
+   { "glutIgnoreKeyRepeat", (const void *) glutIgnoreKeyRepeat },
+   { "glutSetKeyRepeat", (const void *) glutSetKeyRepeat },
+   { "glutForceJoystickFunc", (const void *) glutForceJoystickFunc },
+   { "glutGameModeString", (const void *) glutGameModeString },
+   { "glutEnterGameMode", (const void *) glutEnterGameMode },
+   { "glutLeaveGameMode", (const void *) glutLeaveGameMode },
+   { "glutGameModeGet", (const void *) glutGameModeGet },
+   { NULL, NULL }
+};
+
+
+/* XXX This isn't an official GLUT function, yet */
+void * GLUTAPIENTRY
+glutGetProcAddress(const char *procName)
+{
+   /* Try GLUT functions first */
+   int i;
+   for (i = 0; glut_functions[i].name; i++) {
+      if (strcmp(glut_functions[i].name, procName) == 0)
+         return (void *) glut_functions[i].address;
+   }
+
+   /* Try core GL functions */
+#if defined(_WIN32)
+  return (void *) wglGetProcAddress((LPCSTR) procName);
+
+#elif  defined(__OS2PM__)
+  return (void *) wglGetProcAddress((char *) procName);
+#elif defined(GLX_ARB_get_proc_address)
+  return (void *) glXGetProcAddressARB((const GLubyte *) procName);
+#else
+  return NULL;
+#endif
+}
+
+
+/* ENDCENTRY */
index d6efb68b3a5c75903d00381af607f50edd6d5a9d..584aba4fd8b98d6e66144babb88b5df5e138ee00 100644 (file)
@@ -1,38 +1,38 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1995, 1998. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <assert.h>\r
-\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutFullScreen(void)\r
-{\r
-  assert(!__glutCurrentWindow->parent);\r
-  IGNORE_IN_GAME_MODE();\r
-#if !defined(_WIN32) && !defined(__OS2PM__)\r
-  if (__glutMotifHints == None) {\r
-    __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS",\r
-      SGI_XA__MOTIF_WM_HINTS, 0);\r
-    if (__glutMotifHints == None) {\r
-      __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS.");\r
-    }\r
-  }\r
-#endif\r
-\r
-  __glutCurrentWindow->desiredX = 0;\r
-  __glutCurrentWindow->desiredY = 0;\r
-  __glutCurrentWindow->desiredWidth = __glutScreenWidth;\r
-  __glutCurrentWindow->desiredHeight = __glutScreenHeight;\r
-  __glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight;\r
-\r
-  __glutPutOnWorkList(__glutCurrentWindow,\r
-    GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK);\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1995, 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. */
+
+#include <assert.h>
+
+#include "glutint.h"
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutFullScreen(void)
+{
+  assert(!__glutCurrentWindow->parent);
+  IGNORE_IN_GAME_MODE();
+#if !defined(_WIN32) && !defined(__OS2PM__)
+  if (__glutMotifHints == None) {
+    __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS",
+      SGI_XA__MOTIF_WM_HINTS, 0);
+    if (__glutMotifHints == None) {
+      __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS.");
+    }
+  }
+#endif
+
+  __glutCurrentWindow->desiredX = 0;
+  __glutCurrentWindow->desiredY = 0;
+  __glutCurrentWindow->desiredWidth = __glutScreenWidth;
+  __glutCurrentWindow->desiredHeight = __glutScreenHeight;
+  __glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight;
+
+  __glutPutOnWorkList(__glutCurrentWindow,
+    GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK);
+}
+
+/* ENDCENTRY */
index c846f48658229d1040d2bcf05f919fd76f50c747..8921e9ab033b85b6f436e5716b5ce79f2fce949b 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <assert.h>\r
-#include <stdlib.h>  /* SunOS 4 needs NULL defined for GETTIMEOFDAY macro. */\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-int GLUTAPIENTRY\r
-glutGet(GLenum param)\r
-{\r
-  Window win, root;\r
-  int x, y, value;\r
-  unsigned int width, height, border, depth;\r
-\r
-  switch (param) {\r
-  case GLUT_INIT_WINDOW_X:\r
-    return __glutInitX;\r
-  case GLUT_INIT_WINDOW_Y:\r
-    return __glutInitY;\r
-  case GLUT_INIT_WINDOW_WIDTH:\r
-    return __glutInitWidth;\r
-  case GLUT_INIT_WINDOW_HEIGHT:\r
-    return __glutInitHeight;\r
-  case GLUT_INIT_DISPLAY_MODE:\r
-    return __glutDisplayMode;\r
-  case GLUT_WINDOW_X:\r
-    XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,\r
-      __glutRoot, 0, 0, &x, &y, &win);\r
-    return x;\r
-  case GLUT_WINDOW_Y:\r
-    XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,\r
-      __glutRoot, 0, 0, &x, &y, &win);\r
-    return y;\r
-  case GLUT_WINDOW_WIDTH:\r
-    if (!__glutCurrentWindow->reshape) {\r
-      XGetGeometry(__glutDisplay, __glutCurrentWindow->win,\r
-        &root, &x, &y,\r
-        &width, &height, &border, &depth);\r
-      return width;\r
-    }\r
-    return __glutCurrentWindow->width;\r
-  case GLUT_WINDOW_HEIGHT:\r
-    if (!__glutCurrentWindow->reshape) {\r
-      XGetGeometry(__glutDisplay, __glutCurrentWindow->win,\r
-        &root, &x, &y,\r
-        &width, &height, &border, &depth);\r
-      return height;\r
-    }\r
-    return __glutCurrentWindow->height;\r
-#ifdef __OS2__\r
- #define GET_CONFIG(attrib) \\r
-  { if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win)  \\r
-       glXGetConfig( __glutCurrentWindow->vis, attrib, &value); \\r
-    else  \\r
-    glXGetConfig(__glutCurrentWindow->overlay->vis, attrib, &value); \\r
-  } \\r
-\r
-#else\r
-\r
-#define GET_CONFIG(attrib) { \\r
-  if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { \\r
-    glXGetConfig(__glutDisplay, __glutCurrentWindow->vis, \\r
-      attrib, &value); \\r
-  } else { \\r
-    glXGetConfig(__glutDisplay, __glutCurrentWindow->overlay->vis, \\r
-      attrib, &value); \\r
-  } \\r
-}\r
-#endif\r
-\r
-  case GLUT_WINDOW_BUFFER_SIZE:\r
-    GET_CONFIG(GLX_BUFFER_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_STENCIL_SIZE:\r
-    GET_CONFIG(GLX_STENCIL_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_DEPTH_SIZE:\r
-    GET_CONFIG(GLX_DEPTH_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_RED_SIZE:\r
-    GET_CONFIG(GLX_RED_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_GREEN_SIZE:\r
-    GET_CONFIG(GLX_GREEN_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_BLUE_SIZE:\r
-    GET_CONFIG(GLX_BLUE_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_ALPHA_SIZE:\r
-    GET_CONFIG(GLX_ALPHA_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_ACCUM_RED_SIZE:\r
-    GET_CONFIG(GLX_ACCUM_RED_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_ACCUM_GREEN_SIZE:\r
-    GET_CONFIG(GLX_ACCUM_GREEN_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_ACCUM_BLUE_SIZE:\r
-    GET_CONFIG(GLX_ACCUM_BLUE_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_ACCUM_ALPHA_SIZE:\r
-    GET_CONFIG(GLX_ACCUM_ALPHA_SIZE);\r
-    return value;\r
-  case GLUT_WINDOW_DOUBLEBUFFER:\r
-    GET_CONFIG(GLX_DOUBLEBUFFER);\r
-    return value;\r
-  case GLUT_WINDOW_RGBA:\r
-    GET_CONFIG(GLX_RGBA);\r
-    return value;\r
-  case GLUT_WINDOW_COLORMAP_SIZE:\r
-    GET_CONFIG(GLX_RGBA);\r
-    if (value) {\r
-      return 0;\r
-    } else {\r
-#if defined(_WIN32) || defined(__OS2__)\r
-      /* KLUDGE: we always assume 256 colors in CI mode on\r
-         Win32 */\r
-      return 256;\r
-#else\r
-      if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {\r
-        return __glutCurrentWindow->vis->visual->map_entries;\r
-      } else {\r
-        return __glutCurrentWindow->overlay->vis->visual->map_entries;\r
-      }\r
-#endif /* _WIN32 */\r
-    }\r
-  case GLUT_WINDOW_PARENT:\r
-    return __glutCurrentWindow->parent ?\r
-      __glutCurrentWindow->parent->num + 1 : 0;\r
-  case GLUT_WINDOW_NUM_CHILDREN:\r
-    {\r
-      int num = 0;\r
-      GLUTwindow *children = __glutCurrentWindow->children;\r
-\r
-      while (children) {\r
-        num++;\r
-        children = children->siblings;\r
-      }\r
-      return num;\r
-    }\r
-  case GLUT_WINDOW_NUM_SAMPLES:\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)\r
-    if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) {\r
-      GET_CONFIG(GLX_SAMPLES_SGIS);\r
-      return value;\r
-    } else {\r
-      return 0;\r
-    }\r
-#else\r
-    /* Independent of GLX server support, multisampling not\r
-       supported by GLX client-side. */\r
-    return 0;\r
-#endif\r
-  case GLUT_WINDOW_STEREO:\r
-    GET_CONFIG(GLX_STEREO);\r
-    return value;\r
-  case GLUT_WINDOW_CURSOR:\r
-    return __glutCurrentWindow->cursor;\r
-  case GLUT_SCREEN_WIDTH:\r
-    return DisplayWidth(__glutDisplay, __glutScreen);\r
-  case GLUT_SCREEN_HEIGHT:\r
-    return DisplayHeight(__glutDisplay, __glutScreen);\r
-  case GLUT_SCREEN_WIDTH_MM:\r
-    return DisplayWidthMM(__glutDisplay, __glutScreen);\r
-  case GLUT_SCREEN_HEIGHT_MM:\r
-    return DisplayHeightMM(__glutDisplay, __glutScreen);\r
-  case GLUT_MENU_NUM_ITEMS:\r
-    return __glutCurrentMenu->num;\r
-  case GLUT_DISPLAY_MODE_POSSIBLE:\r
-    {\r
-      XVisualInfo *vi;\r
-      Bool dummy, visAlloced;\r
-      void *fbc;\r
-\r
-#if defined(_WIN32)\r
-      /* Our fake glXChooseVisual (which is called by\r
-         __glutDetermineVisual) needs an HDC to work with, so grab one\r
-         from the "root" window. */\r
-      XHDC = GetDC(GetDesktopWindow());\r
-#endif\r
-      vi = __glutDetermineWindowVisual(&dummy, &visAlloced, &fbc);\r
-#if defined(_WIN32)\r
-      ReleaseDC(GetDesktopWindow(), XHDC);\r
-#endif\r
-      if (vi) {\r
-        if (visAlloced)\r
-          XFree(vi);\r
-        return 1;\r
-      }\r
-      return 0;\r
-    }\r
-  case GLUT_ELAPSED_TIME:\r
-    {\r
-#ifdef OLD_VMS\r
-       struct timeval6 elapsed, beginning, now;\r
-#else\r
-       struct timeval elapsed, beginning, now;\r
-#endif\r
-\r
-       __glutInitTime(&beginning);\r
-      GETTIMEOFDAY(&now);\r
-      TIMEDELTA(elapsed, now, beginning);\r
-      /* Return elapsed milliseconds. */\r
-#if defined(__vms) && ( __VMS_VER < 70000000 )\r
-      return (int) (elapsed.val / TICKS_PER_MILLISECOND);\r
-#else\r
-      return (int) ((elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000));\r
-#endif\r
-    }\r
-  case GLUT_WINDOW_FORMAT_ID:\r
-#if defined(__OS2__)\r
-    return wglGetPixelFormat(__glutCurrentWindow->hdc);\r
-#elif defined(_WIN32)\r
-    return GetPixelFormat(__glutCurrentWindow->hdc);\r
-#else\r
-    if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {\r
-      return (int) __glutCurrentWindow->vis->visualid;\r
-    } else {\r
-      return (int) __glutCurrentWindow->overlay->vis->visualid;\r
-    }\r
-#endif\r
-  default:\r
-    __glutWarning("invalid glutGet parameter: %d", param);\r
-    return -1;\r
-  }\r
-}\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1997, 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. */
+
+#include <assert.h>
+#include <stdlib.h>  /* SunOS 4 needs NULL defined for GETTIMEOFDAY macro. */
+#include "glutint.h"
+
+/* CENTRY */
+int GLUTAPIENTRY
+glutGet(GLenum param)
+{
+  Window win, root;
+  int x, y, value;
+  unsigned int width, height, border, depth;
+
+  switch (param) {
+  case GLUT_INIT_WINDOW_X:
+    return __glutInitX;
+  case GLUT_INIT_WINDOW_Y:
+    return __glutInitY;
+  case GLUT_INIT_WINDOW_WIDTH:
+    return __glutInitWidth;
+  case GLUT_INIT_WINDOW_HEIGHT:
+    return __glutInitHeight;
+  case GLUT_INIT_DISPLAY_MODE:
+    return __glutDisplayMode;
+  case GLUT_WINDOW_X:
+    XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,
+      __glutRoot, 0, 0, &x, &y, &win);
+    return x;
+  case GLUT_WINDOW_Y:
+    XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,
+      __glutRoot, 0, 0, &x, &y, &win);
+    return y;
+  case GLUT_WINDOW_WIDTH:
+    if (!__glutCurrentWindow->reshape) {
+      XGetGeometry(__glutDisplay, __glutCurrentWindow->win,
+        &root, &x, &y,
+        &width, &height, &border, &depth);
+      return width;
+    }
+    return __glutCurrentWindow->width;
+  case GLUT_WINDOW_HEIGHT:
+    if (!__glutCurrentWindow->reshape) {
+      XGetGeometry(__glutDisplay, __glutCurrentWindow->win,
+        &root, &x, &y,
+        &width, &height, &border, &depth);
+      return height;
+    }
+    return __glutCurrentWindow->height;
+#ifdef __OS2__
+ #define GET_CONFIG(attrib) \
+  { if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win)  \
+       glXGetConfig( __glutCurrentWindow->vis, attrib, &value); \
+    else  \
+    glXGetConfig(__glutCurrentWindow->overlay->vis, attrib, &value); \
+  } \
+
+#else
+
+#define GET_CONFIG(attrib) { \
+  if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { \
+    glXGetConfig(__glutDisplay, __glutCurrentWindow->vis, \
+      attrib, &value); \
+  } else { \
+    glXGetConfig(__glutDisplay, __glutCurrentWindow->overlay->vis, \
+      attrib, &value); \
+  } \
+}
+#endif
+
+  case GLUT_WINDOW_BUFFER_SIZE:
+    GET_CONFIG(GLX_BUFFER_SIZE);
+    return value;
+  case GLUT_WINDOW_STENCIL_SIZE:
+    GET_CONFIG(GLX_STENCIL_SIZE);
+    return value;
+  case GLUT_WINDOW_DEPTH_SIZE:
+    GET_CONFIG(GLX_DEPTH_SIZE);
+    return value;
+  case GLUT_WINDOW_RED_SIZE:
+    GET_CONFIG(GLX_RED_SIZE);
+    return value;
+  case GLUT_WINDOW_GREEN_SIZE:
+    GET_CONFIG(GLX_GREEN_SIZE);
+    return value;
+  case GLUT_WINDOW_BLUE_SIZE:
+    GET_CONFIG(GLX_BLUE_SIZE);
+    return value;
+  case GLUT_WINDOW_ALPHA_SIZE:
+    GET_CONFIG(GLX_ALPHA_SIZE);
+    return value;
+  case GLUT_WINDOW_ACCUM_RED_SIZE:
+    GET_CONFIG(GLX_ACCUM_RED_SIZE);
+    return value;
+  case GLUT_WINDOW_ACCUM_GREEN_SIZE:
+    GET_CONFIG(GLX_ACCUM_GREEN_SIZE);
+    return value;
+  case GLUT_WINDOW_ACCUM_BLUE_SIZE:
+    GET_CONFIG(GLX_ACCUM_BLUE_SIZE);
+    return value;
+  case GLUT_WINDOW_ACCUM_ALPHA_SIZE:
+    GET_CONFIG(GLX_ACCUM_ALPHA_SIZE);
+    return value;
+  case GLUT_WINDOW_DOUBLEBUFFER:
+    GET_CONFIG(GLX_DOUBLEBUFFER);
+    return value;
+  case GLUT_WINDOW_RGBA:
+    GET_CONFIG(GLX_RGBA);
+    return value;
+  case GLUT_WINDOW_COLORMAP_SIZE:
+    GET_CONFIG(GLX_RGBA);
+    if (value) {
+      return 0;
+    } else {
+#if defined(_WIN32) || defined(__OS2__)
+      /* KLUDGE: we always assume 256 colors in CI mode on
+         Win32 */
+      return 256;
+#else
+      if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
+        return __glutCurrentWindow->vis->visual->map_entries;
+      } else {
+        return __glutCurrentWindow->overlay->vis->visual->map_entries;
+      }
+#endif /* _WIN32 */
+    }
+  case GLUT_WINDOW_PARENT:
+    return __glutCurrentWindow->parent ?
+      __glutCurrentWindow->parent->num + 1 : 0;
+  case GLUT_WINDOW_NUM_CHILDREN:
+    {
+      int num = 0;
+      GLUTwindow *children = __glutCurrentWindow->children;
+
+      while (children) {
+        num++;
+        children = children->siblings;
+      }
+      return num;
+    }
+  case GLUT_WINDOW_NUM_SAMPLES:
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
+    if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) {
+      GET_CONFIG(GLX_SAMPLES_SGIS);
+      return value;
+    } else {
+      return 0;
+    }
+#else
+    /* Independent of GLX server support, multisampling not
+       supported by GLX client-side. */
+    return 0;
+#endif
+  case GLUT_WINDOW_STEREO:
+    GET_CONFIG(GLX_STEREO);
+    return value;
+  case GLUT_WINDOW_CURSOR:
+    return __glutCurrentWindow->cursor;
+  case GLUT_SCREEN_WIDTH:
+    return DisplayWidth(__glutDisplay, __glutScreen);
+  case GLUT_SCREEN_HEIGHT:
+    return DisplayHeight(__glutDisplay, __glutScreen);
+  case GLUT_SCREEN_WIDTH_MM:
+    return DisplayWidthMM(__glutDisplay, __glutScreen);
+  case GLUT_SCREEN_HEIGHT_MM:
+    return DisplayHeightMM(__glutDisplay, __glutScreen);
+  case GLUT_MENU_NUM_ITEMS:
+    return __glutCurrentMenu->num;
+  case GLUT_DISPLAY_MODE_POSSIBLE:
+    {
+      XVisualInfo *vi;
+      Bool dummy, visAlloced;
+      void *fbc;
+
+#if defined(_WIN32)
+      /* Our fake glXChooseVisual (which is called by
+         __glutDetermineVisual) needs an HDC to work with, so grab one
+         from the "root" window. */
+      XHDC = GetDC(GetDesktopWindow());
+#endif
+      vi = __glutDetermineWindowVisual(&dummy, &visAlloced, &fbc);
+#if defined(_WIN32)
+      ReleaseDC(GetDesktopWindow(), XHDC);
+#endif
+      if (vi) {
+        if (visAlloced)
+          XFree(vi);
+        return 1;
+      }
+      return 0;
+    }
+  case GLUT_ELAPSED_TIME:
+    {
+#ifdef OLD_VMS
+       struct timeval6 elapsed, beginning, now;
+#else
+       struct timeval elapsed, beginning, now;
+#endif
+
+       __glutInitTime(&beginning);
+      GETTIMEOFDAY(&now);
+      TIMEDELTA(elapsed, now, beginning);
+      /* Return elapsed milliseconds. */
+#if defined(__vms) && ( __VMS_VER < 70000000 )
+      return (int) (elapsed.val / TICKS_PER_MILLISECOND);
+#else
+      return (int) ((elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000));
+#endif
+    }
+  case GLUT_WINDOW_FORMAT_ID:
+#if defined(__OS2__)
+    return wglGetPixelFormat(__glutCurrentWindow->hdc);
+#elif defined(_WIN32)
+    return GetPixelFormat(__glutCurrentWindow->hdc);
+#else
+    if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
+      return (int) __glutCurrentWindow->vis->visualid;
+    } else {
+      return (int) __glutCurrentWindow->overlay->vis->visualid;
+    }
+#endif
+  default:
+    __glutWarning("invalid glutGet parameter: %d", param);
+    return -1;
+  }
+}
+/* ENDCENTRY */
index 6409f6181a3e8d3c5370ab39326c48f81c1a960d..a9f08ff133a83649e2141772c861af418f379480 100644 (file)
-\r
-/* GENERATED FILE -- DO NOT MODIFY */\r
-\r
-#define glutBitmapHelvetica10 XXX\r
-#include "glutbitmap.h"\r
-#undef glutBitmapHelvetica10\r
-\r
-/* char: 0xff */\r
-\r
-static const GLubyte ch255data[] = {\r
-0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch255 = {4,10,0,2,5,ch255data};\r
-\r
-/* char: 0xfe */\r
-\r
-static const GLubyte ch254data[] = {\r
-0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch254 = {5,10,0,2,6,ch254data};\r
-\r
-/* char: 0xfd */\r
-\r
-static const GLubyte ch253data[] = {\r
-0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch253 = {4,11,0,2,5,ch253data};\r
-\r
-/* char: 0xfc */\r
-\r
-static const GLubyte ch252data[] = {\r
-0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch252 = {4,8,0,0,5,ch252data};\r
-\r
-/* char: 0xfb */\r
-\r
-static const GLubyte ch251data[] = {\r
-0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch251 = {4,9,0,0,5,ch251data};\r
-\r
-/* char: 0xfa */\r
-\r
-static const GLubyte ch250data[] = {\r
-0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch250 = {4,9,0,0,5,ch250data};\r
-\r
-/* char: 0xf9 */\r
-\r
-static const GLubyte ch249data[] = {\r
-0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch249 = {4,9,0,0,5,ch249data};\r
-\r
-/* char: 0xf8 */\r
-\r
-static const GLubyte ch248data[] = {\r
-0x70,0x88,0xc8,0xa8,0x98,0x74,\r
-};\r
-\r
-static const BitmapCharRec ch248 = {6,6,0,0,6,ch248data};\r
-\r
-/* char: 0xf7 */\r
-\r
-static const GLubyte ch247data[] = {\r
-0x20,0x0,0xf8,0x0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch247 = {5,5,0,-1,6,ch247data};\r
-\r
-/* char: 0xf6 */\r
-\r
-static const GLubyte ch246data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch246 = {5,8,0,0,6,ch246data};\r
-\r
-/* char: 0xf5 */\r
-\r
-static const GLubyte ch245data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch245 = {5,9,0,0,6,ch245data};\r
-\r
-/* char: 0xf4 */\r
-\r
-static const GLubyte ch244data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch244 = {5,9,0,0,6,ch244data};\r
-\r
-/* char: 0xf3 */\r
-\r
-static const GLubyte ch243data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch243 = {5,9,0,0,6,ch243data};\r
-\r
-/* char: 0xf2 */\r
-\r
-static const GLubyte ch242data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch242 = {5,9,0,0,6,ch242data};\r
-\r
-/* char: 0xf1 */\r
-\r
-static const GLubyte ch241data[] = {\r
-0x90,0x90,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch241 = {4,9,0,0,5,ch241data};\r
-\r
-/* char: 0xf0 */\r
-\r
-static const GLubyte ch240data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x78,0x90,0x60,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch240 = {5,9,0,0,6,ch240data};\r
-\r
-/* char: 0xef */\r
-\r
-static const GLubyte ch239data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch239 = {3,8,0,0,2,ch239data};\r
-\r
-/* char: 0xee */\r
-\r
-static const GLubyte ch238data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch238 = {3,9,1,0,2,ch238data};\r
-\r
-/* char: 0xed */\r
-\r
-static const GLubyte ch237data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch237 = {2,9,0,0,2,ch237data};\r
-\r
-/* char: 0xec */\r
-\r
-static const GLubyte ch236data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch236 = {2,9,1,0,2,ch236data};\r
-\r
-/* char: 0xeb */\r
-\r
-static const GLubyte ch235data[] = {\r
-0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch235 = {4,8,0,0,5,ch235data};\r
-\r
-/* char: 0xea */\r
-\r
-static const GLubyte ch234data[] = {\r
-0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch234 = {4,9,0,0,5,ch234data};\r
-\r
-/* char: 0xe9 */\r
-\r
-static const GLubyte ch233data[] = {\r
-0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch233 = {4,9,0,0,5,ch233data};\r
-\r
-/* char: 0xe8 */\r
-\r
-static const GLubyte ch232data[] = {\r
-0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch232 = {4,9,0,0,5,ch232data};\r
-\r
-/* char: 0xe7 */\r
-\r
-static const GLubyte ch231data[] = {\r
-0x60,0x20,0x60,0x90,0x80,0x80,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch231 = {4,8,0,2,5,ch231data};\r
-\r
-/* char: 0xe6 */\r
-\r
-static const GLubyte ch230data[] = {\r
-0x6c,0x92,0x90,0x7e,0x12,0xec,\r
-};\r
-\r
-static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data};\r
-\r
-/* char: 0xe5 */\r
-\r
-static const GLubyte ch229data[] = {\r
-0x68,0x90,0x90,0x70,0x10,0xe0,0x20,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch229 = {5,9,0,0,5,ch229data};\r
-\r
-/* char: 0xe4 */\r
-\r
-static const GLubyte ch228data[] = {\r
-0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch228 = {5,8,0,0,5,ch228data};\r
-\r
-/* char: 0xe3 */\r
-\r
-static const GLubyte ch227data[] = {\r
-0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0xa0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch227 = {5,9,0,0,5,ch227data};\r
-\r
-/* char: 0xe2 */\r
-\r
-static const GLubyte ch226data[] = {\r
-0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch226 = {5,9,0,0,5,ch226data};\r
-\r
-/* char: 0xe1 */\r
-\r
-static const GLubyte ch225data[] = {\r
-0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch225 = {5,9,0,0,5,ch225data};\r
-\r
-/* char: 0xe0 */\r
-\r
-static const GLubyte ch224data[] = {\r
-0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch224 = {5,9,0,0,5,ch224data};\r
-\r
-/* char: 0xdf */\r
-\r
-static const GLubyte ch223data[] = {\r
-0xa0,0x90,0x90,0x90,0xa0,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch223 = {4,8,0,0,5,ch223data};\r
-\r
-/* char: 0xde */\r
-\r
-static const GLubyte ch222data[] = {\r
-0x80,0x80,0xf0,0x88,0x88,0xf0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch222 = {5,8,-1,0,7,ch222data};\r
-\r
-/* char: 0xdd */\r
-\r
-static const GLubyte ch221data[] = {\r
-0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch221 = {7,11,0,0,7,ch221data};\r
-\r
-/* char: 0xdc */\r
-\r
-static const GLubyte ch220data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data};\r
-\r
-/* char: 0xdb */\r
-\r
-static const GLubyte ch219data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch219 = {6,11,-1,0,8,ch219data};\r
-\r
-/* char: 0xda */\r
-\r
-static const GLubyte ch218data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch218 = {6,11,-1,0,8,ch218data};\r
-\r
-/* char: 0xd9 */\r
-\r
-static const GLubyte ch217data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch217 = {6,11,-1,0,8,ch217data};\r
-\r
-/* char: 0xd8 */\r
-\r
-static const GLubyte ch216data[] = {\r
-0x80,0x78,0xc4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch216 = {6,10,-1,1,8,ch216data};\r
-\r
-/* char: 0xd7 */\r
-\r
-static const GLubyte ch215data[] = {\r
-0x88,0x50,0x20,0x50,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch215 = {5,5,0,-1,6,ch215data};\r
-\r
-/* char: 0xd6 */\r
-\r
-static const GLubyte ch214data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch214 = {6,10,-1,0,8,ch214data};\r
-\r
-/* char: 0xd5 */\r
-\r
-static const GLubyte ch213data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch213 = {6,11,-1,0,8,ch213data};\r
-\r
-/* char: 0xd4 */\r
-\r
-static const GLubyte ch212data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch212 = {6,11,-1,0,8,ch212data};\r
-\r
-/* char: 0xd3 */\r
-\r
-static const GLubyte ch211data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch211 = {6,11,-1,0,8,ch211data};\r
-\r
-/* char: 0xd2 */\r
-\r
-static const GLubyte ch210data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch210 = {6,11,-1,0,8,ch210data};\r
-\r
-/* char: 0xd1 */\r
-\r
-static const GLubyte ch209data[] = {\r
-0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch209 = {6,11,-1,0,8,ch209data};\r
-\r
-/* char: 0xd0 */\r
-\r
-static const GLubyte ch208data[] = {\r
-0x78,0x44,0x42,0x42,0xf2,0x42,0x44,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch208 = {7,8,0,0,8,ch208data};\r
-\r
-/* char: 0xcf */\r
-\r
-static const GLubyte ch207data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch207 = {3,10,0,0,3,ch207data};\r
-\r
-/* char: 0xce */\r
-\r
-static const GLubyte ch206data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch206 = {3,11,0,0,3,ch206data};\r
-\r
-/* char: 0xcd */\r
-\r
-static const GLubyte ch205data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch205 = {2,11,-1,0,3,ch205data};\r
-\r
-/* char: 0xcc */\r
-\r
-static const GLubyte ch204data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch204 = {2,11,0,0,3,ch204data};\r
-\r
-/* char: 0xcb */\r
-\r
-static const GLubyte ch203data[] = {\r
-0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch203 = {5,10,-1,0,7,ch203data};\r
-\r
-/* char: 0xca */\r
-\r
-static const GLubyte ch202data[] = {\r
-0xf8,0x80,0x80,0xf8,0x80,0x80,0x80,0xf8,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch202 = {5,11,-1,0,7,ch202data};\r
-\r
-/* char: 0xc9 */\r
-\r
-static const GLubyte ch201data[] = {\r
-0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch201 = {5,11,-1,0,7,ch201data};\r
-\r
-/* char: 0xc8 */\r
-\r
-static const GLubyte ch200data[] = {\r
-0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch200 = {5,11,-1,0,7,ch200data};\r
-\r
-/* char: 0xc7 */\r
-\r
-static const GLubyte ch199data[] = {\r
-0x30,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch199 = {6,10,-1,2,8,ch199data};\r
-\r
-/* char: 0xc6 */\r
-\r
-static const GLubyte ch198data[] = {\r
-0x8f,0x80,0x88,0x0,0x78,0x0,0x48,0x0,0x2f,0x80,0x28,0x0,0x18,0x0,0x1f,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch198 = {9,8,0,0,10,ch198data};\r
-\r
-/* char: 0xc5 */\r
-\r
-static const GLubyte ch197data[] = {\r
-0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x10,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch197 = {7,11,0,0,7,ch197data};\r
-\r
-/* char: 0xc4 */\r
-\r
-static const GLubyte ch196data[] = {\r
-0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch196 = {7,10,0,0,7,ch196data};\r
-\r
-/* char: 0xc3 */\r
-\r
-static const GLubyte ch195data[] = {\r
-0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x14,\r
-};\r
-\r
-static const BitmapCharRec ch195 = {7,11,0,0,7,ch195data};\r
-\r
-/* char: 0xc2 */\r
-\r
-static const GLubyte ch194data[] = {\r
-0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch194 = {7,11,0,0,7,ch194data};\r
-\r
-/* char: 0xc1 */\r
-\r
-static const GLubyte ch193data[] = {\r
-0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch193 = {7,11,0,0,7,ch193data};\r
-\r
-/* char: 0xc0 */\r
-\r
-static const GLubyte ch192data[] = {\r
-0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch192 = {7,11,0,0,7,ch192data};\r
-\r
-/* char: 0xbf */\r
-\r
-static const GLubyte ch191data[] = {\r
-0x60,0x90,0x80,0x40,0x20,0x20,0x0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch191 = {4,8,-1,2,6,ch191data};\r
-\r
-/* char: 0xbe */\r
-\r
-static const GLubyte ch190data[] = {\r
-0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0xc8,0x0,0x24,0x0,0x44,0x0,0xe2,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch190 = {9,8,0,0,9,ch190data};\r
-\r
-/* char: 0xbd */\r
-\r
-static const GLubyte ch189data[] = {\r
-0x27,0x12,0x15,0xb,0x48,0x44,0xc4,0x42,\r
-};\r
-\r
-static const BitmapCharRec ch189 = {8,8,0,0,9,ch189data};\r
-\r
-/* char: 0xbc */\r
-\r
-static const GLubyte ch188data[] = {\r
-0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0x48,0x0,0x44,0x0,0xc4,0x0,0x42,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch188 = {9,8,0,0,9,ch188data};\r
-\r
-/* char: 0xbb */\r
-\r
-static const GLubyte ch187data[] = {\r
-0xa0,0x50,0x28,0x50,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch187 = {5,5,0,0,6,ch187data};\r
-\r
-/* char: 0xba */\r
-\r
-static const GLubyte ch186data[] = {\r
-0xe0,0x0,0xe0,0xa0,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch186 = {3,5,0,-3,4,ch186data};\r
-\r
-/* char: 0xb9 */\r
-\r
-static const GLubyte ch185data[] = {\r
-0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch185 = {2,4,0,-3,3,ch185data};\r
-\r
-/* char: 0xb8 */\r
-\r
-static const GLubyte ch184data[] = {\r
-0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch184 = {2,2,0,2,3,ch184data};\r
-\r
-/* char: 0xb7 */\r
-\r
-static const GLubyte ch183data[] = {\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch183 = {2,1,0,-3,3,ch183data};\r
-\r
-/* char: 0xb6 */\r
-\r
-static const GLubyte ch182data[] = {\r
-0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch182 = {6,10,0,2,6,ch182data};\r
-\r
-/* char: 0xb5 */\r
-\r
-static const GLubyte ch181data[] = {\r
-0x80,0x80,0xf0,0x90,0x90,0x90,0x90,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch181 = {4,8,0,2,5,ch181data};\r
-\r
-/* char: 0xb4 */\r
-\r
-static const GLubyte ch180data[] = {\r
-0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch180 = {2,2,0,-6,3,ch180data};\r
-\r
-/* char: 0xb3 */\r
-\r
-static const GLubyte ch179data[] = {\r
-0xc0,0x20,0x40,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data};\r
-\r
-/* char: 0xb2 */\r
-\r
-static const GLubyte ch178data[] = {\r
-0xe0,0x40,0xa0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data};\r
-\r
-/* char: 0xb1 */\r
-\r
-static const GLubyte ch177data[] = {\r
-0xf8,0x0,0x20,0x20,0xf8,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data};\r
-\r
-/* char: 0xb0 */\r
-\r
-static const GLubyte ch176data[] = {\r
-0x60,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data};\r
-\r
-/* char: 0xaf */\r
-\r
-static const GLubyte ch175data[] = {\r
-0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch175 = {3,1,0,-7,3,ch175data};\r
-\r
-/* char: 0xae */\r
-\r
-static const GLubyte ch174data[] = {\r
-0x38,0x44,0xaa,0xb2,0xba,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data};\r
-\r
-/* char: 0xad */\r
-\r
-static const GLubyte ch173data[] = {\r
-0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch173 = {3,1,0,-3,4,ch173data};\r
-\r
-/* char: 0xac */\r
-\r
-static const GLubyte ch172data[] = {\r
-0x8,0x8,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch172 = {5,3,-1,-2,7,ch172data};\r
-\r
-/* char: 0xab */\r
-\r
-static const GLubyte ch171data[] = {\r
-0x28,0x50,0xa0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch171 = {5,5,0,0,6,ch171data};\r
-\r
-/* char: 0xaa */\r
-\r
-static const GLubyte ch170data[] = {\r
-0xe0,0x0,0xa0,0x20,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch170 = {3,5,0,-3,4,ch170data};\r
-\r
-/* char: 0xa9 */\r
-\r
-static const GLubyte ch169data[] = {\r
-0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data};\r
-\r
-/* char: 0xa8 */\r
-\r
-static const GLubyte ch168data[] = {\r
-0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch168 = {3,1,0,-7,3,ch168data};\r
-\r
-/* char: 0xa7 */\r
-\r
-static const GLubyte ch167data[] = {\r
-0x70,0x88,0x18,0x70,0xc8,0x98,0x70,0xc0,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch167 = {5,10,0,2,6,ch167data};\r
-\r
-/* char: 0xa6 */\r
-\r
-static const GLubyte ch166data[] = {\r
-0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch166 = {1,10,-1,2,3,ch166data};\r
-\r
-/* char: 0xa5 */\r
-\r
-static const GLubyte ch165data[] = {\r
-0x20,0xf8,0x20,0xf8,0x50,0x50,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch165 = {5,8,0,0,6,ch165data};\r
-\r
-/* char: 0xa4 */\r
-\r
-static const GLubyte ch164data[] = {\r
-0x90,0x60,0x90,0x90,0x60,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch164 = {4,6,0,-1,5,ch164data};\r
-\r
-/* char: 0xa3 */\r
-\r
-static const GLubyte ch163data[] = {\r
-0xb0,0x48,0x40,0x40,0xe0,0x40,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch163 = {5,8,0,0,6,ch163data};\r
-\r
-/* char: 0xa2 */\r
-\r
-static const GLubyte ch162data[] = {\r
-0x40,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch162 = {5,8,0,1,6,ch162data};\r
-\r
-/* char: 0xa1 */\r
-\r
-static const GLubyte ch161data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch161 = {1,8,-1,2,3,ch161data};\r
-\r
-/* char: 0xa0 */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch160data[] = { 0x0 };\r
-static const BitmapCharRec ch160 = {1,1,0,0,3,ch160data};\r
-#else\r
-static const BitmapCharRec ch160 = {0,0,0,0,3,0};\r
-#endif\r
-\r
-/* char: 0x7e '~' */\r
-\r
-static const GLubyte ch126data[] = {\r
-0x98,0x64,\r
-};\r
-\r
-static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data};\r
-\r
-/* char: 0x7d '}' */\r
-\r
-static const GLubyte ch125data[] = {\r
-0x80,0x40,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch125 = {3,10,0,2,3,ch125data};\r
-\r
-/* char: 0x7c '|' */\r
-\r
-static const GLubyte ch124data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch124 = {1,10,-1,2,3,ch124data};\r
-\r
-/* char: 0x7b '{' */\r
-\r
-static const GLubyte ch123data[] = {\r
-0x20,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch123 = {3,10,0,2,3,ch123data};\r
-\r
-/* char: 0x7a 'z' */\r
-\r
-static const GLubyte ch122data[] = {\r
-0xf0,0x80,0x40,0x20,0x10,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch122 = {4,6,0,0,5,ch122data};\r
-\r
-/* char: 0x79 'y' */\r
-\r
-static const GLubyte ch121data[] = {\r
-0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch121 = {4,8,0,2,5,ch121data};\r
-\r
-/* char: 0x78 'x' */\r
-\r
-static const GLubyte ch120data[] = {\r
-0x88,0x88,0x50,0x20,0x50,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch120 = {5,6,0,0,6,ch120data};\r
-\r
-/* char: 0x77 'w' */\r
-\r
-static const GLubyte ch119data[] = {\r
-0x28,0x28,0x54,0x54,0x92,0x92,\r
-};\r
-\r
-static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data};\r
-\r
-/* char: 0x76 'v' */\r
-\r
-static const GLubyte ch118data[] = {\r
-0x20,0x20,0x50,0x50,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch118 = {5,6,0,0,6,ch118data};\r
-\r
-/* char: 0x75 'u' */\r
-\r
-static const GLubyte ch117data[] = {\r
-0x70,0x90,0x90,0x90,0x90,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch117 = {4,6,0,0,5,ch117data};\r
-\r
-/* char: 0x74 't' */\r
-\r
-static const GLubyte ch116data[] = {\r
-0x60,0x40,0x40,0x40,0x40,0xe0,0x40,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch116 = {3,8,0,0,4,ch116data};\r
-\r
-/* char: 0x73 's' */\r
-\r
-static const GLubyte ch115data[] = {\r
-0x60,0x90,0x10,0x60,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch115 = {4,6,0,0,5,ch115data};\r
-\r
-/* char: 0x72 'r' */\r
-\r
-static const GLubyte ch114data[] = {\r
-0x80,0x80,0x80,0x80,0xc0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch114 = {3,6,0,0,4,ch114data};\r
-\r
-/* char: 0x71 'q' */\r
-\r
-static const GLubyte ch113data[] = {\r
-0x8,0x8,0x68,0x98,0x88,0x88,0x98,0x68,\r
-};\r
-\r
-static const BitmapCharRec ch113 = {5,8,0,2,6,ch113data};\r
-\r
-/* char: 0x70 'p' */\r
-\r
-static const GLubyte ch112data[] = {\r
-0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,\r
-};\r
-\r
-static const BitmapCharRec ch112 = {5,8,0,2,6,ch112data};\r
-\r
-/* char: 0x6f 'o' */\r
-\r
-static const GLubyte ch111data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch111 = {5,6,0,0,6,ch111data};\r
-\r
-/* char: 0x6e 'n' */\r
-\r
-static const GLubyte ch110data[] = {\r
-0x88,0x88,0x88,0x88,0xc8,0xb0,\r
-};\r
-\r
-static const BitmapCharRec ch110 = {5,6,0,0,6,ch110data};\r
-\r
-/* char: 0x6d 'm' */\r
-\r
-static const GLubyte ch109data[] = {\r
-0x92,0x92,0x92,0x92,0x92,0xec,\r
-};\r
-\r
-static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data};\r
-\r
-/* char: 0x6c 'l' */\r
-\r
-static const GLubyte ch108data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch108 = {1,8,0,0,2,ch108data};\r
-\r
-/* char: 0x6b 'k' */\r
-\r
-static const GLubyte ch107data[] = {\r
-0x90,0x90,0xa0,0xc0,0xa0,0x90,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch107 = {4,8,0,0,5,ch107data};\r
-\r
-/* char: 0x6a 'j' */\r
-\r
-static const GLubyte ch106data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch106 = {1,9,0,1,2,ch106data};\r
-\r
-/* char: 0x69 'i' */\r
-\r
-static const GLubyte ch105data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch105 = {1,8,0,0,2,ch105data};\r
-\r
-/* char: 0x68 'h' */\r
-\r
-static const GLubyte ch104data[] = {\r
-0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch104 = {5,8,0,0,6,ch104data};\r
-\r
-/* char: 0x67 'g' */\r
-\r
-static const GLubyte ch103data[] = {\r
-0x70,0x8,0x68,0x98,0x88,0x88,0x98,0x68,\r
-};\r
-\r
-static const BitmapCharRec ch103 = {5,8,0,2,6,ch103data};\r
-\r
-/* char: 0x66 'f' */\r
-\r
-static const GLubyte ch102data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch102 = {4,8,0,0,4,ch102data};\r
-\r
-/* char: 0x65 'e' */\r
-\r
-static const GLubyte ch101data[] = {\r
-0x60,0x90,0x80,0xf0,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch101 = {4,6,0,0,5,ch101data};\r
-\r
-/* char: 0x64 'd' */\r
-\r
-static const GLubyte ch100data[] = {\r
-0x68,0x98,0x88,0x88,0x98,0x68,0x8,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch100 = {5,8,0,0,6,ch100data};\r
-\r
-/* char: 0x63 'c' */\r
-\r
-static const GLubyte ch99data[] = {\r
-0x60,0x90,0x80,0x80,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch99 = {4,6,0,0,5,ch99data};\r
-\r
-/* char: 0x62 'b' */\r
-\r
-static const GLubyte ch98data[] = {\r
-0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch98 = {5,8,0,0,6,ch98data};\r
-\r
-/* char: 0x61 'a' */\r
-\r
-static const GLubyte ch97data[] = {\r
-0x68,0x90,0x90,0x70,0x10,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch97 = {5,6,0,0,5,ch97data};\r
-\r
-/* char: 0x60 '`' */\r
-\r
-static const GLubyte ch96data[] = {\r
-0x80,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch96 = {2,3,0,-5,3,ch96data};\r
-\r
-/* char: 0x5f '_' */\r
-\r
-static const GLubyte ch95data[] = {\r
-0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch95 = {6,1,0,2,6,ch95data};\r
-\r
-/* char: 0x5e '^' */\r
-\r
-static const GLubyte ch94data[] = {\r
-0x88,0x50,0x50,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch94 = {5,5,0,-3,6,ch94data};\r
-\r
-/* char: 0x5d ']' */\r
-\r
-static const GLubyte ch93data[] = {\r
-0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch93 = {2,10,0,2,3,ch93data};\r
-\r
-/* char: 0x5c '\' */\r
-\r
-static const GLubyte ch92data[] = {\r
-0x20,0x20,0x40,0x40,0x40,0x40,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch92 = {3,8,0,0,3,ch92data};\r
-\r
-/* char: 0x5b '[' */\r
-\r
-static const GLubyte ch91data[] = {\r
-0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch91 = {2,10,-1,2,3,ch91data};\r
-\r
-/* char: 0x5a 'Z' */\r
-\r
-static const GLubyte ch90data[] = {\r
-0xf8,0x80,0x40,0x20,0x20,0x10,0x8,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch90 = {5,8,-1,0,7,ch90data};\r
-\r
-/* char: 0x59 'Y' */\r
-\r
-static const GLubyte ch89data[] = {\r
-0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch89 = {7,8,0,0,7,ch89data};\r
-\r
-/* char: 0x58 'X' */\r
-\r
-static const GLubyte ch88data[] = {\r
-0x88,0x88,0x50,0x50,0x20,0x50,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch88 = {5,8,-1,0,7,ch88data};\r
-\r
-/* char: 0x57 'W' */\r
-\r
-static const GLubyte ch87data[] = {\r
-0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch87 = {9,8,0,0,9,ch87data};\r
-\r
-/* char: 0x56 'V' */\r
-\r
-static const GLubyte ch86data[] = {\r
-0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch86 = {7,8,0,0,7,ch86data};\r
-\r
-/* char: 0x55 'U' */\r
-\r
-static const GLubyte ch85data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch85 = {6,8,-1,0,8,ch85data};\r
-\r
-/* char: 0x54 'T' */\r
-\r
-static const GLubyte ch84data[] = {\r
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch84 = {5,8,0,0,5,ch84data};\r
-\r
-/* char: 0x53 'S' */\r
-\r
-static const GLubyte ch83data[] = {\r
-0x70,0x88,0x88,0x8,0x70,0x80,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch83 = {5,8,-1,0,7,ch83data};\r
-\r
-/* char: 0x52 'R' */\r
-\r
-static const GLubyte ch82data[] = {\r
-0x88,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch82 = {5,8,-1,0,7,ch82data};\r
-\r
-/* char: 0x51 'Q' */\r
-\r
-static const GLubyte ch81data[] = {\r
-0x2,0x7c,0x8c,0x94,0x84,0x84,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch81 = {7,9,-1,1,8,ch81data};\r
-\r
-/* char: 0x50 'P' */\r
-\r
-static const GLubyte ch80data[] = {\r
-0x80,0x80,0x80,0x80,0xf0,0x88,0x88,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch80 = {5,8,-1,0,7,ch80data};\r
-\r
-/* char: 0x4f 'O' */\r
-\r
-static const GLubyte ch79data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch79 = {6,8,-1,0,8,ch79data};\r
-\r
-/* char: 0x4e 'N' */\r
-\r
-static const GLubyte ch78data[] = {\r
-0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,\r
-};\r
-\r
-static const BitmapCharRec ch78 = {6,8,-1,0,8,ch78data};\r
-\r
-/* char: 0x4d 'M' */\r
-\r
-static const GLubyte ch77data[] = {\r
-0x92,0x92,0x92,0xaa,0xaa,0xc6,0xc6,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch77 = {7,8,-1,0,9,ch77data};\r
-\r
-/* char: 0x4c 'L' */\r
-\r
-static const GLubyte ch76data[] = {\r
-0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch76 = {4,8,-1,0,6,ch76data};\r
-\r
-/* char: 0x4b 'K' */\r
-\r
-static const GLubyte ch75data[] = {\r
-0x88,0x88,0x90,0x90,0xe0,0xa0,0x90,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch75 = {5,8,-1,0,7,ch75data};\r
-\r
-/* char: 0x4a 'J' */\r
-\r
-static const GLubyte ch74data[] = {\r
-0x60,0x90,0x10,0x10,0x10,0x10,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch74 = {4,8,0,0,5,ch74data};\r
-\r
-/* char: 0x49 'I' */\r
-\r
-static const GLubyte ch73data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch73 = {1,8,-1,0,3,ch73data};\r
-\r
-/* char: 0x48 'H' */\r
-\r
-static const GLubyte ch72data[] = {\r
-0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch72 = {6,8,-1,0,8,ch72data};\r
-\r
-/* char: 0x47 'G' */\r
-\r
-static const GLubyte ch71data[] = {\r
-0x74,0x8c,0x84,0x8c,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch71 = {6,8,-1,0,8,ch71data};\r
-\r
-/* char: 0x46 'F' */\r
-\r
-static const GLubyte ch70data[] = {\r
-0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch70 = {5,8,-1,0,6,ch70data};\r
-\r
-/* char: 0x45 'E' */\r
-\r
-static const GLubyte ch69data[] = {\r
-0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch69 = {5,8,-1,0,7,ch69data};\r
-\r
-/* char: 0x44 'D' */\r
-\r
-static const GLubyte ch68data[] = {\r
-0xf0,0x88,0x84,0x84,0x84,0x84,0x88,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch68 = {6,8,-1,0,8,ch68data};\r
-\r
-/* char: 0x43 'C' */\r
-\r
-static const GLubyte ch67data[] = {\r
-0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch67 = {6,8,-1,0,8,ch67data};\r
-\r
-/* char: 0x42 'B' */\r
-\r
-static const GLubyte ch66data[] = {\r
-0xf0,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch66 = {5,8,-1,0,7,ch66data};\r
-\r
-/* char: 0x41 'A' */\r
-\r
-static const GLubyte ch65data[] = {\r
-0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch65 = {7,8,0,0,7,ch65data};\r
-\r
-/* char: 0x40 '@' */\r
-\r
-static const GLubyte ch64data[] = {\r
-0x3e,0x0,0x40,0x0,0x9b,0x0,0xa4,0x80,0xa4,0x80,0xa2,0x40,0x92,0x40,0x4d,0x40,\r
-0x20,0x80,0x1f,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch64 = {10,10,0,2,11,ch64data};\r
-\r
-/* char: 0x3f '?' */\r
-\r
-static const GLubyte ch63data[] = {\r
-0x40,0x0,0x40,0x40,0x20,0x10,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch63 = {4,8,-1,0,6,ch63data};\r
-\r
-/* char: 0x3e '>' */\r
-\r
-static const GLubyte ch62data[] = {\r
-0x80,0x40,0x20,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch62 = {3,5,-1,-1,6,ch62data};\r
-\r
-/* char: 0x3d '=' */\r
-\r
-static const GLubyte ch61data[] = {\r
-0xf0,0x0,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch61 = {4,3,0,-2,5,ch61data};\r
-\r
-/* char: 0x3c '<' */\r
-\r
-static const GLubyte ch60data[] = {\r
-0x20,0x40,0x80,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch60 = {3,5,-1,-1,6,ch60data};\r
-\r
-/* char: 0x3b ';' */\r
-\r
-static const GLubyte ch59data[] = {\r
-0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data};\r
-\r
-/* char: 0x3a ':' */\r
-\r
-static const GLubyte ch58data[] = {\r
-0x80,0x0,0x0,0x0,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data};\r
-\r
-/* char: 0x39 '9' */\r
-\r
-static const GLubyte ch57data[] = {\r
-0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch57 = {5,8,0,0,6,ch57data};\r
-\r
-/* char: 0x38 '8' */\r
-\r
-static const GLubyte ch56data[] = {\r
-0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch56 = {5,8,0,0,6,ch56data};\r
-\r
-/* char: 0x37 '7' */\r
-\r
-static const GLubyte ch55data[] = {\r
-0x40,0x40,0x20,0x20,0x10,0x10,0x8,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch55 = {5,8,0,0,6,ch55data};\r
-\r
-/* char: 0x36 '6' */\r
-\r
-static const GLubyte ch54data[] = {\r
-0x70,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch54 = {5,8,0,0,6,ch54data};\r
-\r
-/* char: 0x35 '5' */\r
-\r
-static const GLubyte ch53data[] = {\r
-0x70,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch53 = {5,8,0,0,6,ch53data};\r
-\r
-/* char: 0x34 '4' */\r
-\r
-static const GLubyte ch52data[] = {\r
-0x10,0x10,0xf8,0x90,0x50,0x50,0x30,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch52 = {5,8,0,0,6,ch52data};\r
-\r
-/* char: 0x33 '3' */\r
-\r
-static const GLubyte ch51data[] = {\r
-0x70,0x88,0x8,0x8,0x30,0x8,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch51 = {5,8,0,0,6,ch51data};\r
-\r
-/* char: 0x32 '2' */\r
-\r
-static const GLubyte ch50data[] = {\r
-0xf8,0x80,0x40,0x30,0x8,0x8,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch50 = {5,8,0,0,6,ch50data};\r
-\r
-/* char: 0x31 '1' */\r
-\r
-static const GLubyte ch49data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch49 = {2,8,-1,0,6,ch49data};\r
-\r
-/* char: 0x30 '0' */\r
-\r
-static const GLubyte ch48data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch48 = {5,8,0,0,6,ch48data};\r
-\r
-/* char: 0x2f '/' */\r
-\r
-static const GLubyte ch47data[] = {\r
-0x80,0x80,0x40,0x40,0x40,0x40,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch47 = {3,8,0,0,3,ch47data};\r
-\r
-/* char: 0x2e '.' */\r
-\r
-static const GLubyte ch46data[] = {\r
-0x80,\r
-};\r
-\r
-static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data};\r
-\r
-/* char: 0x2d '-' */\r
-\r
-static const GLubyte ch45data[] = {\r
-0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch45 = {5,1,-1,-3,7,ch45data};\r
-\r
-/* char: 0x2c ',' */\r
-\r
-static const GLubyte ch44data[] = {\r
-0x80,0x40,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch44 = {2,3,0,2,3,ch44data};\r
-\r
-/* char: 0x2b '+' */\r
-\r
-static const GLubyte ch43data[] = {\r
-0x20,0x20,0xf8,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch43 = {5,5,0,-1,6,ch43data};\r
-\r
-/* char: 0x2a '*' */\r
-\r
-static const GLubyte ch42data[] = {\r
-0xa0,0x40,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch42 = {3,3,0,-5,4,ch42data};\r
-\r
-/* char: 0x29 ')' */\r
-\r
-static const GLubyte ch41data[] = {\r
-0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x40,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch41 = {3,10,-1,2,4,ch41data};\r
-\r
-/* char: 0x28 '(' */\r
-\r
-static const GLubyte ch40data[] = {\r
-0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x40,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch40 = {3,10,0,2,4,ch40data};\r
-\r
-/* char: 0x27 ''' */\r
-\r
-static const GLubyte ch39data[] = {\r
-0x80,0x40,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch39 = {2,3,-1,-5,3,ch39data};\r
-\r
-/* char: 0x26 '&' */\r
-\r
-static const GLubyte ch38data[] = {\r
-0x64,0x98,0x98,0xa4,0x60,0x50,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch38 = {6,8,-1,0,8,ch38data};\r
-\r
-/* char: 0x25 '%' */\r
-\r
-static const GLubyte ch37data[] = {\r
-0x26,0x29,0x16,0x10,0x8,0x68,0x94,0x64,\r
-};\r
-\r
-static const BitmapCharRec ch37 = {8,8,0,0,9,ch37data};\r
-\r
-/* char: 0x24 '$' */\r
-\r
-static const GLubyte ch36data[] = {\r
-0x20,0x70,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch36 = {5,9,0,1,6,ch36data};\r
-\r
-/* char: 0x23 '#' */\r
-\r
-static const GLubyte ch35data[] = {\r
-0x50,0x50,0xf8,0x28,0x7c,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch35 = {6,7,0,0,6,ch35data};\r
-\r
-/* char: 0x22 '"' */\r
-\r
-static const GLubyte ch34data[] = {\r
-0xa0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch34 = {3,2,-1,-6,4,ch34data};\r
-\r
-/* char: 0x21 '!' */\r
-\r
-static const GLubyte ch33data[] = {\r
-0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch33 = {1,8,-1,0,3,ch33data};\r
-\r
-/* char: 0x20 ' ' */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch32data[] = { 0x0 };\r
-static const BitmapCharRec ch32 = {0,0,0,0,3,ch32data};\r
-#else\r
-static const BitmapCharRec ch32 = {0,0,0,0,3,0};\r
-#endif\r
-\r
-static const BitmapCharRec * const chars[] = {\r
-&ch32,\r
-&ch33,\r
-&ch34,\r
-&ch35,\r
-&ch36,\r
-&ch37,\r
-&ch38,\r
-&ch39,\r
-&ch40,\r
-&ch41,\r
-&ch42,\r
-&ch43,\r
-&ch44,\r
-&ch45,\r
-&ch46,\r
-&ch47,\r
-&ch48,\r
-&ch49,\r
-&ch50,\r
-&ch51,\r
-&ch52,\r
-&ch53,\r
-&ch54,\r
-&ch55,\r
-&ch56,\r
-&ch57,\r
-&ch58,\r
-&ch59,\r
-&ch60,\r
-&ch61,\r
-&ch62,\r
-&ch63,\r
-&ch64,\r
-&ch65,\r
-&ch66,\r
-&ch67,\r
-&ch68,\r
-&ch69,\r
-&ch70,\r
-&ch71,\r
-&ch72,\r
-&ch73,\r
-&ch74,\r
-&ch75,\r
-&ch76,\r
-&ch77,\r
-&ch78,\r
-&ch79,\r
-&ch80,\r
-&ch81,\r
-&ch82,\r
-&ch83,\r
-&ch84,\r
-&ch85,\r
-&ch86,\r
-&ch87,\r
-&ch88,\r
-&ch89,\r
-&ch90,\r
-&ch91,\r
-&ch92,\r
-&ch93,\r
-&ch94,\r
-&ch95,\r
-&ch96,\r
-&ch97,\r
-&ch98,\r
-&ch99,\r
-&ch100,\r
-&ch101,\r
-&ch102,\r
-&ch103,\r
-&ch104,\r
-&ch105,\r
-&ch106,\r
-&ch107,\r
-&ch108,\r
-&ch109,\r
-&ch110,\r
-&ch111,\r
-&ch112,\r
-&ch113,\r
-&ch114,\r
-&ch115,\r
-&ch116,\r
-&ch117,\r
-&ch118,\r
-&ch119,\r
-&ch120,\r
-&ch121,\r
-&ch122,\r
-&ch123,\r
-&ch124,\r
-&ch125,\r
-&ch126,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-&ch160,\r
-&ch161,\r
-&ch162,\r
-&ch163,\r
-&ch164,\r
-&ch165,\r
-&ch166,\r
-&ch167,\r
-&ch168,\r
-&ch169,\r
-&ch170,\r
-&ch171,\r
-&ch172,\r
-&ch173,\r
-&ch174,\r
-&ch175,\r
-&ch176,\r
-&ch177,\r
-&ch178,\r
-&ch179,\r
-&ch180,\r
-&ch181,\r
-&ch182,\r
-&ch183,\r
-&ch184,\r
-&ch185,\r
-&ch186,\r
-&ch187,\r
-&ch188,\r
-&ch189,\r
-&ch190,\r
-&ch191,\r
-&ch192,\r
-&ch193,\r
-&ch194,\r
-&ch195,\r
-&ch196,\r
-&ch197,\r
-&ch198,\r
-&ch199,\r
-&ch200,\r
-&ch201,\r
-&ch202,\r
-&ch203,\r
-&ch204,\r
-&ch205,\r
-&ch206,\r
-&ch207,\r
-&ch208,\r
-&ch209,\r
-&ch210,\r
-&ch211,\r
-&ch212,\r
-&ch213,\r
-&ch214,\r
-&ch215,\r
-&ch216,\r
-&ch217,\r
-&ch218,\r
-&ch219,\r
-&ch220,\r
-&ch221,\r
-&ch222,\r
-&ch223,\r
-&ch224,\r
-&ch225,\r
-&ch226,\r
-&ch227,\r
-&ch228,\r
-&ch229,\r
-&ch230,\r
-&ch231,\r
-&ch232,\r
-&ch233,\r
-&ch234,\r
-&ch235,\r
-&ch236,\r
-&ch237,\r
-&ch238,\r
-&ch239,\r
-&ch240,\r
-&ch241,\r
-&ch242,\r
-&ch243,\r
-&ch244,\r
-&ch245,\r
-&ch246,\r
-&ch247,\r
-&ch248,\r
-&ch249,\r
-&ch250,\r
-&ch251,\r
-&ch252,\r
-&ch253,\r
-&ch254,\r
-&ch255,\r
-};\r
-\r
-#if !defined(__IBMCPP__)\r
-const \r
-#endif\r
-BitmapFontRec glutBitmapHelvetica10 = {\r
-"-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1",\r
-224,\r
-32,\r
-chars\r
-};\r
-\r
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#define glutBitmapHelvetica10 XXX
+#include "glutbitmap.h"
+#undef glutBitmapHelvetica10
+
+/* char: 0xff */
+
+static const GLubyte ch255data[] = {
+0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x50,
+};
+
+static const BitmapCharRec ch255 = {4,10,0,2,5,ch255data};
+
+/* char: 0xfe */
+
+static const GLubyte ch254data[] = {
+0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80,
+};
+
+static const BitmapCharRec ch254 = {5,10,0,2,6,ch254data};
+
+/* char: 0xfd */
+
+static const GLubyte ch253data[] = {
+0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch253 = {4,11,0,2,5,ch253data};
+
+/* char: 0xfc */
+
+static const GLubyte ch252data[] = {
+0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,
+};
+
+static const BitmapCharRec ch252 = {4,8,0,0,5,ch252data};
+
+/* char: 0xfb */
+
+static const GLubyte ch251data[] = {
+0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch251 = {4,9,0,0,5,ch251data};
+
+/* char: 0xfa */
+
+static const GLubyte ch250data[] = {
+0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x40,0x20,
+};
+
+static const BitmapCharRec ch250 = {4,9,0,0,5,ch250data};
+
+/* char: 0xf9 */
+
+static const GLubyte ch249data[] = {
+0x70,0x90,0x90,0x90,0x90,0x90,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch249 = {4,9,0,0,5,ch249data};
+
+/* char: 0xf8 */
+
+static const GLubyte ch248data[] = {
+0x70,0x88,0xc8,0xa8,0x98,0x74,
+};
+
+static const BitmapCharRec ch248 = {6,6,0,0,6,ch248data};
+
+/* char: 0xf7 */
+
+static const GLubyte ch247data[] = {
+0x20,0x0,0xf8,0x0,0x20,
+};
+
+static const BitmapCharRec ch247 = {5,5,0,-1,6,ch247data};
+
+/* char: 0xf6 */
+
+static const GLubyte ch246data[] = {
+0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,
+};
+
+static const BitmapCharRec ch246 = {5,8,0,0,6,ch246data};
+
+/* char: 0xf5 */
+
+static const GLubyte ch245data[] = {
+0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch245 = {5,9,0,0,6,ch245data};
+
+/* char: 0xf4 */
+
+static const GLubyte ch244data[] = {
+0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch244 = {5,9,0,0,6,ch244data};
+
+/* char: 0xf3 */
+
+static const GLubyte ch243data[] = {
+0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch243 = {5,9,0,0,6,ch243data};
+
+/* char: 0xf2 */
+
+static const GLubyte ch242data[] = {
+0x70,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch242 = {5,9,0,0,6,ch242data};
+
+/* char: 0xf1 */
+
+static const GLubyte ch241data[] = {
+0x90,0x90,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50,
+};
+
+static const BitmapCharRec ch241 = {4,9,0,0,5,ch241data};
+
+/* char: 0xf0 */
+
+static const GLubyte ch240data[] = {
+0x70,0x88,0x88,0x88,0x88,0x78,0x90,0x60,0x50,
+};
+
+static const BitmapCharRec ch240 = {5,9,0,0,6,ch240data};
+
+/* char: 0xef */
+
+static const GLubyte ch239data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,
+};
+
+static const BitmapCharRec ch239 = {3,8,0,0,2,ch239data};
+
+/* char: 0xee */
+
+static const GLubyte ch238data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,
+};
+
+static const BitmapCharRec ch238 = {3,9,1,0,2,ch238data};
+
+/* char: 0xed */
+
+static const GLubyte ch237data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,
+};
+
+static const BitmapCharRec ch237 = {2,9,0,0,2,ch237data};
+
+/* char: 0xec */
+
+static const GLubyte ch236data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,
+};
+
+static const BitmapCharRec ch236 = {2,9,1,0,2,ch236data};
+
+/* char: 0xeb */
+
+static const GLubyte ch235data[] = {
+0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,
+};
+
+static const BitmapCharRec ch235 = {4,8,0,0,5,ch235data};
+
+/* char: 0xea */
+
+static const GLubyte ch234data[] = {
+0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch234 = {4,9,0,0,5,ch234data};
+
+/* char: 0xe9 */
+
+static const GLubyte ch233data[] = {
+0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x40,0x20,
+};
+
+static const BitmapCharRec ch233 = {4,9,0,0,5,ch233data};
+
+/* char: 0xe8 */
+
+static const GLubyte ch232data[] = {
+0x60,0x90,0x80,0xf0,0x90,0x60,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch232 = {4,9,0,0,5,ch232data};
+
+/* char: 0xe7 */
+
+static const GLubyte ch231data[] = {
+0x60,0x20,0x60,0x90,0x80,0x80,0x90,0x60,
+};
+
+static const BitmapCharRec ch231 = {4,8,0,2,5,ch231data};
+
+/* char: 0xe6 */
+
+static const GLubyte ch230data[] = {
+0x6c,0x92,0x90,0x7e,0x12,0xec,
+};
+
+static const BitmapCharRec ch230 = {7,6,0,0,8,ch230data};
+
+/* char: 0xe5 */
+
+static const GLubyte ch229data[] = {
+0x68,0x90,0x90,0x70,0x10,0xe0,0x20,0x50,0x20,
+};
+
+static const BitmapCharRec ch229 = {5,9,0,0,5,ch229data};
+
+/* char: 0xe4 */
+
+static const GLubyte ch228data[] = {
+0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,
+};
+
+static const BitmapCharRec ch228 = {5,8,0,0,5,ch228data};
+
+/* char: 0xe3 */
+
+static const GLubyte ch227data[] = {
+0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0xa0,0x50,
+};
+
+static const BitmapCharRec ch227 = {5,9,0,0,5,ch227data};
+
+/* char: 0xe2 */
+
+static const GLubyte ch226data[] = {
+0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch226 = {5,9,0,0,5,ch226data};
+
+/* char: 0xe1 */
+
+static const GLubyte ch225data[] = {
+0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch225 = {5,9,0,0,5,ch225data};
+
+/* char: 0xe0 */
+
+static const GLubyte ch224data[] = {
+0x68,0x90,0x90,0x70,0x10,0xe0,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch224 = {5,9,0,0,5,ch224data};
+
+/* char: 0xdf */
+
+static const GLubyte ch223data[] = {
+0xa0,0x90,0x90,0x90,0xa0,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch223 = {4,8,0,0,5,ch223data};
+
+/* char: 0xde */
+
+static const GLubyte ch222data[] = {
+0x80,0x80,0xf0,0x88,0x88,0xf0,0x80,0x80,
+};
+
+static const BitmapCharRec ch222 = {5,8,-1,0,7,ch222data};
+
+/* char: 0xdd */
+
+static const GLubyte ch221data[] = {
+0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch221 = {7,11,0,0,7,ch221data};
+
+/* char: 0xdc */
+
+static const GLubyte ch220data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,
+};
+
+static const BitmapCharRec ch220 = {6,10,-1,0,8,ch220data};
+
+/* char: 0xdb */
+
+static const GLubyte ch219data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10,
+};
+
+static const BitmapCharRec ch219 = {6,11,-1,0,8,ch219data};
+
+/* char: 0xda */
+
+static const GLubyte ch218data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch218 = {6,11,-1,0,8,ch218data};
+
+/* char: 0xd9 */
+
+static const GLubyte ch217data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch217 = {6,11,-1,0,8,ch217data};
+
+/* char: 0xd8 */
+
+static const GLubyte ch216data[] = {
+0x80,0x78,0xc4,0xa4,0xa4,0x94,0x94,0x8c,0x78,0x4,
+};
+
+static const BitmapCharRec ch216 = {6,10,-1,1,8,ch216data};
+
+/* char: 0xd7 */
+
+static const GLubyte ch215data[] = {
+0x88,0x50,0x20,0x50,0x88,
+};
+
+static const BitmapCharRec ch215 = {5,5,0,-1,6,ch215data};
+
+/* char: 0xd6 */
+
+static const GLubyte ch214data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x48,
+};
+
+static const BitmapCharRec ch214 = {6,10,-1,0,8,ch214data};
+
+/* char: 0xd5 */
+
+static const GLubyte ch213data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch213 = {6,11,-1,0,8,ch213data};
+
+/* char: 0xd4 */
+
+static const GLubyte ch212data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x28,0x10,
+};
+
+static const BitmapCharRec ch212 = {6,11,-1,0,8,ch212data};
+
+/* char: 0xd3 */
+
+static const GLubyte ch211data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch211 = {6,11,-1,0,8,ch211data};
+
+/* char: 0xd2 */
+
+static const GLubyte ch210data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch210 = {6,11,-1,0,8,ch210data};
+
+/* char: 0xd1 */
+
+static const GLubyte ch209data[] = {
+0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch209 = {6,11,-1,0,8,ch209data};
+
+/* char: 0xd0 */
+
+static const GLubyte ch208data[] = {
+0x78,0x44,0x42,0x42,0xf2,0x42,0x44,0x78,
+};
+
+static const BitmapCharRec ch208 = {7,8,0,0,8,ch208data};
+
+/* char: 0xcf */
+
+static const GLubyte ch207data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,
+};
+
+static const BitmapCharRec ch207 = {3,10,0,0,3,ch207data};
+
+/* char: 0xce */
+
+static const GLubyte ch206data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,
+};
+
+static const BitmapCharRec ch206 = {3,11,0,0,3,ch206data};
+
+/* char: 0xcd */
+
+static const GLubyte ch205data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,
+};
+
+static const BitmapCharRec ch205 = {2,11,-1,0,3,ch205data};
+
+/* char: 0xcc */
+
+static const GLubyte ch204data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,
+};
+
+static const BitmapCharRec ch204 = {2,11,0,0,3,ch204data};
+
+/* char: 0xcb */
+
+static const GLubyte ch203data[] = {
+0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x50,
+};
+
+static const BitmapCharRec ch203 = {5,10,-1,0,7,ch203data};
+
+/* char: 0xca */
+
+static const GLubyte ch202data[] = {
+0xf8,0x80,0x80,0xf8,0x80,0x80,0x80,0xf8,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch202 = {5,11,-1,0,7,ch202data};
+
+/* char: 0xc9 */
+
+static const GLubyte ch201data[] = {
+0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch201 = {5,11,-1,0,7,ch201data};
+
+/* char: 0xc8 */
+
+static const GLubyte ch200data[] = {
+0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch200 = {5,11,-1,0,7,ch200data};
+
+/* char: 0xc7 */
+
+static const GLubyte ch199data[] = {
+0x30,0x10,0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch199 = {6,10,-1,2,8,ch199data};
+
+/* char: 0xc6 */
+
+static const GLubyte ch198data[] = {
+0x8f,0x80,0x88,0x0,0x78,0x0,0x48,0x0,0x2f,0x80,0x28,0x0,0x18,0x0,0x1f,0x80,
+};
+
+static const BitmapCharRec ch198 = {9,8,0,0,10,ch198data};
+
+/* char: 0xc5 */
+
+static const GLubyte ch197data[] = {
+0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x10,0x28,0x10,
+};
+
+static const BitmapCharRec ch197 = {7,11,0,0,7,ch197data};
+
+/* char: 0xc4 */
+
+static const GLubyte ch196data[] = {
+0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,
+};
+
+static const BitmapCharRec ch196 = {7,10,0,0,7,ch196data};
+
+/* char: 0xc3 */
+
+static const GLubyte ch195data[] = {
+0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x14,
+};
+
+static const BitmapCharRec ch195 = {7,11,0,0,7,ch195data};
+
+/* char: 0xc2 */
+
+static const GLubyte ch194data[] = {
+0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x28,0x10,
+};
+
+static const BitmapCharRec ch194 = {7,11,0,0,7,ch194data};
+
+/* char: 0xc1 */
+
+static const GLubyte ch193data[] = {
+0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch193 = {7,11,0,0,7,ch193data};
+
+/* char: 0xc0 */
+
+static const GLubyte ch192data[] = {
+0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch192 = {7,11,0,0,7,ch192data};
+
+/* char: 0xbf */
+
+static const GLubyte ch191data[] = {
+0x60,0x90,0x80,0x40,0x20,0x20,0x0,0x20,
+};
+
+static const BitmapCharRec ch191 = {4,8,-1,2,6,ch191data};
+
+/* char: 0xbe */
+
+static const GLubyte ch190data[] = {
+0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0xc8,0x0,0x24,0x0,0x44,0x0,0xe2,0x0,
+};
+
+static const BitmapCharRec ch190 = {9,8,0,0,9,ch190data};
+
+/* char: 0xbd */
+
+static const GLubyte ch189data[] = {
+0x27,0x12,0x15,0xb,0x48,0x44,0xc4,0x42,
+};
+
+static const BitmapCharRec ch189 = {8,8,0,0,9,ch189data};
+
+/* char: 0xbc */
+
+static const GLubyte ch188data[] = {
+0x21,0x0,0x17,0x80,0x13,0x0,0x9,0x0,0x48,0x0,0x44,0x0,0xc4,0x0,0x42,0x0,
+};
+
+static const BitmapCharRec ch188 = {9,8,0,0,9,ch188data};
+
+/* char: 0xbb */
+
+static const GLubyte ch187data[] = {
+0xa0,0x50,0x28,0x50,0xa0,
+};
+
+static const BitmapCharRec ch187 = {5,5,0,0,6,ch187data};
+
+/* char: 0xba */
+
+static const GLubyte ch186data[] = {
+0xe0,0x0,0xe0,0xa0,0xe0,
+};
+
+static const BitmapCharRec ch186 = {3,5,0,-3,4,ch186data};
+
+/* char: 0xb9 */
+
+static const GLubyte ch185data[] = {
+0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch185 = {2,4,0,-3,3,ch185data};
+
+/* char: 0xb8 */
+
+static const GLubyte ch184data[] = {
+0xc0,0x40,
+};
+
+static const BitmapCharRec ch184 = {2,2,0,2,3,ch184data};
+
+/* char: 0xb7 */
+
+static const GLubyte ch183data[] = {
+0xc0,
+};
+
+static const BitmapCharRec ch183 = {2,1,0,-3,3,ch183data};
+
+/* char: 0xb6 */
+
+static const GLubyte ch182data[] = {
+0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c,
+};
+
+static const BitmapCharRec ch182 = {6,10,0,2,6,ch182data};
+
+/* char: 0xb5 */
+
+static const GLubyte ch181data[] = {
+0x80,0x80,0xf0,0x90,0x90,0x90,0x90,0x90,
+};
+
+static const BitmapCharRec ch181 = {4,8,0,2,5,ch181data};
+
+/* char: 0xb4 */
+
+static const GLubyte ch180data[] = {
+0x80,0x40,
+};
+
+static const BitmapCharRec ch180 = {2,2,0,-6,3,ch180data};
+
+/* char: 0xb3 */
+
+static const GLubyte ch179data[] = {
+0xc0,0x20,0x40,0xe0,
+};
+
+static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data};
+
+/* char: 0xb2 */
+
+static const GLubyte ch178data[] = {
+0xe0,0x40,0xa0,0x60,
+};
+
+static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data};
+
+/* char: 0xb1 */
+
+static const GLubyte ch177data[] = {
+0xf8,0x0,0x20,0x20,0xf8,0x20,0x20,
+};
+
+static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data};
+
+/* char: 0xb0 */
+
+static const GLubyte ch176data[] = {
+0x60,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data};
+
+/* char: 0xaf */
+
+static const GLubyte ch175data[] = {
+0xe0,
+};
+
+static const BitmapCharRec ch175 = {3,1,0,-7,3,ch175data};
+
+/* char: 0xae */
+
+static const GLubyte ch174data[] = {
+0x38,0x44,0xaa,0xb2,0xba,0x44,0x38,
+};
+
+static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data};
+
+/* char: 0xad */
+
+static const GLubyte ch173data[] = {
+0xe0,
+};
+
+static const BitmapCharRec ch173 = {3,1,0,-3,4,ch173data};
+
+/* char: 0xac */
+
+static const GLubyte ch172data[] = {
+0x8,0x8,0xf8,
+};
+
+static const BitmapCharRec ch172 = {5,3,-1,-2,7,ch172data};
+
+/* char: 0xab */
+
+static const GLubyte ch171data[] = {
+0x28,0x50,0xa0,0x50,0x28,
+};
+
+static const BitmapCharRec ch171 = {5,5,0,0,6,ch171data};
+
+/* char: 0xaa */
+
+static const GLubyte ch170data[] = {
+0xe0,0x0,0xa0,0x20,0xe0,
+};
+
+static const BitmapCharRec ch170 = {3,5,0,-3,4,ch170data};
+
+/* char: 0xa9 */
+
+static const GLubyte ch169data[] = {
+0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38,
+};
+
+static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data};
+
+/* char: 0xa8 */
+
+static const GLubyte ch168data[] = {
+0xa0,
+};
+
+static const BitmapCharRec ch168 = {3,1,0,-7,3,ch168data};
+
+/* char: 0xa7 */
+
+static const GLubyte ch167data[] = {
+0x70,0x88,0x18,0x70,0xc8,0x98,0x70,0xc0,0x88,0x70,
+};
+
+static const BitmapCharRec ch167 = {5,10,0,2,6,ch167data};
+
+/* char: 0xa6 */
+
+static const GLubyte ch166data[] = {
+0x80,0x80,0x80,0x80,0x0,0x0,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch166 = {1,10,-1,2,3,ch166data};
+
+/* char: 0xa5 */
+
+static const GLubyte ch165data[] = {
+0x20,0xf8,0x20,0xf8,0x50,0x50,0x88,0x88,
+};
+
+static const BitmapCharRec ch165 = {5,8,0,0,6,ch165data};
+
+/* char: 0xa4 */
+
+static const GLubyte ch164data[] = {
+0x90,0x60,0x90,0x90,0x60,0x90,
+};
+
+static const BitmapCharRec ch164 = {4,6,0,-1,5,ch164data};
+
+/* char: 0xa3 */
+
+static const GLubyte ch163data[] = {
+0xb0,0x48,0x40,0x40,0xe0,0x40,0x48,0x30,
+};
+
+static const BitmapCharRec ch163 = {5,8,0,0,6,ch163data};
+
+/* char: 0xa2 */
+
+static const GLubyte ch162data[] = {
+0x40,0x70,0xa8,0xa0,0xa0,0xa8,0x70,0x10,
+};
+
+static const BitmapCharRec ch162 = {5,8,0,1,6,ch162data};
+
+/* char: 0xa1 */
+
+static const GLubyte ch161data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,
+};
+
+static const BitmapCharRec ch161 = {1,8,-1,2,3,ch161data};
+
+/* char: 0xa0 */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch160data[] = { 0x0 };
+static const BitmapCharRec ch160 = {1,1,0,0,3,ch160data};
+#else
+static const BitmapCharRec ch160 = {0,0,0,0,3,0};
+#endif
+
+/* char: 0x7e '~' */
+
+static const GLubyte ch126data[] = {
+0x98,0x64,
+};
+
+static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data};
+
+/* char: 0x7d '}' */
+
+static const GLubyte ch125data[] = {
+0x80,0x40,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80,
+};
+
+static const BitmapCharRec ch125 = {3,10,0,2,3,ch125data};
+
+/* char: 0x7c '|' */
+
+static const GLubyte ch124data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch124 = {1,10,-1,2,3,ch124data};
+
+/* char: 0x7b '{' */
+
+static const GLubyte ch123data[] = {
+0x20,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20,
+};
+
+static const BitmapCharRec ch123 = {3,10,0,2,3,ch123data};
+
+/* char: 0x7a 'z' */
+
+static const GLubyte ch122data[] = {
+0xf0,0x80,0x40,0x20,0x10,0xf0,
+};
+
+static const BitmapCharRec ch122 = {4,6,0,0,5,ch122data};
+
+/* char: 0x79 'y' */
+
+static const GLubyte ch121data[] = {
+0x80,0x40,0x40,0x60,0xa0,0xa0,0x90,0x90,
+};
+
+static const BitmapCharRec ch121 = {4,8,0,2,5,ch121data};
+
+/* char: 0x78 'x' */
+
+static const GLubyte ch120data[] = {
+0x88,0x88,0x50,0x20,0x50,0x88,
+};
+
+static const BitmapCharRec ch120 = {5,6,0,0,6,ch120data};
+
+/* char: 0x77 'w' */
+
+static const GLubyte ch119data[] = {
+0x28,0x28,0x54,0x54,0x92,0x92,
+};
+
+static const BitmapCharRec ch119 = {7,6,0,0,8,ch119data};
+
+/* char: 0x76 'v' */
+
+static const GLubyte ch118data[] = {
+0x20,0x20,0x50,0x50,0x88,0x88,
+};
+
+static const BitmapCharRec ch118 = {5,6,0,0,6,ch118data};
+
+/* char: 0x75 'u' */
+
+static const GLubyte ch117data[] = {
+0x70,0x90,0x90,0x90,0x90,0x90,
+};
+
+static const BitmapCharRec ch117 = {4,6,0,0,5,ch117data};
+
+/* char: 0x74 't' */
+
+static const GLubyte ch116data[] = {
+0x60,0x40,0x40,0x40,0x40,0xe0,0x40,0x40,
+};
+
+static const BitmapCharRec ch116 = {3,8,0,0,4,ch116data};
+
+/* char: 0x73 's' */
+
+static const GLubyte ch115data[] = {
+0x60,0x90,0x10,0x60,0x90,0x60,
+};
+
+static const BitmapCharRec ch115 = {4,6,0,0,5,ch115data};
+
+/* char: 0x72 'r' */
+
+static const GLubyte ch114data[] = {
+0x80,0x80,0x80,0x80,0xc0,0xa0,
+};
+
+static const BitmapCharRec ch114 = {3,6,0,0,4,ch114data};
+
+/* char: 0x71 'q' */
+
+static const GLubyte ch113data[] = {
+0x8,0x8,0x68,0x98,0x88,0x88,0x98,0x68,
+};
+
+static const BitmapCharRec ch113 = {5,8,0,2,6,ch113data};
+
+/* char: 0x70 'p' */
+
+static const GLubyte ch112data[] = {
+0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,
+};
+
+static const BitmapCharRec ch112 = {5,8,0,2,6,ch112data};
+
+/* char: 0x6f 'o' */
+
+static const GLubyte ch111data[] = {
+0x70,0x88,0x88,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch111 = {5,6,0,0,6,ch111data};
+
+/* char: 0x6e 'n' */
+
+static const GLubyte ch110data[] = {
+0x88,0x88,0x88,0x88,0xc8,0xb0,
+};
+
+static const BitmapCharRec ch110 = {5,6,0,0,6,ch110data};
+
+/* char: 0x6d 'm' */
+
+static const GLubyte ch109data[] = {
+0x92,0x92,0x92,0x92,0x92,0xec,
+};
+
+static const BitmapCharRec ch109 = {7,6,0,0,8,ch109data};
+
+/* char: 0x6c 'l' */
+
+static const GLubyte ch108data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch108 = {1,8,0,0,2,ch108data};
+
+/* char: 0x6b 'k' */
+
+static const GLubyte ch107data[] = {
+0x90,0x90,0xa0,0xc0,0xa0,0x90,0x80,0x80,
+};
+
+static const BitmapCharRec ch107 = {4,8,0,0,5,ch107data};
+
+/* char: 0x6a 'j' */
+
+static const GLubyte ch106data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,
+};
+
+static const BitmapCharRec ch106 = {1,9,0,1,2,ch106data};
+
+/* char: 0x69 'i' */
+
+static const GLubyte ch105data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,
+};
+
+static const BitmapCharRec ch105 = {1,8,0,0,2,ch105data};
+
+/* char: 0x68 'h' */
+
+static const GLubyte ch104data[] = {
+0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,
+};
+
+static const BitmapCharRec ch104 = {5,8,0,0,6,ch104data};
+
+/* char: 0x67 'g' */
+
+static const GLubyte ch103data[] = {
+0x70,0x8,0x68,0x98,0x88,0x88,0x98,0x68,
+};
+
+static const BitmapCharRec ch103 = {5,8,0,2,6,ch103data};
+
+/* char: 0x66 'f' */
+
+static const GLubyte ch102data[] = {
+0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30,
+};
+
+static const BitmapCharRec ch102 = {4,8,0,0,4,ch102data};
+
+/* char: 0x65 'e' */
+
+static const GLubyte ch101data[] = {
+0x60,0x90,0x80,0xf0,0x90,0x60,
+};
+
+static const BitmapCharRec ch101 = {4,6,0,0,5,ch101data};
+
+/* char: 0x64 'd' */
+
+static const GLubyte ch100data[] = {
+0x68,0x98,0x88,0x88,0x98,0x68,0x8,0x8,
+};
+
+static const BitmapCharRec ch100 = {5,8,0,0,6,ch100data};
+
+/* char: 0x63 'c' */
+
+static const GLubyte ch99data[] = {
+0x60,0x90,0x80,0x80,0x90,0x60,
+};
+
+static const BitmapCharRec ch99 = {4,6,0,0,5,ch99data};
+
+/* char: 0x62 'b' */
+
+static const GLubyte ch98data[] = {
+0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80,
+};
+
+static const BitmapCharRec ch98 = {5,8,0,0,6,ch98data};
+
+/* char: 0x61 'a' */
+
+static const GLubyte ch97data[] = {
+0x68,0x90,0x90,0x70,0x10,0xe0,
+};
+
+static const BitmapCharRec ch97 = {5,6,0,0,5,ch97data};
+
+/* char: 0x60 '`' */
+
+static const GLubyte ch96data[] = {
+0x80,0x80,0x40,
+};
+
+static const BitmapCharRec ch96 = {2,3,0,-5,3,ch96data};
+
+/* char: 0x5f '_' */
+
+static const GLubyte ch95data[] = {
+0xfc,
+};
+
+static const BitmapCharRec ch95 = {6,1,0,2,6,ch95data};
+
+/* char: 0x5e '^' */
+
+static const GLubyte ch94data[] = {
+0x88,0x50,0x50,0x20,0x20,
+};
+
+static const BitmapCharRec ch94 = {5,5,0,-3,6,ch94data};
+
+/* char: 0x5d ']' */
+
+static const GLubyte ch93data[] = {
+0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0,
+};
+
+static const BitmapCharRec ch93 = {2,10,0,2,3,ch93data};
+
+/* char: 0x5c '\' */
+
+static const GLubyte ch92data[] = {
+0x20,0x20,0x40,0x40,0x40,0x40,0x80,0x80,
+};
+
+static const BitmapCharRec ch92 = {3,8,0,0,3,ch92data};
+
+/* char: 0x5b '[' */
+
+static const GLubyte ch91data[] = {
+0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0,
+};
+
+static const BitmapCharRec ch91 = {2,10,-1,2,3,ch91data};
+
+/* char: 0x5a 'Z' */
+
+static const GLubyte ch90data[] = {
+0xf8,0x80,0x40,0x20,0x20,0x10,0x8,0xf8,
+};
+
+static const BitmapCharRec ch90 = {5,8,-1,0,7,ch90data};
+
+/* char: 0x59 'Y' */
+
+static const GLubyte ch89data[] = {
+0x10,0x10,0x10,0x28,0x28,0x44,0x44,0x82,
+};
+
+static const BitmapCharRec ch89 = {7,8,0,0,7,ch89data};
+
+/* char: 0x58 'X' */
+
+static const GLubyte ch88data[] = {
+0x88,0x88,0x50,0x50,0x20,0x50,0x88,0x88,
+};
+
+static const BitmapCharRec ch88 = {5,8,-1,0,7,ch88data};
+
+/* char: 0x57 'W' */
+
+static const GLubyte ch87data[] = {
+0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80,
+};
+
+static const BitmapCharRec ch87 = {9,8,0,0,9,ch87data};
+
+/* char: 0x56 'V' */
+
+static const GLubyte ch86data[] = {
+0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch86 = {7,8,0,0,7,ch86data};
+
+/* char: 0x55 'U' */
+
+static const GLubyte ch85data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch85 = {6,8,-1,0,8,ch85data};
+
+/* char: 0x54 'T' */
+
+static const GLubyte ch84data[] = {
+0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xf8,
+};
+
+static const BitmapCharRec ch84 = {5,8,0,0,5,ch84data};
+
+/* char: 0x53 'S' */
+
+static const GLubyte ch83data[] = {
+0x70,0x88,0x88,0x8,0x70,0x80,0x88,0x70,
+};
+
+static const BitmapCharRec ch83 = {5,8,-1,0,7,ch83data};
+
+/* char: 0x52 'R' */
+
+static const GLubyte ch82data[] = {
+0x88,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0,
+};
+
+static const BitmapCharRec ch82 = {5,8,-1,0,7,ch82data};
+
+/* char: 0x51 'Q' */
+
+static const GLubyte ch81data[] = {
+0x2,0x7c,0x8c,0x94,0x84,0x84,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch81 = {7,9,-1,1,8,ch81data};
+
+/* char: 0x50 'P' */
+
+static const GLubyte ch80data[] = {
+0x80,0x80,0x80,0x80,0xf0,0x88,0x88,0xf0,
+};
+
+static const BitmapCharRec ch80 = {5,8,-1,0,7,ch80data};
+
+/* char: 0x4f 'O' */
+
+static const GLubyte ch79data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78,
+};
+
+static const BitmapCharRec ch79 = {6,8,-1,0,8,ch79data};
+
+/* char: 0x4e 'N' */
+
+static const GLubyte ch78data[] = {
+0x8c,0x8c,0x94,0x94,0xa4,0xa4,0xc4,0xc4,
+};
+
+static const BitmapCharRec ch78 = {6,8,-1,0,8,ch78data};
+
+/* char: 0x4d 'M' */
+
+static const GLubyte ch77data[] = {
+0x92,0x92,0x92,0xaa,0xaa,0xc6,0xc6,0x82,
+};
+
+static const BitmapCharRec ch77 = {7,8,-1,0,9,ch77data};
+
+/* char: 0x4c 'L' */
+
+static const GLubyte ch76data[] = {
+0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch76 = {4,8,-1,0,6,ch76data};
+
+/* char: 0x4b 'K' */
+
+static const GLubyte ch75data[] = {
+0x88,0x88,0x90,0x90,0xe0,0xa0,0x90,0x88,
+};
+
+static const BitmapCharRec ch75 = {5,8,-1,0,7,ch75data};
+
+/* char: 0x4a 'J' */
+
+static const GLubyte ch74data[] = {
+0x60,0x90,0x10,0x10,0x10,0x10,0x10,0x10,
+};
+
+static const BitmapCharRec ch74 = {4,8,0,0,5,ch74data};
+
+/* char: 0x49 'I' */
+
+static const GLubyte ch73data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch73 = {1,8,-1,0,3,ch73data};
+
+/* char: 0x48 'H' */
+
+static const GLubyte ch72data[] = {
+0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch72 = {6,8,-1,0,8,ch72data};
+
+/* char: 0x47 'G' */
+
+static const GLubyte ch71data[] = {
+0x74,0x8c,0x84,0x8c,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch71 = {6,8,-1,0,8,ch71data};
+
+/* char: 0x46 'F' */
+
+static const GLubyte ch70data[] = {
+0x80,0x80,0x80,0x80,0xf0,0x80,0x80,0xf8,
+};
+
+static const BitmapCharRec ch70 = {5,8,-1,0,6,ch70data};
+
+/* char: 0x45 'E' */
+
+static const GLubyte ch69data[] = {
+0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8,
+};
+
+static const BitmapCharRec ch69 = {5,8,-1,0,7,ch69data};
+
+/* char: 0x44 'D' */
+
+static const GLubyte ch68data[] = {
+0xf0,0x88,0x84,0x84,0x84,0x84,0x88,0xf0,
+};
+
+static const BitmapCharRec ch68 = {6,8,-1,0,8,ch68data};
+
+/* char: 0x43 'C' */
+
+static const GLubyte ch67data[] = {
+0x78,0x84,0x80,0x80,0x80,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch67 = {6,8,-1,0,8,ch67data};
+
+/* char: 0x42 'B' */
+
+static const GLubyte ch66data[] = {
+0xf0,0x88,0x88,0x88,0xf0,0x88,0x88,0xf0,
+};
+
+static const BitmapCharRec ch66 = {5,8,-1,0,7,ch66data};
+
+/* char: 0x41 'A' */
+
+static const GLubyte ch65data[] = {
+0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10,
+};
+
+static const BitmapCharRec ch65 = {7,8,0,0,7,ch65data};
+
+/* char: 0x40 '@' */
+
+static const GLubyte ch64data[] = {
+0x3e,0x0,0x40,0x0,0x9b,0x0,0xa4,0x80,0xa4,0x80,0xa2,0x40,0x92,0x40,0x4d,0x40,
+0x20,0x80,0x1f,0x0,
+};
+
+static const BitmapCharRec ch64 = {10,10,0,2,11,ch64data};
+
+/* char: 0x3f '?' */
+
+static const GLubyte ch63data[] = {
+0x40,0x0,0x40,0x40,0x20,0x10,0x90,0x60,
+};
+
+static const BitmapCharRec ch63 = {4,8,-1,0,6,ch63data};
+
+/* char: 0x3e '>' */
+
+static const GLubyte ch62data[] = {
+0x80,0x40,0x20,0x40,0x80,
+};
+
+static const BitmapCharRec ch62 = {3,5,-1,-1,6,ch62data};
+
+/* char: 0x3d '=' */
+
+static const GLubyte ch61data[] = {
+0xf0,0x0,0xf0,
+};
+
+static const BitmapCharRec ch61 = {4,3,0,-2,5,ch61data};
+
+/* char: 0x3c '<' */
+
+static const GLubyte ch60data[] = {
+0x20,0x40,0x80,0x40,0x20,
+};
+
+static const BitmapCharRec ch60 = {3,5,-1,-1,6,ch60data};
+
+/* char: 0x3b ';' */
+
+static const GLubyte ch59data[] = {
+0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40,
+};
+
+static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data};
+
+/* char: 0x3a ':' */
+
+static const GLubyte ch58data[] = {
+0x80,0x0,0x0,0x0,0x0,0x80,
+};
+
+static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data};
+
+/* char: 0x39 '9' */
+
+static const GLubyte ch57data[] = {
+0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch57 = {5,8,0,0,6,ch57data};
+
+/* char: 0x38 '8' */
+
+static const GLubyte ch56data[] = {
+0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch56 = {5,8,0,0,6,ch56data};
+
+/* char: 0x37 '7' */
+
+static const GLubyte ch55data[] = {
+0x40,0x40,0x20,0x20,0x10,0x10,0x8,0xf8,
+};
+
+static const BitmapCharRec ch55 = {5,8,0,0,6,ch55data};
+
+/* char: 0x36 '6' */
+
+static const GLubyte ch54data[] = {
+0x70,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70,
+};
+
+static const BitmapCharRec ch54 = {5,8,0,0,6,ch54data};
+
+/* char: 0x35 '5' */
+
+static const GLubyte ch53data[] = {
+0x70,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8,
+};
+
+static const BitmapCharRec ch53 = {5,8,0,0,6,ch53data};
+
+/* char: 0x34 '4' */
+
+static const GLubyte ch52data[] = {
+0x10,0x10,0xf8,0x90,0x50,0x50,0x30,0x10,
+};
+
+static const BitmapCharRec ch52 = {5,8,0,0,6,ch52data};
+
+/* char: 0x33 '3' */
+
+static const GLubyte ch51data[] = {
+0x70,0x88,0x8,0x8,0x30,0x8,0x88,0x70,
+};
+
+static const BitmapCharRec ch51 = {5,8,0,0,6,ch51data};
+
+/* char: 0x32 '2' */
+
+static const GLubyte ch50data[] = {
+0xf8,0x80,0x40,0x30,0x8,0x8,0x88,0x70,
+};
+
+static const BitmapCharRec ch50 = {5,8,0,0,6,ch50data};
+
+/* char: 0x31 '1' */
+
+static const GLubyte ch49data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch49 = {2,8,-1,0,6,ch49data};
+
+/* char: 0x30 '0' */
+
+static const GLubyte ch48data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch48 = {5,8,0,0,6,ch48data};
+
+/* char: 0x2f '/' */
+
+static const GLubyte ch47data[] = {
+0x80,0x80,0x40,0x40,0x40,0x40,0x20,0x20,
+};
+
+static const BitmapCharRec ch47 = {3,8,0,0,3,ch47data};
+
+/* char: 0x2e '.' */
+
+static const GLubyte ch46data[] = {
+0x80,
+};
+
+static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data};
+
+/* char: 0x2d '-' */
+
+static const GLubyte ch45data[] = {
+0xf8,
+};
+
+static const BitmapCharRec ch45 = {5,1,-1,-3,7,ch45data};
+
+/* char: 0x2c ',' */
+
+static const GLubyte ch44data[] = {
+0x80,0x40,0x40,
+};
+
+static const BitmapCharRec ch44 = {2,3,0,2,3,ch44data};
+
+/* char: 0x2b '+' */
+
+static const GLubyte ch43data[] = {
+0x20,0x20,0xf8,0x20,0x20,
+};
+
+static const BitmapCharRec ch43 = {5,5,0,-1,6,ch43data};
+
+/* char: 0x2a '*' */
+
+static const GLubyte ch42data[] = {
+0xa0,0x40,0xa0,
+};
+
+static const BitmapCharRec ch42 = {3,3,0,-5,4,ch42data};
+
+/* char: 0x29 ')' */
+
+static const GLubyte ch41data[] = {
+0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x40,0x40,0x80,
+};
+
+static const BitmapCharRec ch41 = {3,10,-1,2,4,ch41data};
+
+/* char: 0x28 '(' */
+
+static const GLubyte ch40data[] = {
+0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x40,0x40,0x20,
+};
+
+static const BitmapCharRec ch40 = {3,10,0,2,4,ch40data};
+
+/* char: 0x27 ''' */
+
+static const GLubyte ch39data[] = {
+0x80,0x40,0x40,
+};
+
+static const BitmapCharRec ch39 = {2,3,-1,-5,3,ch39data};
+
+/* char: 0x26 '&' */
+
+static const GLubyte ch38data[] = {
+0x64,0x98,0x98,0xa4,0x60,0x50,0x50,0x20,
+};
+
+static const BitmapCharRec ch38 = {6,8,-1,0,8,ch38data};
+
+/* char: 0x25 '%' */
+
+static const GLubyte ch37data[] = {
+0x26,0x29,0x16,0x10,0x8,0x68,0x94,0x64,
+};
+
+static const BitmapCharRec ch37 = {8,8,0,0,9,ch37data};
+
+/* char: 0x24 '$' */
+
+static const GLubyte ch36data[] = {
+0x20,0x70,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20,
+};
+
+static const BitmapCharRec ch36 = {5,9,0,1,6,ch36data};
+
+/* char: 0x23 '#' */
+
+static const GLubyte ch35data[] = {
+0x50,0x50,0xf8,0x28,0x7c,0x28,0x28,
+};
+
+static const BitmapCharRec ch35 = {6,7,0,0,6,ch35data};
+
+/* char: 0x22 '"' */
+
+static const GLubyte ch34data[] = {
+0xa0,0xa0,
+};
+
+static const BitmapCharRec ch34 = {3,2,-1,-6,4,ch34data};
+
+/* char: 0x21 '!' */
+
+static const GLubyte ch33data[] = {
+0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch33 = {1,8,-1,0,3,ch33data};
+
+/* char: 0x20 ' ' */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch32data[] = { 0x0 };
+static const BitmapCharRec ch32 = {0,0,0,0,3,ch32data};
+#else
+static const BitmapCharRec ch32 = {0,0,0,0,3,0};
+#endif
+
+static const BitmapCharRec * const chars[] = {
+&ch32,
+&ch33,
+&ch34,
+&ch35,
+&ch36,
+&ch37,
+&ch38,
+&ch39,
+&ch40,
+&ch41,
+&ch42,
+&ch43,
+&ch44,
+&ch45,
+&ch46,
+&ch47,
+&ch48,
+&ch49,
+&ch50,
+&ch51,
+&ch52,
+&ch53,
+&ch54,
+&ch55,
+&ch56,
+&ch57,
+&ch58,
+&ch59,
+&ch60,
+&ch61,
+&ch62,
+&ch63,
+&ch64,
+&ch65,
+&ch66,
+&ch67,
+&ch68,
+&ch69,
+&ch70,
+&ch71,
+&ch72,
+&ch73,
+&ch74,
+&ch75,
+&ch76,
+&ch77,
+&ch78,
+&ch79,
+&ch80,
+&ch81,
+&ch82,
+&ch83,
+&ch84,
+&ch85,
+&ch86,
+&ch87,
+&ch88,
+&ch89,
+&ch90,
+&ch91,
+&ch92,
+&ch93,
+&ch94,
+&ch95,
+&ch96,
+&ch97,
+&ch98,
+&ch99,
+&ch100,
+&ch101,
+&ch102,
+&ch103,
+&ch104,
+&ch105,
+&ch106,
+&ch107,
+&ch108,
+&ch109,
+&ch110,
+&ch111,
+&ch112,
+&ch113,
+&ch114,
+&ch115,
+&ch116,
+&ch117,
+&ch118,
+&ch119,
+&ch120,
+&ch121,
+&ch122,
+&ch123,
+&ch124,
+&ch125,
+&ch126,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+&ch160,
+&ch161,
+&ch162,
+&ch163,
+&ch164,
+&ch165,
+&ch166,
+&ch167,
+&ch168,
+&ch169,
+&ch170,
+&ch171,
+&ch172,
+&ch173,
+&ch174,
+&ch175,
+&ch176,
+&ch177,
+&ch178,
+&ch179,
+&ch180,
+&ch181,
+&ch182,
+&ch183,
+&ch184,
+&ch185,
+&ch186,
+&ch187,
+&ch188,
+&ch189,
+&ch190,
+&ch191,
+&ch192,
+&ch193,
+&ch194,
+&ch195,
+&ch196,
+&ch197,
+&ch198,
+&ch199,
+&ch200,
+&ch201,
+&ch202,
+&ch203,
+&ch204,
+&ch205,
+&ch206,
+&ch207,
+&ch208,
+&ch209,
+&ch210,
+&ch211,
+&ch212,
+&ch213,
+&ch214,
+&ch215,
+&ch216,
+&ch217,
+&ch218,
+&ch219,
+&ch220,
+&ch221,
+&ch222,
+&ch223,
+&ch224,
+&ch225,
+&ch226,
+&ch227,
+&ch228,
+&ch229,
+&ch230,
+&ch231,
+&ch232,
+&ch233,
+&ch234,
+&ch235,
+&ch236,
+&ch237,
+&ch238,
+&ch239,
+&ch240,
+&ch241,
+&ch242,
+&ch243,
+&ch244,
+&ch245,
+&ch246,
+&ch247,
+&ch248,
+&ch249,
+&ch250,
+&ch251,
+&ch252,
+&ch253,
+&ch254,
+&ch255,
+};
+
+#if !defined(__IBMCPP__)
+const 
+#endif
+BitmapFontRec glutBitmapHelvetica10 = {
+"-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1",
+224,
+32,
+chars
+};
+
index cbd0548b930a7761403787f67302dd26db065671..f615fbb2f89ae23e3b0a0bca7b730dea31046844 100644 (file)
-\r
-/* GENERATED FILE -- DO NOT MODIFY */\r
-\r
-#define glutBitmapHelvetica12 XXX\r
-#include "glutbitmap.h"\r
-#undef glutBitmapHelvetica12\r
-\r
-/* char: 0xff */\r
-\r
-static const GLubyte ch255data[] = {\r
-0xc0,0x20,0x20,0x20,0x30,0x50,0x50,0x48,0x88,0x88,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch255 = {5,12,-1,3,7,ch255data};\r
-\r
-/* char: 0xfe */\r
-\r
-static const GLubyte ch254data[] = {\r
-0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch254 = {5,12,-1,3,7,ch254data};\r
-\r
-/* char: 0xfd */\r
-\r
-static const GLubyte ch253data[] = {\r
-0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch253 = {5,13,-1,3,7,ch253data};\r
-\r
-/* char: 0xfc */\r
-\r
-static const GLubyte ch252data[] = {\r
-0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch252 = {5,9,-1,0,7,ch252data};\r
-\r
-/* char: 0xfb */\r
-\r
-static const GLubyte ch251data[] = {\r
-0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch251 = {5,10,-1,0,7,ch251data};\r
-\r
-/* char: 0xfa */\r
-\r
-static const GLubyte ch250data[] = {\r
-0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch250 = {5,10,-1,0,7,ch250data};\r
-\r
-/* char: 0xf9 */\r
-\r
-static const GLubyte ch249data[] = {\r
-0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch249 = {5,10,-1,0,7,ch249data};\r
-\r
-/* char: 0xf8 */\r
-\r
-static const GLubyte ch248data[] = {\r
-0xb8,0x44,0x64,0x54,0x4c,0x44,0x3a,\r
-};\r
-\r
-static const BitmapCharRec ch248 = {7,7,0,0,7,ch248data};\r
-\r
-/* char: 0xf7 */\r
-\r
-static const GLubyte ch247data[] = {\r
-0x20,0x0,0xf8,0x0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch247 = {5,5,-1,-1,7,ch247data};\r
-\r
-/* char: 0xf6 */\r
-\r
-static const GLubyte ch246data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch246 = {5,9,-1,0,7,ch246data};\r
-\r
-/* char: 0xf5 */\r
-\r
-static const GLubyte ch245data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch245 = {5,10,-1,0,7,ch245data};\r
-\r
-/* char: 0xf4 */\r
-\r
-static const GLubyte ch244data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch244 = {5,10,-1,0,7,ch244data};\r
-\r
-/* char: 0xf3 */\r
-\r
-static const GLubyte ch243data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch243 = {5,10,-1,0,7,ch243data};\r
-\r
-/* char: 0xf2 */\r
-\r
-static const GLubyte ch242data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch242 = {5,10,-1,0,7,ch242data};\r
-\r
-/* char: 0xf1 */\r
-\r
-static const GLubyte ch241data[] = {\r
-0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch241 = {5,10,-1,0,7,ch241data};\r
-\r
-/* char: 0xf0 */\r
-\r
-static const GLubyte ch240data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x78,0x8,0x50,0x30,0x68,\r
-};\r
-\r
-static const BitmapCharRec ch240 = {5,10,-1,0,7,ch240data};\r
-\r
-/* char: 0xef */\r
-\r
-static const GLubyte ch239data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch239 = {3,9,0,0,3,ch239data};\r
-\r
-/* char: 0xee */\r
-\r
-static const GLubyte ch238data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch238 = {3,10,0,0,3,ch238data};\r
-\r
-/* char: 0xed */\r
-\r
-static const GLubyte ch237data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch237 = {2,10,-1,0,3,ch237data};\r
-\r
-/* char: 0xec */\r
-\r
-static const GLubyte ch236data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch236 = {2,10,0,0,3,ch236data};\r
-\r
-/* char: 0xeb */\r
-\r
-static const GLubyte ch235data[] = {\r
-0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch235 = {5,9,-1,0,7,ch235data};\r
-\r
-/* char: 0xea */\r
-\r
-static const GLubyte ch234data[] = {\r
-0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch234 = {5,10,-1,0,7,ch234data};\r
-\r
-/* char: 0xe9 */\r
-\r
-static const GLubyte ch233data[] = {\r
-0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch233 = {5,10,-1,0,7,ch233data};\r
-\r
-/* char: 0xe8 */\r
-\r
-static const GLubyte ch232data[] = {\r
-0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch232 = {5,10,-1,0,7,ch232data};\r
-\r
-/* char: 0xe7 */\r
-\r
-static const GLubyte ch231data[] = {\r
-0x60,0x10,0x20,0x70,0x88,0x80,0x80,0x80,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch231 = {5,10,-1,3,7,ch231data};\r
-\r
-/* char: 0xe6 */\r
-\r
-static const GLubyte ch230data[] = {\r
-0x77,0x0,0x88,0x80,0x88,0x0,0x7f,0x80,0x8,0x80,0x88,0x80,0x77,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch230 = {9,7,-1,0,11,ch230data};\r
-\r
-/* char: 0xe5 */\r
-\r
-static const GLubyte ch229data[] = {\r
-0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x30,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch229 = {6,10,-1,0,7,ch229data};\r
-\r
-/* char: 0xe4 */\r
-\r
-static const GLubyte ch228data[] = {\r
-0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,\r
-};\r
-\r
-static const BitmapCharRec ch228 = {6,9,-1,0,7,ch228data};\r
-\r
-/* char: 0xe3 */\r
-\r
-static const GLubyte ch227data[] = {\r
-0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch227 = {6,10,-1,0,7,ch227data};\r
-\r
-/* char: 0xe2 */\r
-\r
-static const GLubyte ch226data[] = {\r
-0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch226 = {6,10,-1,0,7,ch226data};\r
-\r
-/* char: 0xe1 */\r
-\r
-static const GLubyte ch225data[] = {\r
-0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x20,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch225 = {6,10,-1,0,7,ch225data};\r
-\r
-/* char: 0xe0 */\r
-\r
-static const GLubyte ch224data[] = {\r
-0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch224 = {6,10,-1,0,7,ch224data};\r
-\r
-/* char: 0xdf */\r
-\r
-static const GLubyte ch223data[] = {\r
-0xb0,0x88,0x88,0x88,0xb0,0x88,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch223 = {5,9,-1,0,7,ch223data};\r
-\r
-/* char: 0xde */\r
-\r
-static const GLubyte ch222data[] = {\r
-0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data};\r
-\r
-/* char: 0xdd */\r
-\r
-static const GLubyte ch221data[] = {\r
-0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch221 = {7,12,-1,0,9,ch221data};\r
-\r
-/* char: 0xdc */\r
-\r
-static const GLubyte ch220data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,\r
-};\r
-\r
-static const BitmapCharRec ch220 = {6,11,-1,0,8,ch220data};\r
-\r
-/* char: 0xdb */\r
-\r
-static const GLubyte ch219data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch219 = {6,12,-1,0,8,ch219data};\r
-\r
-/* char: 0xda */\r
-\r
-static const GLubyte ch218data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch218 = {6,12,-1,0,8,ch218data};\r
-\r
-/* char: 0xd9 */\r
-\r
-static const GLubyte ch217data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch217 = {6,12,-1,0,8,ch217data};\r
-\r
-/* char: 0xd8 */\r
-\r
-static const GLubyte ch216data[] = {\r
-0x80,0x0,0x5e,0x0,0x21,0x0,0x50,0x80,0x48,0x80,0x44,0x80,0x44,0x80,0x42,0x80,\r
-0x21,0x0,0x1e,0x80,0x0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch216 = {10,11,0,1,10,ch216data};\r
-\r
-/* char: 0xd7 */\r
-\r
-static const GLubyte ch215data[] = {\r
-0x88,0x50,0x20,0x50,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch215 = {5,5,-1,-1,7,ch215data};\r
-\r
-/* char: 0xd6 */\r
-\r
-static const GLubyte ch214data[] = {\r
-0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x24,\r
-};\r
-\r
-static const BitmapCharRec ch214 = {8,11,-1,0,10,ch214data};\r
-\r
-/* char: 0xd5 */\r
-\r
-static const GLubyte ch213data[] = {\r
-0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x28,0x14,\r
-};\r
-\r
-static const BitmapCharRec ch213 = {8,12,-1,0,10,ch213data};\r
-\r
-/* char: 0xd4 */\r
-\r
-static const GLubyte ch212data[] = {\r
-0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x14,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch212 = {8,12,-1,0,10,ch212data};\r
-\r
-/* char: 0xd3 */\r
-\r
-static const GLubyte ch211data[] = {\r
-0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch211 = {8,12,-1,0,10,ch211data};\r
-\r
-/* char: 0xd2 */\r
-\r
-static const GLubyte ch210data[] = {\r
-0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch210 = {8,12,-1,0,10,ch210data};\r
-\r
-/* char: 0xd1 */\r
-\r
-static const GLubyte ch209data[] = {\r
-0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,0x0,0x28,0x14,\r
-};\r
-\r
-static const BitmapCharRec ch209 = {7,12,-1,0,9,ch209data};\r
-\r
-/* char: 0xd0 */\r
-\r
-static const GLubyte ch208data[] = {\r
-0x7c,0x42,0x41,0x41,0xf1,0x41,0x41,0x42,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch208 = {8,9,0,0,9,ch208data};\r
-\r
-/* char: 0xcf */\r
-\r
-static const GLubyte ch207data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch207 = {3,11,0,0,3,ch207data};\r
-\r
-/* char: 0xce */\r
-\r
-static const GLubyte ch206data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch206 = {3,12,0,0,3,ch206data};\r
-\r
-/* char: 0xcd */\r
-\r
-static const GLubyte ch205data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch205 = {2,12,-1,0,3,ch205data};\r
-\r
-/* char: 0xcc */\r
-\r
-static const GLubyte ch204data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch204 = {2,12,0,0,3,ch204data};\r
-\r
-/* char: 0xcb */\r
-\r
-static const GLubyte ch203data[] = {\r
-0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch203 = {6,11,-1,0,8,ch203data};\r
-\r
-/* char: 0xca */\r
-\r
-static const GLubyte ch202data[] = {\r
-0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch202 = {6,12,-1,0,8,ch202data};\r
-\r
-/* char: 0xc9 */\r
-\r
-static const GLubyte ch201data[] = {\r
-0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch201 = {6,12,-1,0,8,ch201data};\r
-\r
-/* char: 0xc8 */\r
-\r
-static const GLubyte ch200data[] = {\r
-0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch200 = {6,12,-1,0,8,ch200data};\r
-\r
-/* char: 0xc7 */\r
-\r
-static const GLubyte ch199data[] = {\r
-0x30,0x8,0x8,0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch199 = {7,12,-1,3,9,ch199data};\r
-\r
-/* char: 0xc6 */\r
-\r
-static const GLubyte ch198data[] = {\r
-0x8f,0x80,0x88,0x0,0x88,0x0,0x78,0x0,0x4f,0x80,0x48,0x0,0x28,0x0,0x28,0x0,\r
-0x1f,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch198 = {9,9,-1,0,11,ch198data};\r
-\r
-/* char: 0xc5 */\r
-\r
-static const GLubyte ch197data[] = {\r
-0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x10,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch197 = {7,12,-1,0,9,ch197data};\r
-\r
-/* char: 0xc4 */\r
-\r
-static const GLubyte ch196data[] = {\r
-0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data};\r
-\r
-/* char: 0xc3 */\r
-\r
-static const GLubyte ch195data[] = {\r
-0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x14,\r
-};\r
-\r
-static const BitmapCharRec ch195 = {7,12,-1,0,9,ch195data};\r
-\r
-/* char: 0xc2 */\r
-\r
-static const GLubyte ch194data[] = {\r
-0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch194 = {7,12,-1,0,9,ch194data};\r
-\r
-/* char: 0xc1 */\r
-\r
-static const GLubyte ch193data[] = {\r
-0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch193 = {7,12,-1,0,9,ch193data};\r
-\r
-/* char: 0xc0 */\r
-\r
-static const GLubyte ch192data[] = {\r
-0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch192 = {7,12,-1,0,9,ch192data};\r
-\r
-/* char: 0xbf */\r
-\r
-static const GLubyte ch191data[] = {\r
-0x70,0x88,0x88,0x40,0x40,0x20,0x20,0x0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch191 = {5,9,-1,3,7,ch191data};\r
-\r
-/* char: 0xbe */\r
-\r
-static const GLubyte ch190data[] = {\r
-0x21,0x0,0x17,0x80,0x15,0x0,0xb,0x0,0xc9,0x0,0x24,0x0,0x44,0x0,0x22,0x0,\r
-0xe1,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch190 = {9,9,0,0,10,ch190data};\r
-\r
-/* char: 0xbd */\r
-\r
-static const GLubyte ch189data[] = {\r
-0x47,0x80,0x22,0x0,0x11,0x0,0x14,0x80,0x4b,0x0,0x48,0x0,0x44,0x0,0xc2,0x0,\r
-0x41,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch189 = {9,9,0,0,10,ch189data};\r
-\r
-/* char: 0xbc */\r
-\r
-static const GLubyte ch188data[] = {\r
-0x41,0x0,0x27,0x80,0x15,0x0,0x13,0x0,0x49,0x0,0x44,0x0,0x44,0x0,0xc2,0x0,\r
-0x41,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch188 = {9,9,0,0,10,ch188data};\r
-\r
-/* char: 0xbb */\r
-\r
-static const GLubyte ch187data[] = {\r
-0xa0,0x50,0x28,0x50,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch187 = {5,5,-1,-1,7,ch187data};\r
-\r
-/* char: 0xba */\r
-\r
-static const GLubyte ch186data[] = {\r
-0xe0,0x0,0xe0,0xa0,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch186 = {3,5,-1,-4,5,ch186data};\r
-\r
-/* char: 0xb9 */\r
-\r
-static const GLubyte ch185data[] = {\r
-0x40,0x40,0x40,0xc0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch185 = {2,5,-1,-3,4,ch185data};\r
-\r
-/* char: 0xb8 */\r
-\r
-static const GLubyte ch184data[] = {\r
-0xc0,0x20,0x20,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch184 = {3,4,0,3,3,ch184data};\r
-\r
-/* char: 0xb7 */\r
-\r
-static const GLubyte ch183data[] = {\r
-0x80,\r
-};\r
-\r
-static const BitmapCharRec ch183 = {1,1,-1,-3,3,ch183data};\r
-\r
-/* char: 0xb6 */\r
-\r
-static const GLubyte ch182data[] = {\r
-0x28,0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x68,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch182 = {6,12,0,3,7,ch182data};\r
-\r
-/* char: 0xb5 */\r
-\r
-static const GLubyte ch181data[] = {\r
-0x80,0x80,0x80,0xe8,0x98,0x88,0x88,0x88,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch181 = {5,10,-1,3,7,ch181data};\r
-\r
-/* char: 0xb4 */\r
-\r
-static const GLubyte ch180data[] = {\r
-0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch180 = {2,2,0,-8,2,ch180data};\r
-\r
-/* char: 0xb3 */\r
-\r
-static const GLubyte ch179data[] = {\r
-0xc0,0x20,0x40,0x20,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch179 = {3,5,0,-3,4,ch179data};\r
-\r
-/* char: 0xb2 */\r
-\r
-static const GLubyte ch178data[] = {\r
-0xf0,0x40,0x20,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch178 = {4,5,0,-3,4,ch178data};\r
-\r
-/* char: 0xb1 */\r
-\r
-static const GLubyte ch177data[] = {\r
-0xf8,0x0,0x20,0x20,0xf8,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch177 = {5,7,-1,0,7,ch177data};\r
-\r
-/* char: 0xb0 */\r
-\r
-static const GLubyte ch176data[] = {\r
-0x60,0x90,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch176 = {4,4,0,-4,5,ch176data};\r
-\r
-/* char: 0xaf */\r
-\r
-static const GLubyte ch175data[] = {\r
-0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch175 = {4,1,0,-8,4,ch175data};\r
-\r
-/* char: 0xae */\r
-\r
-static const GLubyte ch174data[] = {\r
-0x3e,0x0,0x41,0x0,0x94,0x80,0x94,0x80,0x98,0x80,0x94,0x80,0x9c,0x80,0x41,0x0,\r
-0x3e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch174 = {9,9,-1,0,11,ch174data};\r
-\r
-/* char: 0xad */\r
-\r
-static const GLubyte ch173data[] = {\r
-0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch173 = {4,1,0,-3,5,ch173data};\r
-\r
-/* char: 0xac */\r
-\r
-static const GLubyte ch172data[] = {\r
-0x4,0x4,0x4,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch172 = {6,4,-1,-2,8,ch172data};\r
-\r
-/* char: 0xab */\r
-\r
-static const GLubyte ch171data[] = {\r
-0x28,0x50,0xa0,0x50,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch171 = {5,5,-1,-1,7,ch171data};\r
-\r
-/* char: 0xaa */\r
-\r
-static const GLubyte ch170data[] = {\r
-0xe0,0x0,0xa0,0x20,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch170 = {3,5,-1,-4,5,ch170data};\r
-\r
-/* char: 0xa9 */\r
-\r
-static const GLubyte ch169data[] = {\r
-0x3e,0x0,0x41,0x0,0x9c,0x80,0xa2,0x80,0xa0,0x80,0xa2,0x80,0x9c,0x80,0x41,0x0,\r
-0x3e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch169 = {9,9,-1,0,11,ch169data};\r
-\r
-/* char: 0xa8 */\r
-\r
-static const GLubyte ch168data[] = {\r
-0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch168 = {3,1,0,-8,3,ch168data};\r
-\r
-/* char: 0xa7 */\r
-\r
-static const GLubyte ch167data[] = {\r
-0x70,0x88,0x8,0x30,0x48,0x88,0x88,0x90,0x60,0x80,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch167 = {5,12,0,3,6,ch167data};\r
-\r
-/* char: 0xa6 */\r
-\r
-static const GLubyte ch166data[] = {\r
-0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch166 = {1,11,-1,2,3,ch166data};\r
-\r
-/* char: 0xa5 */\r
-\r
-static const GLubyte ch165data[] = {\r
-0x20,0x20,0xf8,0x20,0xf8,0x20,0x50,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch165 = {5,9,-1,0,7,ch165data};\r
-\r
-/* char: 0xa4 */\r
-\r
-static const GLubyte ch164data[] = {\r
-0x84,0x78,0x48,0x48,0x78,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch164 = {6,6,0,-1,7,ch164data};\r
-\r
-/* char: 0xa3 */\r
-\r
-static const GLubyte ch163data[] = {\r
-0xb0,0x48,0x20,0x20,0xf0,0x40,0x40,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch163 = {5,9,-1,0,7,ch163data};\r
-\r
-/* char: 0xa2 */\r
-\r
-static const GLubyte ch162data[] = {\r
-0x40,0x70,0xc8,0xa0,0xa0,0xa0,0xa8,0x70,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch162 = {5,9,-1,1,7,ch162data};\r
-\r
-/* char: 0xa1 */\r
-\r
-static const GLubyte ch161data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch161 = {1,10,-1,3,3,ch161data};\r
-\r
-/* char: 0xa0 */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch160data[] = { 0x0 };\r
-static const BitmapCharRec ch160 = {1,1,0,0,4,ch160data};\r
-#else\r
-static const BitmapCharRec ch160 = {0,0,0,0,4,0};\r
-#endif\r
-\r
-/* char: 0x7e '~' */\r
-\r
-static const GLubyte ch126data[] = {\r
-0x98,0x64,\r
-};\r
-\r
-static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data};\r
-\r
-/* char: 0x7d '}' */\r
-\r
-static const GLubyte ch125data[] = {\r
-0xc0,0x20,0x20,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch125 = {4,12,0,3,4,ch125data};\r
-\r
-/* char: 0x7c '|' */\r
-\r
-static const GLubyte ch124data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch124 = {1,12,-1,3,3,ch124data};\r
-\r
-/* char: 0x7b '{' */\r
-\r
-static const GLubyte ch123data[] = {\r
-0x30,0x40,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x40,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch123 = {4,12,0,3,4,ch123data};\r
-\r
-/* char: 0x7a 'z' */\r
-\r
-static const GLubyte ch122data[] = {\r
-0xf0,0x80,0x40,0x40,0x20,0x10,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch122 = {4,7,-1,0,6,ch122data};\r
-\r
-/* char: 0x79 'y' */\r
-\r
-static const GLubyte ch121data[] = {\r
-0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch121 = {5,10,-1,3,7,ch121data};\r
-\r
-/* char: 0x78 'x' */\r
-\r
-static const GLubyte ch120data[] = {\r
-0x84,0x84,0x48,0x30,0x30,0x48,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch120 = {6,7,0,0,6,ch120data};\r
-\r
-/* char: 0x77 'w' */\r
-\r
-static const GLubyte ch119data[] = {\r
-0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch119 = {9,7,0,0,9,ch119data};\r
-\r
-/* char: 0x76 'v' */\r
-\r
-static const GLubyte ch118data[] = {\r
-0x20,0x20,0x50,0x50,0x88,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch118 = {5,7,-1,0,7,ch118data};\r
-\r
-/* char: 0x75 'u' */\r
-\r
-static const GLubyte ch117data[] = {\r
-0x68,0x98,0x88,0x88,0x88,0x88,0x88,\r
-};\r
-\r
-static const BitmapCharRec ch117 = {5,7,-1,0,7,ch117data};\r
-\r
-/* char: 0x74 't' */\r
-\r
-static const GLubyte ch116data[] = {\r
-0x60,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch116 = {3,9,0,0,3,ch116data};\r
-\r
-/* char: 0x73 's' */\r
-\r
-static const GLubyte ch115data[] = {\r
-0x60,0x90,0x10,0x60,0x80,0x90,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch115 = {4,7,-1,0,6,ch115data};\r
-\r
-/* char: 0x72 'r' */\r
-\r
-static const GLubyte ch114data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0xc0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch114 = {3,7,-1,0,4,ch114data};\r
-\r
-/* char: 0x71 'q' */\r
-\r
-static const GLubyte ch113data[] = {\r
-0x8,0x8,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68,\r
-};\r
-\r
-static const BitmapCharRec ch113 = {5,10,-1,3,7,ch113data};\r
-\r
-/* char: 0x70 'p' */\r
-\r
-static const GLubyte ch112data[] = {\r
-0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,\r
-};\r
-\r
-static const BitmapCharRec ch112 = {5,10,-1,3,7,ch112data};\r
-\r
-/* char: 0x6f 'o' */\r
-\r
-static const GLubyte ch111data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch111 = {5,7,-1,0,7,ch111data};\r
-\r
-/* char: 0x6e 'n' */\r
-\r
-static const GLubyte ch110data[] = {\r
-0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,\r
-};\r
-\r
-static const BitmapCharRec ch110 = {5,7,-1,0,7,ch110data};\r
-\r
-/* char: 0x6d 'm' */\r
-\r
-static const GLubyte ch109data[] = {\r
-0x92,0x92,0x92,0x92,0x92,0xda,0xa4,\r
-};\r
-\r
-static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data};\r
-\r
-/* char: 0x6c 'l' */\r
-\r
-static const GLubyte ch108data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch108 = {1,9,-1,0,3,ch108data};\r
-\r
-/* char: 0x6b 'k' */\r
-\r
-static const GLubyte ch107data[] = {\r
-0x88,0x90,0xa0,0xc0,0xc0,0xa0,0x90,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch107 = {5,9,-1,0,6,ch107data};\r
-\r
-/* char: 0x6a 'j' */\r
-\r
-static const GLubyte ch106data[] = {\r
-0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch106 = {2,12,0,3,3,ch106data};\r
-\r
-/* char: 0x69 'i' */\r
-\r
-static const GLubyte ch105data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch105 = {1,9,-1,0,3,ch105data};\r
-\r
-/* char: 0x68 'h' */\r
-\r
-static const GLubyte ch104data[] = {\r
-0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch104 = {5,9,-1,0,7,ch104data};\r
-\r
-/* char: 0x67 'g' */\r
-\r
-static const GLubyte ch103data[] = {\r
-0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68,\r
-};\r
-\r
-static const BitmapCharRec ch103 = {5,10,-1,3,7,ch103data};\r
-\r
-/* char: 0x66 'f' */\r
-\r
-static const GLubyte ch102data[] = {\r
-0x40,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch102 = {4,9,0,0,3,ch102data};\r
-\r
-/* char: 0x65 'e' */\r
-\r
-static const GLubyte ch101data[] = {\r
-0x70,0x88,0x80,0xf8,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch101 = {5,7,-1,0,7,ch101data};\r
-\r
-/* char: 0x64 'd' */\r
-\r
-static const GLubyte ch100data[] = {\r
-0x68,0x98,0x88,0x88,0x88,0x98,0x68,0x8,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch100 = {5,9,-1,0,7,ch100data};\r
-\r
-/* char: 0x63 'c' */\r
-\r
-static const GLubyte ch99data[] = {\r
-0x70,0x88,0x80,0x80,0x80,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch99 = {5,7,-1,0,7,ch99data};\r
-\r
-/* char: 0x62 'b' */\r
-\r
-static const GLubyte ch98data[] = {\r
-0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch98 = {5,9,-1,0,7,ch98data};\r
-\r
-/* char: 0x61 'a' */\r
-\r
-static const GLubyte ch97data[] = {\r
-0x74,0x88,0x88,0x78,0x8,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch97 = {6,7,-1,0,7,ch97data};\r
-\r
-/* char: 0x60 '`' */\r
-\r
-static const GLubyte ch96data[] = {\r
-0xc0,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch96 = {2,3,0,-6,3,ch96data};\r
-\r
-/* char: 0x5f '_' */\r
-\r
-static const GLubyte ch95data[] = {\r
-0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch95 = {7,1,0,2,7,ch95data};\r
-\r
-/* char: 0x5e '^' */\r
-\r
-static const GLubyte ch94data[] = {\r
-0x88,0x50,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch94 = {5,3,0,-5,6,ch94data};\r
-\r
-/* char: 0x5d ']' */\r
-\r
-static const GLubyte ch93data[] = {\r
-0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch93 = {2,12,0,3,3,ch93data};\r
-\r
-/* char: 0x5c '\' */\r
-\r
-static const GLubyte ch92data[] = {\r
-0x10,0x10,0x20,0x20,0x20,0x40,0x40,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch92 = {4,9,0,0,4,ch92data};\r
-\r
-/* char: 0x5b '[' */\r
-\r
-static const GLubyte ch91data[] = {\r
-0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch91 = {2,12,-1,3,3,ch91data};\r
-\r
-/* char: 0x5a 'Z' */\r
-\r
-static const GLubyte ch90data[] = {\r
-0xfe,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch90 = {7,9,-1,0,9,ch90data};\r
-\r
-/* char: 0x59 'Y' */\r
-\r
-static const GLubyte ch89data[] = {\r
-0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch89 = {7,9,-1,0,9,ch89data};\r
-\r
-/* char: 0x58 'X' */\r
-\r
-static const GLubyte ch88data[] = {\r
-0x82,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch88 = {7,9,-1,0,9,ch88data};\r
-\r
-/* char: 0x57 'W' */\r
-\r
-static const GLubyte ch87data[] = {\r
-0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0x49,0x0,0x88,0x80,0x88,0x80,\r
-0x88,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch87 = {9,9,-1,0,11,ch87data};\r
-\r
-/* char: 0x56 'V' */\r
-\r
-static const GLubyte ch86data[] = {\r
-0x10,0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch86 = {7,9,-1,0,9,ch86data};\r
-\r
-/* char: 0x55 'U' */\r
-\r
-static const GLubyte ch85data[] = {\r
-0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data};\r
-\r
-/* char: 0x54 'T' */\r
-\r
-static const GLubyte ch84data[] = {\r
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch84 = {7,9,0,0,7,ch84data};\r
-\r
-/* char: 0x53 'S' */\r
-\r
-static const GLubyte ch83data[] = {\r
-0x78,0x84,0x84,0x4,0x18,0x60,0x80,0x84,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data};\r
-\r
-/* char: 0x52 'R' */\r
-\r
-static const GLubyte ch82data[] = {\r
-0x84,0x84,0x84,0x88,0xf8,0x84,0x84,0x84,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data};\r
-\r
-/* char: 0x51 'Q' */\r
-\r
-static const GLubyte ch81data[] = {\r
-0x3d,0x42,0x85,0x89,0x81,0x81,0x81,0x42,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch81 = {8,9,-1,0,10,ch81data};\r
-\r
-/* char: 0x50 'P' */\r
-\r
-static const GLubyte ch80data[] = {\r
-0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data};\r
-\r
-/* char: 0x4f 'O' */\r
-\r
-static const GLubyte ch79data[] = {\r
-0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch79 = {8,9,-1,0,10,ch79data};\r
-\r
-/* char: 0x4e 'N' */\r
-\r
-static const GLubyte ch78data[] = {\r
-0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch78 = {7,9,-1,0,9,ch78data};\r
-\r
-/* char: 0x4d 'M' */\r
-\r
-static const GLubyte ch77data[] = {\r
-0x88,0x80,0x88,0x80,0x94,0x80,0x94,0x80,0xa2,0x80,0xa2,0x80,0xc1,0x80,0xc1,0x80,\r
-0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch77 = {9,9,-1,0,11,ch77data};\r
-\r
-/* char: 0x4c 'L' */\r
-\r
-static const GLubyte ch76data[] = {\r
-0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch76 = {5,9,-1,0,7,ch76data};\r
-\r
-/* char: 0x4b 'K' */\r
-\r
-static const GLubyte ch75data[] = {\r
-0x82,0x84,0x88,0x90,0xe0,0xa0,0x90,0x88,0x84,\r
-};\r
-\r
-static const BitmapCharRec ch75 = {7,9,-1,0,8,ch75data};\r
-\r
-/* char: 0x4a 'J' */\r
-\r
-static const GLubyte ch74data[] = {\r
-0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x8,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch74 = {5,9,-1,0,7,ch74data};\r
-\r
-/* char: 0x49 'I' */\r
-\r
-static const GLubyte ch73data[] = {\r
-0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch73 = {1,9,-1,0,3,ch73data};\r
-\r
-/* char: 0x48 'H' */\r
-\r
-static const GLubyte ch72data[] = {\r
-0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82,\r
-};\r
-\r
-static const BitmapCharRec ch72 = {7,9,-1,0,9,ch72data};\r
-\r
-/* char: 0x47 'G' */\r
-\r
-static const GLubyte ch71data[] = {\r
-0x3a,0x46,0x82,0x82,0x8e,0x80,0x80,0x42,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch71 = {7,9,-1,0,9,ch71data};\r
-\r
-/* char: 0x46 'F' */\r
-\r
-static const GLubyte ch70data[] = {\r
-0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data};\r
-\r
-/* char: 0x45 'E' */\r
-\r
-static const GLubyte ch69data[] = {\r
-0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data};\r
-\r
-/* char: 0x44 'D' */\r
-\r
-static const GLubyte ch68data[] = {\r
-0xf8,0x84,0x82,0x82,0x82,0x82,0x82,0x84,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch68 = {7,9,-1,0,9,ch68data};\r
-\r
-/* char: 0x43 'C' */\r
-\r
-static const GLubyte ch67data[] = {\r
-0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch67 = {7,9,-1,0,9,ch67data};\r
-\r
-/* char: 0x42 'B' */\r
-\r
-static const GLubyte ch66data[] = {\r
-0xf8,0x84,0x84,0x84,0xf8,0x84,0x84,0x84,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch66 = {6,9,-1,0,8,ch66data};\r
-\r
-/* char: 0x41 'A' */\r
-\r
-static const GLubyte ch65data[] = {\r
-0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x28,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch65 = {7,9,-1,0,9,ch65data};\r
-\r
-/* char: 0x40 '@' */\r
-\r
-static const GLubyte ch64data[] = {\r
-0x3e,0x0,0x40,0x0,0x9b,0x0,0xa6,0x80,0xa2,0x40,0xa2,0x40,0x92,0x40,0x4d,0x40,\r
-0x60,0x80,0x1f,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch64 = {10,10,-1,1,12,ch64data};\r
-\r
-/* char: 0x3f '?' */\r
-\r
-static const GLubyte ch63data[] = {\r
-0x20,0x0,0x20,0x20,0x10,0x10,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch63 = {5,9,-1,0,7,ch63data};\r
-\r
-/* char: 0x3e '>' */\r
-\r
-static const GLubyte ch62data[] = {\r
-0xc0,0x30,0xc,0x30,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch62 = {6,5,-1,-1,7,ch62data};\r
-\r
-/* char: 0x3d '=' */\r
-\r
-static const GLubyte ch61data[] = {\r
-0xf8,0x0,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch61 = {5,3,-1,-2,7,ch61data};\r
-\r
-/* char: 0x3c '<' */\r
-\r
-static const GLubyte ch60data[] = {\r
-0xc,0x30,0xc0,0x30,0xc,\r
-};\r
-\r
-static const BitmapCharRec ch60 = {6,5,0,-1,7,ch60data};\r
-\r
-/* char: 0x3b ';' */\r
-\r
-static const GLubyte ch59data[] = {\r
-0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data};\r
-\r
-/* char: 0x3a ':' */\r
-\r
-static const GLubyte ch58data[] = {\r
-0x80,0x0,0x0,0x0,0x0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data};\r
-\r
-/* char: 0x39 '9' */\r
-\r
-static const GLubyte ch57data[] = {\r
-0x70,0x88,0x8,0x8,0x78,0x88,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch57 = {5,9,-1,0,7,ch57data};\r
-\r
-/* char: 0x38 '8' */\r
-\r
-static const GLubyte ch56data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x70,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch56 = {5,9,-1,0,7,ch56data};\r
-\r
-/* char: 0x37 '7' */\r
-\r
-static const GLubyte ch55data[] = {\r
-0x40,0x40,0x20,0x20,0x20,0x10,0x10,0x8,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch55 = {5,9,-1,0,7,ch55data};\r
-\r
-/* char: 0x36 '6' */\r
-\r
-static const GLubyte ch54data[] = {\r
-0x70,0x88,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch54 = {5,9,-1,0,7,ch54data};\r
-\r
-/* char: 0x35 '5' */\r
-\r
-static const GLubyte ch53data[] = {\r
-0x70,0x88,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch53 = {5,9,-1,0,7,ch53data};\r
-\r
-/* char: 0x34 '4' */\r
-\r
-static const GLubyte ch52data[] = {\r
-0x8,0x8,0xfc,0x88,0x48,0x28,0x28,0x18,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch52 = {6,9,0,0,7,ch52data};\r
-\r
-/* char: 0x33 '3' */\r
-\r
-static const GLubyte ch51data[] = {\r
-0x70,0x88,0x88,0x8,0x8,0x30,0x8,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch51 = {5,9,-1,0,7,ch51data};\r
-\r
-/* char: 0x32 '2' */\r
-\r
-static const GLubyte ch50data[] = {\r
-0xf8,0x80,0x80,0x40,0x20,0x10,0x8,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch50 = {5,9,-1,0,7,ch50data};\r
-\r
-/* char: 0x31 '1' */\r
-\r
-static const GLubyte ch49data[] = {\r
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch49 = {3,9,-1,0,7,ch49data};\r
-\r
-/* char: 0x30 '0' */\r
-\r
-static const GLubyte ch48data[] = {\r
-0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch48 = {5,9,-1,0,7,ch48data};\r
-\r
-/* char: 0x2f '/' */\r
-\r
-static const GLubyte ch47data[] = {\r
-0x80,0x80,0x40,0x40,0x40,0x20,0x20,0x10,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch47 = {4,9,0,0,4,ch47data};\r
-\r
-/* char: 0x2e '.' */\r
-\r
-static const GLubyte ch46data[] = {\r
-0x80,\r
-};\r
-\r
-static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data};\r
-\r
-/* char: 0x2d '-' */\r
-\r
-static const GLubyte ch45data[] = {\r
-0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch45 = {5,1,-1,-3,8,ch45data};\r
-\r
-/* char: 0x2c ',' */\r
-\r
-static const GLubyte ch44data[] = {\r
-0x80,0x40,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch44 = {2,3,-1,2,4,ch44data};\r
-\r
-/* char: 0x2b '+' */\r
-\r
-static const GLubyte ch43data[] = {\r
-0x20,0x20,0xf8,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch43 = {5,5,-1,-1,7,ch43data};\r
-\r
-/* char: 0x2a '*' */\r
-\r
-static const GLubyte ch42data[] = {\r
-0xa0,0x40,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch42 = {3,3,-1,-6,5,ch42data};\r
-\r
-/* char: 0x29 ')' */\r
-\r
-static const GLubyte ch41data[] = {\r
-0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch41 = {3,12,0,3,4,ch41data};\r
-\r
-/* char: 0x28 '(' */\r
-\r
-static const GLubyte ch40data[] = {\r
-0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch40 = {3,12,-1,3,4,ch40data};\r
-\r
-/* char: 0x27 ''' */\r
-\r
-static const GLubyte ch39data[] = {\r
-0x80,0x40,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch39 = {2,3,-1,-6,3,ch39data};\r
-\r
-/* char: 0x26 '&' */\r
-\r
-static const GLubyte ch38data[] = {\r
-0x72,0x8c,0x84,0x8a,0x50,0x30,0x48,0x48,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch38 = {7,9,-1,0,9,ch38data};\r
-\r
-/* char: 0x25 '%' */\r
-\r
-static const GLubyte ch37data[] = {\r
-0x23,0x0,0x14,0x80,0x14,0x80,0x13,0x0,0x8,0x0,0x68,0x0,0x94,0x0,0x94,0x0,\r
-0x62,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch37 = {9,9,-1,0,11,ch37data};\r
-\r
-/* char: 0x24 '$' */\r
-\r
-static const GLubyte ch36data[] = {\r
-0x20,0x70,0xa8,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch36 = {5,10,-1,1,7,ch36data};\r
-\r
-/* char: 0x23 '#' */\r
-\r
-static const GLubyte ch35data[] = {\r
-0x50,0x50,0x50,0xfc,0x28,0xfc,0x28,0x28,\r
-};\r
-\r
-static const BitmapCharRec ch35 = {6,8,0,0,7,ch35data};\r
-\r
-/* char: 0x22 '"' */\r
-\r
-static const GLubyte ch34data[] = {\r
-0xa0,0xa0,0xa0,\r
-};\r
-\r
-static const BitmapCharRec ch34 = {3,3,-1,-6,5,ch34data};\r
-\r
-/* char: 0x21 '!' */\r
-\r
-static const GLubyte ch33data[] = {\r
-0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch33 = {1,9,-1,0,3,ch33data};\r
-\r
-/* char: 0x20 ' ' */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch32data[] = { 0x0 };\r
-static const BitmapCharRec ch32 = {1,1,0,0,4,ch32data};\r
-#else\r
-static const BitmapCharRec ch32 = {0,0,0,0,4,0};\r
-#endif\r
-\r
-static const BitmapCharRec * const chars[] = {\r
-&ch32,\r
-&ch33,\r
-&ch34,\r
-&ch35,\r
-&ch36,\r
-&ch37,\r
-&ch38,\r
-&ch39,\r
-&ch40,\r
-&ch41,\r
-&ch42,\r
-&ch43,\r
-&ch44,\r
-&ch45,\r
-&ch46,\r
-&ch47,\r
-&ch48,\r
-&ch49,\r
-&ch50,\r
-&ch51,\r
-&ch52,\r
-&ch53,\r
-&ch54,\r
-&ch55,\r
-&ch56,\r
-&ch57,\r
-&ch58,\r
-&ch59,\r
-&ch60,\r
-&ch61,\r
-&ch62,\r
-&ch63,\r
-&ch64,\r
-&ch65,\r
-&ch66,\r
-&ch67,\r
-&ch68,\r
-&ch69,\r
-&ch70,\r
-&ch71,\r
-&ch72,\r
-&ch73,\r
-&ch74,\r
-&ch75,\r
-&ch76,\r
-&ch77,\r
-&ch78,\r
-&ch79,\r
-&ch80,\r
-&ch81,\r
-&ch82,\r
-&ch83,\r
-&ch84,\r
-&ch85,\r
-&ch86,\r
-&ch87,\r
-&ch88,\r
-&ch89,\r
-&ch90,\r
-&ch91,\r
-&ch92,\r
-&ch93,\r
-&ch94,\r
-&ch95,\r
-&ch96,\r
-&ch97,\r
-&ch98,\r
-&ch99,\r
-&ch100,\r
-&ch101,\r
-&ch102,\r
-&ch103,\r
-&ch104,\r
-&ch105,\r
-&ch106,\r
-&ch107,\r
-&ch108,\r
-&ch109,\r
-&ch110,\r
-&ch111,\r
-&ch112,\r
-&ch113,\r
-&ch114,\r
-&ch115,\r
-&ch116,\r
-&ch117,\r
-&ch118,\r
-&ch119,\r
-&ch120,\r
-&ch121,\r
-&ch122,\r
-&ch123,\r
-&ch124,\r
-&ch125,\r
-&ch126,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-&ch160,\r
-&ch161,\r
-&ch162,\r
-&ch163,\r
-&ch164,\r
-&ch165,\r
-&ch166,\r
-&ch167,\r
-&ch168,\r
-&ch169,\r
-&ch170,\r
-&ch171,\r
-&ch172,\r
-&ch173,\r
-&ch174,\r
-&ch175,\r
-&ch176,\r
-&ch177,\r
-&ch178,\r
-&ch179,\r
-&ch180,\r
-&ch181,\r
-&ch182,\r
-&ch183,\r
-&ch184,\r
-&ch185,\r
-&ch186,\r
-&ch187,\r
-&ch188,\r
-&ch189,\r
-&ch190,\r
-&ch191,\r
-&ch192,\r
-&ch193,\r
-&ch194,\r
-&ch195,\r
-&ch196,\r
-&ch197,\r
-&ch198,\r
-&ch199,\r
-&ch200,\r
-&ch201,\r
-&ch202,\r
-&ch203,\r
-&ch204,\r
-&ch205,\r
-&ch206,\r
-&ch207,\r
-&ch208,\r
-&ch209,\r
-&ch210,\r
-&ch211,\r
-&ch212,\r
-&ch213,\r
-&ch214,\r
-&ch215,\r
-&ch216,\r
-&ch217,\r
-&ch218,\r
-&ch219,\r
-&ch220,\r
-&ch221,\r
-&ch222,\r
-&ch223,\r
-&ch224,\r
-&ch225,\r
-&ch226,\r
-&ch227,\r
-&ch228,\r
-&ch229,\r
-&ch230,\r
-&ch231,\r
-&ch232,\r
-&ch233,\r
-&ch234,\r
-&ch235,\r
-&ch236,\r
-&ch237,\r
-&ch238,\r
-&ch239,\r
-&ch240,\r
-&ch241,\r
-&ch242,\r
-&ch243,\r
-&ch244,\r
-&ch245,\r
-&ch246,\r
-&ch247,\r
-&ch248,\r
-&ch249,\r
-&ch250,\r
-&ch251,\r
-&ch252,\r
-&ch253,\r
-&ch254,\r
-&ch255,\r
-};\r
-\r
-#if !defined(__IBMCPP__)\r
-const \r
-#endif\r
-BitmapFontRec glutBitmapHelvetica12 = {\r
-"-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1",\r
-224,\r
-32,\r
-chars\r
-};\r
-\r
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#define glutBitmapHelvetica12 XXX
+#include "glutbitmap.h"
+#undef glutBitmapHelvetica12
+
+/* char: 0xff */
+
+static const GLubyte ch255data[] = {
+0xc0,0x20,0x20,0x20,0x30,0x50,0x50,0x48,0x88,0x88,0x0,0x50,
+};
+
+static const BitmapCharRec ch255 = {5,12,-1,3,7,ch255data};
+
+/* char: 0xfe */
+
+static const GLubyte ch254data[] = {
+0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,
+};
+
+static const BitmapCharRec ch254 = {5,12,-1,3,7,ch254data};
+
+/* char: 0xfd */
+
+static const GLubyte ch253data[] = {
+0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch253 = {5,13,-1,3,7,ch253data};
+
+/* char: 0xfc */
+
+static const GLubyte ch252data[] = {
+0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,
+};
+
+static const BitmapCharRec ch252 = {5,9,-1,0,7,ch252data};
+
+/* char: 0xfb */
+
+static const GLubyte ch251data[] = {
+0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch251 = {5,10,-1,0,7,ch251data};
+
+/* char: 0xfa */
+
+static const GLubyte ch250data[] = {
+0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch250 = {5,10,-1,0,7,ch250data};
+
+/* char: 0xf9 */
+
+static const GLubyte ch249data[] = {
+0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch249 = {5,10,-1,0,7,ch249data};
+
+/* char: 0xf8 */
+
+static const GLubyte ch248data[] = {
+0xb8,0x44,0x64,0x54,0x4c,0x44,0x3a,
+};
+
+static const BitmapCharRec ch248 = {7,7,0,0,7,ch248data};
+
+/* char: 0xf7 */
+
+static const GLubyte ch247data[] = {
+0x20,0x0,0xf8,0x0,0x20,
+};
+
+static const BitmapCharRec ch247 = {5,5,-1,-1,7,ch247data};
+
+/* char: 0xf6 */
+
+static const GLubyte ch246data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,
+};
+
+static const BitmapCharRec ch246 = {5,9,-1,0,7,ch246data};
+
+/* char: 0xf5 */
+
+static const GLubyte ch245data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch245 = {5,10,-1,0,7,ch245data};
+
+/* char: 0xf4 */
+
+static const GLubyte ch244data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch244 = {5,10,-1,0,7,ch244data};
+
+/* char: 0xf3 */
+
+static const GLubyte ch243data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch243 = {5,10,-1,0,7,ch243data};
+
+/* char: 0xf2 */
+
+static const GLubyte ch242data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch242 = {5,10,-1,0,7,ch242data};
+
+/* char: 0xf1 */
+
+static const GLubyte ch241data[] = {
+0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch241 = {5,10,-1,0,7,ch241data};
+
+/* char: 0xf0 */
+
+static const GLubyte ch240data[] = {
+0x70,0x88,0x88,0x88,0x88,0x78,0x8,0x50,0x30,0x68,
+};
+
+static const BitmapCharRec ch240 = {5,10,-1,0,7,ch240data};
+
+/* char: 0xef */
+
+static const GLubyte ch239data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,
+};
+
+static const BitmapCharRec ch239 = {3,9,0,0,3,ch239data};
+
+/* char: 0xee */
+
+static const GLubyte ch238data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,
+};
+
+static const BitmapCharRec ch238 = {3,10,0,0,3,ch238data};
+
+/* char: 0xed */
+
+static const GLubyte ch237data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,
+};
+
+static const BitmapCharRec ch237 = {2,10,-1,0,3,ch237data};
+
+/* char: 0xec */
+
+static const GLubyte ch236data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,
+};
+
+static const BitmapCharRec ch236 = {2,10,0,0,3,ch236data};
+
+/* char: 0xeb */
+
+static const GLubyte ch235data[] = {
+0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,
+};
+
+static const BitmapCharRec ch235 = {5,9,-1,0,7,ch235data};
+
+/* char: 0xea */
+
+static const GLubyte ch234data[] = {
+0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch234 = {5,10,-1,0,7,ch234data};
+
+/* char: 0xe9 */
+
+static const GLubyte ch233data[] = {
+0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch233 = {5,10,-1,0,7,ch233data};
+
+/* char: 0xe8 */
+
+static const GLubyte ch232data[] = {
+0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x0,0x20,0x40,
+};
+
+static const BitmapCharRec ch232 = {5,10,-1,0,7,ch232data};
+
+/* char: 0xe7 */
+
+static const GLubyte ch231data[] = {
+0x60,0x10,0x20,0x70,0x88,0x80,0x80,0x80,0x88,0x70,
+};
+
+static const BitmapCharRec ch231 = {5,10,-1,3,7,ch231data};
+
+/* char: 0xe6 */
+
+static const GLubyte ch230data[] = {
+0x77,0x0,0x88,0x80,0x88,0x0,0x7f,0x80,0x8,0x80,0x88,0x80,0x77,0x0,
+};
+
+static const BitmapCharRec ch230 = {9,7,-1,0,11,ch230data};
+
+/* char: 0xe5 */
+
+static const GLubyte ch229data[] = {
+0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x30,0x48,0x30,
+};
+
+static const BitmapCharRec ch229 = {6,10,-1,0,7,ch229data};
+
+/* char: 0xe4 */
+
+static const GLubyte ch228data[] = {
+0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,
+};
+
+static const BitmapCharRec ch228 = {6,9,-1,0,7,ch228data};
+
+/* char: 0xe3 */
+
+static const GLubyte ch227data[] = {
+0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x28,
+};
+
+static const BitmapCharRec ch227 = {6,10,-1,0,7,ch227data};
+
+/* char: 0xe2 */
+
+static const GLubyte ch226data[] = {
+0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x50,0x20,
+};
+
+static const BitmapCharRec ch226 = {6,10,-1,0,7,ch226data};
+
+/* char: 0xe1 */
+
+static const GLubyte ch225data[] = {
+0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x20,0x10,
+};
+
+static const BitmapCharRec ch225 = {6,10,-1,0,7,ch225data};
+
+/* char: 0xe0 */
+
+static const GLubyte ch224data[] = {
+0x74,0x88,0x88,0x78,0x8,0x88,0x70,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch224 = {6,10,-1,0,7,ch224data};
+
+/* char: 0xdf */
+
+static const GLubyte ch223data[] = {
+0xb0,0x88,0x88,0x88,0xb0,0x88,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch223 = {5,9,-1,0,7,ch223data};
+
+/* char: 0xde */
+
+static const GLubyte ch222data[] = {
+0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,0x80,0x80,
+};
+
+static const BitmapCharRec ch222 = {6,9,-1,0,8,ch222data};
+
+/* char: 0xdd */
+
+static const GLubyte ch221data[] = {
+0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch221 = {7,12,-1,0,9,ch221data};
+
+/* char: 0xdc */
+
+static const GLubyte ch220data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x48,
+};
+
+static const BitmapCharRec ch220 = {6,11,-1,0,8,ch220data};
+
+/* char: 0xdb */
+
+static const GLubyte ch219data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x28,0x10,
+};
+
+static const BitmapCharRec ch219 = {6,12,-1,0,8,ch219data};
+
+/* char: 0xda */
+
+static const GLubyte ch218data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch218 = {6,12,-1,0,8,ch218data};
+
+/* char: 0xd9 */
+
+static const GLubyte ch217data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch217 = {6,12,-1,0,8,ch217data};
+
+/* char: 0xd8 */
+
+static const GLubyte ch216data[] = {
+0x80,0x0,0x5e,0x0,0x21,0x0,0x50,0x80,0x48,0x80,0x44,0x80,0x44,0x80,0x42,0x80,
+0x21,0x0,0x1e,0x80,0x0,0x40,
+};
+
+static const BitmapCharRec ch216 = {10,11,0,1,10,ch216data};
+
+/* char: 0xd7 */
+
+static const GLubyte ch215data[] = {
+0x88,0x50,0x20,0x50,0x88,
+};
+
+static const BitmapCharRec ch215 = {5,5,-1,-1,7,ch215data};
+
+/* char: 0xd6 */
+
+static const GLubyte ch214data[] = {
+0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x24,
+};
+
+static const BitmapCharRec ch214 = {8,11,-1,0,10,ch214data};
+
+/* char: 0xd5 */
+
+static const GLubyte ch213data[] = {
+0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x28,0x14,
+};
+
+static const BitmapCharRec ch213 = {8,12,-1,0,10,ch213data};
+
+/* char: 0xd4 */
+
+static const GLubyte ch212data[] = {
+0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x14,0x8,
+};
+
+static const BitmapCharRec ch212 = {8,12,-1,0,10,ch212data};
+
+/* char: 0xd3 */
+
+static const GLubyte ch211data[] = {
+0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x4,
+};
+
+static const BitmapCharRec ch211 = {8,12,-1,0,10,ch211data};
+
+/* char: 0xd2 */
+
+static const GLubyte ch210data[] = {
+0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,0x0,0x8,0x10,
+};
+
+static const BitmapCharRec ch210 = {8,12,-1,0,10,ch210data};
+
+/* char: 0xd1 */
+
+static const GLubyte ch209data[] = {
+0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,0x0,0x28,0x14,
+};
+
+static const BitmapCharRec ch209 = {7,12,-1,0,9,ch209data};
+
+/* char: 0xd0 */
+
+static const GLubyte ch208data[] = {
+0x7c,0x42,0x41,0x41,0xf1,0x41,0x41,0x42,0x7c,
+};
+
+static const BitmapCharRec ch208 = {8,9,0,0,9,ch208data};
+
+/* char: 0xcf */
+
+static const GLubyte ch207data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,
+};
+
+static const BitmapCharRec ch207 = {3,11,0,0,3,ch207data};
+
+/* char: 0xce */
+
+static const GLubyte ch206data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0xa0,0x40,
+};
+
+static const BitmapCharRec ch206 = {3,12,0,0,3,ch206data};
+
+/* char: 0xcd */
+
+static const GLubyte ch205data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,0x40,
+};
+
+static const BitmapCharRec ch205 = {2,12,-1,0,3,ch205data};
+
+/* char: 0xcc */
+
+static const GLubyte ch204data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,0x80,
+};
+
+static const BitmapCharRec ch204 = {2,12,0,0,3,ch204data};
+
+/* char: 0xcb */
+
+static const GLubyte ch203data[] = {
+0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,
+};
+
+static const BitmapCharRec ch203 = {6,11,-1,0,8,ch203data};
+
+/* char: 0xca */
+
+static const GLubyte ch202data[] = {
+0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x28,0x10,
+};
+
+static const BitmapCharRec ch202 = {6,12,-1,0,8,ch202data};
+
+/* char: 0xc9 */
+
+static const GLubyte ch201data[] = {
+0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch201 = {6,12,-1,0,8,ch201data};
+
+/* char: 0xc8 */
+
+static const GLubyte ch200data[] = {
+0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch200 = {6,12,-1,0,8,ch200data};
+
+/* char: 0xc7 */
+
+static const GLubyte ch199data[] = {
+0x30,0x8,0x8,0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c,
+};
+
+static const BitmapCharRec ch199 = {7,12,-1,3,9,ch199data};
+
+/* char: 0xc6 */
+
+static const GLubyte ch198data[] = {
+0x8f,0x80,0x88,0x0,0x88,0x0,0x78,0x0,0x4f,0x80,0x48,0x0,0x28,0x0,0x28,0x0,
+0x1f,0x80,
+};
+
+static const BitmapCharRec ch198 = {9,9,-1,0,11,ch198data};
+
+/* char: 0xc5 */
+
+static const GLubyte ch197data[] = {
+0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x10,0x28,0x10,
+};
+
+static const BitmapCharRec ch197 = {7,12,-1,0,9,ch197data};
+
+/* char: 0xc4 */
+
+static const GLubyte ch196data[] = {
+0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,
+};
+
+static const BitmapCharRec ch196 = {7,11,-1,0,9,ch196data};
+
+/* char: 0xc3 */
+
+static const GLubyte ch195data[] = {
+0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x14,
+};
+
+static const BitmapCharRec ch195 = {7,12,-1,0,9,ch195data};
+
+/* char: 0xc2 */
+
+static const GLubyte ch194data[] = {
+0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x28,0x10,
+};
+
+static const BitmapCharRec ch194 = {7,12,-1,0,9,ch194data};
+
+/* char: 0xc1 */
+
+static const GLubyte ch193data[] = {
+0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x8,
+};
+
+static const BitmapCharRec ch193 = {7,12,-1,0,9,ch193data};
+
+/* char: 0xc0 */
+
+static const GLubyte ch192data[] = {
+0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x0,0x10,0x20,
+};
+
+static const BitmapCharRec ch192 = {7,12,-1,0,9,ch192data};
+
+/* char: 0xbf */
+
+static const GLubyte ch191data[] = {
+0x70,0x88,0x88,0x40,0x40,0x20,0x20,0x0,0x20,
+};
+
+static const BitmapCharRec ch191 = {5,9,-1,3,7,ch191data};
+
+/* char: 0xbe */
+
+static const GLubyte ch190data[] = {
+0x21,0x0,0x17,0x80,0x15,0x0,0xb,0x0,0xc9,0x0,0x24,0x0,0x44,0x0,0x22,0x0,
+0xe1,0x0,
+};
+
+static const BitmapCharRec ch190 = {9,9,0,0,10,ch190data};
+
+/* char: 0xbd */
+
+static const GLubyte ch189data[] = {
+0x47,0x80,0x22,0x0,0x11,0x0,0x14,0x80,0x4b,0x0,0x48,0x0,0x44,0x0,0xc2,0x0,
+0x41,0x0,
+};
+
+static const BitmapCharRec ch189 = {9,9,0,0,10,ch189data};
+
+/* char: 0xbc */
+
+static const GLubyte ch188data[] = {
+0x41,0x0,0x27,0x80,0x15,0x0,0x13,0x0,0x49,0x0,0x44,0x0,0x44,0x0,0xc2,0x0,
+0x41,0x0,
+};
+
+static const BitmapCharRec ch188 = {9,9,0,0,10,ch188data};
+
+/* char: 0xbb */
+
+static const GLubyte ch187data[] = {
+0xa0,0x50,0x28,0x50,0xa0,
+};
+
+static const BitmapCharRec ch187 = {5,5,-1,-1,7,ch187data};
+
+/* char: 0xba */
+
+static const GLubyte ch186data[] = {
+0xe0,0x0,0xe0,0xa0,0xe0,
+};
+
+static const BitmapCharRec ch186 = {3,5,-1,-4,5,ch186data};
+
+/* char: 0xb9 */
+
+static const GLubyte ch185data[] = {
+0x40,0x40,0x40,0xc0,0x40,
+};
+
+static const BitmapCharRec ch185 = {2,5,-1,-3,4,ch185data};
+
+/* char: 0xb8 */
+
+static const GLubyte ch184data[] = {
+0xc0,0x20,0x20,0x40,
+};
+
+static const BitmapCharRec ch184 = {3,4,0,3,3,ch184data};
+
+/* char: 0xb7 */
+
+static const GLubyte ch183data[] = {
+0x80,
+};
+
+static const BitmapCharRec ch183 = {1,1,-1,-3,3,ch183data};
+
+/* char: 0xb6 */
+
+static const GLubyte ch182data[] = {
+0x28,0x28,0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x68,0x3c,
+};
+
+static const BitmapCharRec ch182 = {6,12,0,3,7,ch182data};
+
+/* char: 0xb5 */
+
+static const GLubyte ch181data[] = {
+0x80,0x80,0x80,0xe8,0x98,0x88,0x88,0x88,0x88,0x88,
+};
+
+static const BitmapCharRec ch181 = {5,10,-1,3,7,ch181data};
+
+/* char: 0xb4 */
+
+static const GLubyte ch180data[] = {
+0x80,0x40,
+};
+
+static const BitmapCharRec ch180 = {2,2,0,-8,2,ch180data};
+
+/* char: 0xb3 */
+
+static const GLubyte ch179data[] = {
+0xc0,0x20,0x40,0x20,0xe0,
+};
+
+static const BitmapCharRec ch179 = {3,5,0,-3,4,ch179data};
+
+/* char: 0xb2 */
+
+static const GLubyte ch178data[] = {
+0xf0,0x40,0x20,0x90,0x60,
+};
+
+static const BitmapCharRec ch178 = {4,5,0,-3,4,ch178data};
+
+/* char: 0xb1 */
+
+static const GLubyte ch177data[] = {
+0xf8,0x0,0x20,0x20,0xf8,0x20,0x20,
+};
+
+static const BitmapCharRec ch177 = {5,7,-1,0,7,ch177data};
+
+/* char: 0xb0 */
+
+static const GLubyte ch176data[] = {
+0x60,0x90,0x90,0x60,
+};
+
+static const BitmapCharRec ch176 = {4,4,0,-4,5,ch176data};
+
+/* char: 0xaf */
+
+static const GLubyte ch175data[] = {
+0xf0,
+};
+
+static const BitmapCharRec ch175 = {4,1,0,-8,4,ch175data};
+
+/* char: 0xae */
+
+static const GLubyte ch174data[] = {
+0x3e,0x0,0x41,0x0,0x94,0x80,0x94,0x80,0x98,0x80,0x94,0x80,0x9c,0x80,0x41,0x0,
+0x3e,0x0,
+};
+
+static const BitmapCharRec ch174 = {9,9,-1,0,11,ch174data};
+
+/* char: 0xad */
+
+static const GLubyte ch173data[] = {
+0xf0,
+};
+
+static const BitmapCharRec ch173 = {4,1,0,-3,5,ch173data};
+
+/* char: 0xac */
+
+static const GLubyte ch172data[] = {
+0x4,0x4,0x4,0xfc,
+};
+
+static const BitmapCharRec ch172 = {6,4,-1,-2,8,ch172data};
+
+/* char: 0xab */
+
+static const GLubyte ch171data[] = {
+0x28,0x50,0xa0,0x50,0x28,
+};
+
+static const BitmapCharRec ch171 = {5,5,-1,-1,7,ch171data};
+
+/* char: 0xaa */
+
+static const GLubyte ch170data[] = {
+0xe0,0x0,0xa0,0x20,0xe0,
+};
+
+static const BitmapCharRec ch170 = {3,5,-1,-4,5,ch170data};
+
+/* char: 0xa9 */
+
+static const GLubyte ch169data[] = {
+0x3e,0x0,0x41,0x0,0x9c,0x80,0xa2,0x80,0xa0,0x80,0xa2,0x80,0x9c,0x80,0x41,0x0,
+0x3e,0x0,
+};
+
+static const BitmapCharRec ch169 = {9,9,-1,0,11,ch169data};
+
+/* char: 0xa8 */
+
+static const GLubyte ch168data[] = {
+0xa0,
+};
+
+static const BitmapCharRec ch168 = {3,1,0,-8,3,ch168data};
+
+/* char: 0xa7 */
+
+static const GLubyte ch167data[] = {
+0x70,0x88,0x8,0x30,0x48,0x88,0x88,0x90,0x60,0x80,0x88,0x70,
+};
+
+static const BitmapCharRec ch167 = {5,12,0,3,6,ch167data};
+
+/* char: 0xa6 */
+
+static const GLubyte ch166data[] = {
+0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch166 = {1,11,-1,2,3,ch166data};
+
+/* char: 0xa5 */
+
+static const GLubyte ch165data[] = {
+0x20,0x20,0xf8,0x20,0xf8,0x20,0x50,0x88,0x88,
+};
+
+static const BitmapCharRec ch165 = {5,9,-1,0,7,ch165data};
+
+/* char: 0xa4 */
+
+static const GLubyte ch164data[] = {
+0x84,0x78,0x48,0x48,0x78,0x84,
+};
+
+static const BitmapCharRec ch164 = {6,6,0,-1,7,ch164data};
+
+/* char: 0xa3 */
+
+static const GLubyte ch163data[] = {
+0xb0,0x48,0x20,0x20,0xf0,0x40,0x40,0x48,0x30,
+};
+
+static const BitmapCharRec ch163 = {5,9,-1,0,7,ch163data};
+
+/* char: 0xa2 */
+
+static const GLubyte ch162data[] = {
+0x40,0x70,0xc8,0xa0,0xa0,0xa0,0xa8,0x70,0x10,
+};
+
+static const BitmapCharRec ch162 = {5,9,-1,1,7,ch162data};
+
+/* char: 0xa1 */
+
+static const GLubyte ch161data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,
+};
+
+static const BitmapCharRec ch161 = {1,10,-1,3,3,ch161data};
+
+/* char: 0xa0 */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch160data[] = { 0x0 };
+static const BitmapCharRec ch160 = {1,1,0,0,4,ch160data};
+#else
+static const BitmapCharRec ch160 = {0,0,0,0,4,0};
+#endif
+
+/* char: 0x7e '~' */
+
+static const GLubyte ch126data[] = {
+0x98,0x64,
+};
+
+static const BitmapCharRec ch126 = {6,2,0,-3,7,ch126data};
+
+/* char: 0x7d '}' */
+
+static const GLubyte ch125data[] = {
+0xc0,0x20,0x20,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0xc0,
+};
+
+static const BitmapCharRec ch125 = {4,12,0,3,4,ch125data};
+
+/* char: 0x7c '|' */
+
+static const GLubyte ch124data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch124 = {1,12,-1,3,3,ch124data};
+
+/* char: 0x7b '{' */
+
+static const GLubyte ch123data[] = {
+0x30,0x40,0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x40,0x30,
+};
+
+static const BitmapCharRec ch123 = {4,12,0,3,4,ch123data};
+
+/* char: 0x7a 'z' */
+
+static const GLubyte ch122data[] = {
+0xf0,0x80,0x40,0x40,0x20,0x10,0xf0,
+};
+
+static const BitmapCharRec ch122 = {4,7,-1,0,6,ch122data};
+
+/* char: 0x79 'y' */
+
+static const GLubyte ch121data[] = {
+0x80,0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88,0x88,
+};
+
+static const BitmapCharRec ch121 = {5,10,-1,3,7,ch121data};
+
+/* char: 0x78 'x' */
+
+static const GLubyte ch120data[] = {
+0x84,0x84,0x48,0x30,0x30,0x48,0x84,
+};
+
+static const BitmapCharRec ch120 = {6,7,0,0,6,ch120data};
+
+/* char: 0x77 'w' */
+
+static const GLubyte ch119data[] = {
+0x22,0x0,0x22,0x0,0x55,0x0,0x49,0x0,0x49,0x0,0x88,0x80,0x88,0x80,
+};
+
+static const BitmapCharRec ch119 = {9,7,0,0,9,ch119data};
+
+/* char: 0x76 'v' */
+
+static const GLubyte ch118data[] = {
+0x20,0x20,0x50,0x50,0x88,0x88,0x88,
+};
+
+static const BitmapCharRec ch118 = {5,7,-1,0,7,ch118data};
+
+/* char: 0x75 'u' */
+
+static const GLubyte ch117data[] = {
+0x68,0x98,0x88,0x88,0x88,0x88,0x88,
+};
+
+static const BitmapCharRec ch117 = {5,7,-1,0,7,ch117data};
+
+/* char: 0x74 't' */
+
+static const GLubyte ch116data[] = {
+0x60,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x40,
+};
+
+static const BitmapCharRec ch116 = {3,9,0,0,3,ch116data};
+
+/* char: 0x73 's' */
+
+static const GLubyte ch115data[] = {
+0x60,0x90,0x10,0x60,0x80,0x90,0x60,
+};
+
+static const BitmapCharRec ch115 = {4,7,-1,0,6,ch115data};
+
+/* char: 0x72 'r' */
+
+static const GLubyte ch114data[] = {
+0x80,0x80,0x80,0x80,0x80,0xc0,0xa0,
+};
+
+static const BitmapCharRec ch114 = {3,7,-1,0,4,ch114data};
+
+/* char: 0x71 'q' */
+
+static const GLubyte ch113data[] = {
+0x8,0x8,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68,
+};
+
+static const BitmapCharRec ch113 = {5,10,-1,3,7,ch113data};
+
+/* char: 0x70 'p' */
+
+static const GLubyte ch112data[] = {
+0x80,0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,
+};
+
+static const BitmapCharRec ch112 = {5,10,-1,3,7,ch112data};
+
+/* char: 0x6f 'o' */
+
+static const GLubyte ch111data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch111 = {5,7,-1,0,7,ch111data};
+
+/* char: 0x6e 'n' */
+
+static const GLubyte ch110data[] = {
+0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,
+};
+
+static const BitmapCharRec ch110 = {5,7,-1,0,7,ch110data};
+
+/* char: 0x6d 'm' */
+
+static const GLubyte ch109data[] = {
+0x92,0x92,0x92,0x92,0x92,0xda,0xa4,
+};
+
+static const BitmapCharRec ch109 = {7,7,-1,0,9,ch109data};
+
+/* char: 0x6c 'l' */
+
+static const GLubyte ch108data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch108 = {1,9,-1,0,3,ch108data};
+
+/* char: 0x6b 'k' */
+
+static const GLubyte ch107data[] = {
+0x88,0x90,0xa0,0xc0,0xc0,0xa0,0x90,0x80,0x80,
+};
+
+static const BitmapCharRec ch107 = {5,9,-1,0,6,ch107data};
+
+/* char: 0x6a 'j' */
+
+static const GLubyte ch106data[] = {
+0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x0,0x40,
+};
+
+static const BitmapCharRec ch106 = {2,12,0,3,3,ch106data};
+
+/* char: 0x69 'i' */
+
+static const GLubyte ch105data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x0,0x80,
+};
+
+static const BitmapCharRec ch105 = {1,9,-1,0,3,ch105data};
+
+/* char: 0x68 'h' */
+
+static const GLubyte ch104data[] = {
+0x88,0x88,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,
+};
+
+static const BitmapCharRec ch104 = {5,9,-1,0,7,ch104data};
+
+/* char: 0x67 'g' */
+
+static const GLubyte ch103data[] = {
+0x70,0x88,0x8,0x68,0x98,0x88,0x88,0x88,0x98,0x68,
+};
+
+static const BitmapCharRec ch103 = {5,10,-1,3,7,ch103data};
+
+/* char: 0x66 'f' */
+
+static const GLubyte ch102data[] = {
+0x40,0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30,
+};
+
+static const BitmapCharRec ch102 = {4,9,0,0,3,ch102data};
+
+/* char: 0x65 'e' */
+
+static const GLubyte ch101data[] = {
+0x70,0x88,0x80,0xf8,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch101 = {5,7,-1,0,7,ch101data};
+
+/* char: 0x64 'd' */
+
+static const GLubyte ch100data[] = {
+0x68,0x98,0x88,0x88,0x88,0x98,0x68,0x8,0x8,
+};
+
+static const BitmapCharRec ch100 = {5,9,-1,0,7,ch100data};
+
+/* char: 0x63 'c' */
+
+static const GLubyte ch99data[] = {
+0x70,0x88,0x80,0x80,0x80,0x88,0x70,
+};
+
+static const BitmapCharRec ch99 = {5,7,-1,0,7,ch99data};
+
+/* char: 0x62 'b' */
+
+static const GLubyte ch98data[] = {
+0xb0,0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80,
+};
+
+static const BitmapCharRec ch98 = {5,9,-1,0,7,ch98data};
+
+/* char: 0x61 'a' */
+
+static const GLubyte ch97data[] = {
+0x74,0x88,0x88,0x78,0x8,0x88,0x70,
+};
+
+static const BitmapCharRec ch97 = {6,7,-1,0,7,ch97data};
+
+/* char: 0x60 '`' */
+
+static const GLubyte ch96data[] = {
+0xc0,0x80,0x40,
+};
+
+static const BitmapCharRec ch96 = {2,3,0,-6,3,ch96data};
+
+/* char: 0x5f '_' */
+
+static const GLubyte ch95data[] = {
+0xfe,
+};
+
+static const BitmapCharRec ch95 = {7,1,0,2,7,ch95data};
+
+/* char: 0x5e '^' */
+
+static const GLubyte ch94data[] = {
+0x88,0x50,0x20,
+};
+
+static const BitmapCharRec ch94 = {5,3,0,-5,6,ch94data};
+
+/* char: 0x5d ']' */
+
+static const GLubyte ch93data[] = {
+0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0,
+};
+
+static const BitmapCharRec ch93 = {2,12,0,3,3,ch93data};
+
+/* char: 0x5c '\' */
+
+static const GLubyte ch92data[] = {
+0x10,0x10,0x20,0x20,0x20,0x40,0x40,0x80,0x80,
+};
+
+static const BitmapCharRec ch92 = {4,9,0,0,4,ch92data};
+
+/* char: 0x5b '[' */
+
+static const GLubyte ch91data[] = {
+0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0,
+};
+
+static const BitmapCharRec ch91 = {2,12,-1,3,3,ch91data};
+
+/* char: 0x5a 'Z' */
+
+static const GLubyte ch90data[] = {
+0xfe,0x80,0x40,0x20,0x10,0x8,0x4,0x2,0xfe,
+};
+
+static const BitmapCharRec ch90 = {7,9,-1,0,9,ch90data};
+
+/* char: 0x59 'Y' */
+
+static const GLubyte ch89data[] = {
+0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch89 = {7,9,-1,0,9,ch89data};
+
+/* char: 0x58 'X' */
+
+static const GLubyte ch88data[] = {
+0x82,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x82,
+};
+
+static const BitmapCharRec ch88 = {7,9,-1,0,9,ch88data};
+
+/* char: 0x57 'W' */
+
+static const GLubyte ch87data[] = {
+0x22,0x0,0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0x49,0x0,0x88,0x80,0x88,0x80,
+0x88,0x80,
+};
+
+static const BitmapCharRec ch87 = {9,9,-1,0,11,ch87data};
+
+/* char: 0x56 'V' */
+
+static const GLubyte ch86data[] = {
+0x10,0x10,0x28,0x28,0x44,0x44,0x44,0x82,0x82,
+};
+
+static const BitmapCharRec ch86 = {7,9,-1,0,9,ch86data};
+
+/* char: 0x55 'U' */
+
+static const GLubyte ch85data[] = {
+0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+};
+
+static const BitmapCharRec ch85 = {6,9,-1,0,8,ch85data};
+
+/* char: 0x54 'T' */
+
+static const GLubyte ch84data[] = {
+0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xfe,
+};
+
+static const BitmapCharRec ch84 = {7,9,0,0,7,ch84data};
+
+/* char: 0x53 'S' */
+
+static const GLubyte ch83data[] = {
+0x78,0x84,0x84,0x4,0x18,0x60,0x80,0x84,0x78,
+};
+
+static const BitmapCharRec ch83 = {6,9,-1,0,8,ch83data};
+
+/* char: 0x52 'R' */
+
+static const GLubyte ch82data[] = {
+0x84,0x84,0x84,0x88,0xf8,0x84,0x84,0x84,0xf8,
+};
+
+static const BitmapCharRec ch82 = {6,9,-1,0,8,ch82data};
+
+/* char: 0x51 'Q' */
+
+static const GLubyte ch81data[] = {
+0x3d,0x42,0x85,0x89,0x81,0x81,0x81,0x42,0x3c,
+};
+
+static const BitmapCharRec ch81 = {8,9,-1,0,10,ch81data};
+
+/* char: 0x50 'P' */
+
+static const GLubyte ch80data[] = {
+0x80,0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0xf8,
+};
+
+static const BitmapCharRec ch80 = {6,9,-1,0,8,ch80data};
+
+/* char: 0x4f 'O' */
+
+static const GLubyte ch79data[] = {
+0x3c,0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c,
+};
+
+static const BitmapCharRec ch79 = {8,9,-1,0,10,ch79data};
+
+/* char: 0x4e 'N' */
+
+static const GLubyte ch78data[] = {
+0x82,0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82,
+};
+
+static const BitmapCharRec ch78 = {7,9,-1,0,9,ch78data};
+
+/* char: 0x4d 'M' */
+
+static const GLubyte ch77data[] = {
+0x88,0x80,0x88,0x80,0x94,0x80,0x94,0x80,0xa2,0x80,0xa2,0x80,0xc1,0x80,0xc1,0x80,
+0x80,0x80,
+};
+
+static const BitmapCharRec ch77 = {9,9,-1,0,11,ch77data};
+
+/* char: 0x4c 'L' */
+
+static const GLubyte ch76data[] = {
+0xf8,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch76 = {5,9,-1,0,7,ch76data};
+
+/* char: 0x4b 'K' */
+
+static const GLubyte ch75data[] = {
+0x82,0x84,0x88,0x90,0xe0,0xa0,0x90,0x88,0x84,
+};
+
+static const BitmapCharRec ch75 = {7,9,-1,0,8,ch75data};
+
+/* char: 0x4a 'J' */
+
+static const GLubyte ch74data[] = {
+0x70,0x88,0x88,0x8,0x8,0x8,0x8,0x8,0x8,
+};
+
+static const BitmapCharRec ch74 = {5,9,-1,0,7,ch74data};
+
+/* char: 0x49 'I' */
+
+static const GLubyte ch73data[] = {
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch73 = {1,9,-1,0,3,ch73data};
+
+/* char: 0x48 'H' */
+
+static const GLubyte ch72data[] = {
+0x82,0x82,0x82,0x82,0xfe,0x82,0x82,0x82,0x82,
+};
+
+static const BitmapCharRec ch72 = {7,9,-1,0,9,ch72data};
+
+/* char: 0x47 'G' */
+
+static const GLubyte ch71data[] = {
+0x3a,0x46,0x82,0x82,0x8e,0x80,0x80,0x42,0x3c,
+};
+
+static const BitmapCharRec ch71 = {7,9,-1,0,9,ch71data};
+
+/* char: 0x46 'F' */
+
+static const GLubyte ch70data[] = {
+0x80,0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0xfc,
+};
+
+static const BitmapCharRec ch70 = {6,9,-1,0,8,ch70data};
+
+/* char: 0x45 'E' */
+
+static const GLubyte ch69data[] = {
+0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80,0xfc,
+};
+
+static const BitmapCharRec ch69 = {6,9,-1,0,8,ch69data};
+
+/* char: 0x44 'D' */
+
+static const GLubyte ch68data[] = {
+0xf8,0x84,0x82,0x82,0x82,0x82,0x82,0x84,0xf8,
+};
+
+static const BitmapCharRec ch68 = {7,9,-1,0,9,ch68data};
+
+/* char: 0x43 'C' */
+
+static const GLubyte ch67data[] = {
+0x3c,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c,
+};
+
+static const BitmapCharRec ch67 = {7,9,-1,0,9,ch67data};
+
+/* char: 0x42 'B' */
+
+static const GLubyte ch66data[] = {
+0xf8,0x84,0x84,0x84,0xf8,0x84,0x84,0x84,0xf8,
+};
+
+static const BitmapCharRec ch66 = {6,9,-1,0,8,ch66data};
+
+/* char: 0x41 'A' */
+
+static const GLubyte ch65data[] = {
+0x82,0x82,0x82,0x7c,0x44,0x44,0x28,0x28,0x10,
+};
+
+static const BitmapCharRec ch65 = {7,9,-1,0,9,ch65data};
+
+/* char: 0x40 '@' */
+
+static const GLubyte ch64data[] = {
+0x3e,0x0,0x40,0x0,0x9b,0x0,0xa6,0x80,0xa2,0x40,0xa2,0x40,0x92,0x40,0x4d,0x40,
+0x60,0x80,0x1f,0x0,
+};
+
+static const BitmapCharRec ch64 = {10,10,-1,1,12,ch64data};
+
+/* char: 0x3f '?' */
+
+static const GLubyte ch63data[] = {
+0x20,0x0,0x20,0x20,0x10,0x10,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch63 = {5,9,-1,0,7,ch63data};
+
+/* char: 0x3e '>' */
+
+static const GLubyte ch62data[] = {
+0xc0,0x30,0xc,0x30,0xc0,
+};
+
+static const BitmapCharRec ch62 = {6,5,-1,-1,7,ch62data};
+
+/* char: 0x3d '=' */
+
+static const GLubyte ch61data[] = {
+0xf8,0x0,0xf8,
+};
+
+static const BitmapCharRec ch61 = {5,3,-1,-2,7,ch61data};
+
+/* char: 0x3c '<' */
+
+static const GLubyte ch60data[] = {
+0xc,0x30,0xc0,0x30,0xc,
+};
+
+static const BitmapCharRec ch60 = {6,5,0,-1,7,ch60data};
+
+/* char: 0x3b ';' */
+
+static const GLubyte ch59data[] = {
+0x80,0x40,0x40,0x0,0x0,0x0,0x0,0x40,
+};
+
+static const BitmapCharRec ch59 = {2,8,0,2,3,ch59data};
+
+/* char: 0x3a ':' */
+
+static const GLubyte ch58data[] = {
+0x80,0x0,0x0,0x0,0x0,0x80,
+};
+
+static const BitmapCharRec ch58 = {1,6,-1,0,3,ch58data};
+
+/* char: 0x39 '9' */
+
+static const GLubyte ch57data[] = {
+0x70,0x88,0x8,0x8,0x78,0x88,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch57 = {5,9,-1,0,7,ch57data};
+
+/* char: 0x38 '8' */
+
+static const GLubyte ch56data[] = {
+0x70,0x88,0x88,0x88,0x88,0x70,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch56 = {5,9,-1,0,7,ch56data};
+
+/* char: 0x37 '7' */
+
+static const GLubyte ch55data[] = {
+0x40,0x40,0x20,0x20,0x20,0x10,0x10,0x8,0xf8,
+};
+
+static const BitmapCharRec ch55 = {5,9,-1,0,7,ch55data};
+
+/* char: 0x36 '6' */
+
+static const GLubyte ch54data[] = {
+0x70,0x88,0x88,0x88,0xc8,0xb0,0x80,0x88,0x70,
+};
+
+static const BitmapCharRec ch54 = {5,9,-1,0,7,ch54data};
+
+/* char: 0x35 '5' */
+
+static const GLubyte ch53data[] = {
+0x70,0x88,0x88,0x8,0x8,0xf0,0x80,0x80,0xf8,
+};
+
+static const BitmapCharRec ch53 = {5,9,-1,0,7,ch53data};
+
+/* char: 0x34 '4' */
+
+static const GLubyte ch52data[] = {
+0x8,0x8,0xfc,0x88,0x48,0x28,0x28,0x18,0x8,
+};
+
+static const BitmapCharRec ch52 = {6,9,0,0,7,ch52data};
+
+/* char: 0x33 '3' */
+
+static const GLubyte ch51data[] = {
+0x70,0x88,0x88,0x8,0x8,0x30,0x8,0x88,0x70,
+};
+
+static const BitmapCharRec ch51 = {5,9,-1,0,7,ch51data};
+
+/* char: 0x32 '2' */
+
+static const GLubyte ch50data[] = {
+0xf8,0x80,0x80,0x40,0x20,0x10,0x8,0x88,0x70,
+};
+
+static const BitmapCharRec ch50 = {5,9,-1,0,7,ch50data};
+
+/* char: 0x31 '1' */
+
+static const GLubyte ch49data[] = {
+0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x20,
+};
+
+static const BitmapCharRec ch49 = {3,9,-1,0,7,ch49data};
+
+/* char: 0x30 '0' */
+
+static const GLubyte ch48data[] = {
+0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x70,
+};
+
+static const BitmapCharRec ch48 = {5,9,-1,0,7,ch48data};
+
+/* char: 0x2f '/' */
+
+static const GLubyte ch47data[] = {
+0x80,0x80,0x40,0x40,0x40,0x20,0x20,0x10,0x10,
+};
+
+static const BitmapCharRec ch47 = {4,9,0,0,4,ch47data};
+
+/* char: 0x2e '.' */
+
+static const GLubyte ch46data[] = {
+0x80,
+};
+
+static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data};
+
+/* char: 0x2d '-' */
+
+static const GLubyte ch45data[] = {
+0xf8,
+};
+
+static const BitmapCharRec ch45 = {5,1,-1,-3,8,ch45data};
+
+/* char: 0x2c ',' */
+
+static const GLubyte ch44data[] = {
+0x80,0x40,0x40,
+};
+
+static const BitmapCharRec ch44 = {2,3,-1,2,4,ch44data};
+
+/* char: 0x2b '+' */
+
+static const GLubyte ch43data[] = {
+0x20,0x20,0xf8,0x20,0x20,
+};
+
+static const BitmapCharRec ch43 = {5,5,-1,-1,7,ch43data};
+
+/* char: 0x2a '*' */
+
+static const GLubyte ch42data[] = {
+0xa0,0x40,0xa0,
+};
+
+static const BitmapCharRec ch42 = {3,3,-1,-6,5,ch42data};
+
+/* char: 0x29 ')' */
+
+static const GLubyte ch41data[] = {
+0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x40,0x40,0x80,
+};
+
+static const BitmapCharRec ch41 = {3,12,0,3,4,ch41data};
+
+/* char: 0x28 '(' */
+
+static const GLubyte ch40data[] = {
+0x20,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20,
+};
+
+static const BitmapCharRec ch40 = {3,12,-1,3,4,ch40data};
+
+/* char: 0x27 ''' */
+
+static const GLubyte ch39data[] = {
+0x80,0x40,0xc0,
+};
+
+static const BitmapCharRec ch39 = {2,3,-1,-6,3,ch39data};
+
+/* char: 0x26 '&' */
+
+static const GLubyte ch38data[] = {
+0x72,0x8c,0x84,0x8a,0x50,0x30,0x48,0x48,0x30,
+};
+
+static const BitmapCharRec ch38 = {7,9,-1,0,9,ch38data};
+
+/* char: 0x25 '%' */
+
+static const GLubyte ch37data[] = {
+0x23,0x0,0x14,0x80,0x14,0x80,0x13,0x0,0x8,0x0,0x68,0x0,0x94,0x0,0x94,0x0,
+0x62,0x0,
+};
+
+static const BitmapCharRec ch37 = {9,9,-1,0,11,ch37data};
+
+/* char: 0x24 '$' */
+
+static const GLubyte ch36data[] = {
+0x20,0x70,0xa8,0xa8,0x28,0x70,0xa0,0xa8,0x70,0x20,
+};
+
+static const BitmapCharRec ch36 = {5,10,-1,1,7,ch36data};
+
+/* char: 0x23 '#' */
+
+static const GLubyte ch35data[] = {
+0x50,0x50,0x50,0xfc,0x28,0xfc,0x28,0x28,
+};
+
+static const BitmapCharRec ch35 = {6,8,0,0,7,ch35data};
+
+/* char: 0x22 '"' */
+
+static const GLubyte ch34data[] = {
+0xa0,0xa0,0xa0,
+};
+
+static const BitmapCharRec ch34 = {3,3,-1,-6,5,ch34data};
+
+/* char: 0x21 '!' */
+
+static const GLubyte ch33data[] = {
+0x80,0x0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+};
+
+static const BitmapCharRec ch33 = {1,9,-1,0,3,ch33data};
+
+/* char: 0x20 ' ' */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch32data[] = { 0x0 };
+static const BitmapCharRec ch32 = {1,1,0,0,4,ch32data};
+#else
+static const BitmapCharRec ch32 = {0,0,0,0,4,0};
+#endif
+
+static const BitmapCharRec * const chars[] = {
+&ch32,
+&ch33,
+&ch34,
+&ch35,
+&ch36,
+&ch37,
+&ch38,
+&ch39,
+&ch40,
+&ch41,
+&ch42,
+&ch43,
+&ch44,
+&ch45,
+&ch46,
+&ch47,
+&ch48,
+&ch49,
+&ch50,
+&ch51,
+&ch52,
+&ch53,
+&ch54,
+&ch55,
+&ch56,
+&ch57,
+&ch58,
+&ch59,
+&ch60,
+&ch61,
+&ch62,
+&ch63,
+&ch64,
+&ch65,
+&ch66,
+&ch67,
+&ch68,
+&ch69,
+&ch70,
+&ch71,
+&ch72,
+&ch73,
+&ch74,
+&ch75,
+&ch76,
+&ch77,
+&ch78,
+&ch79,
+&ch80,
+&ch81,
+&ch82,
+&ch83,
+&ch84,
+&ch85,
+&ch86,
+&ch87,
+&ch88,
+&ch89,
+&ch90,
+&ch91,
+&ch92,
+&ch93,
+&ch94,
+&ch95,
+&ch96,
+&ch97,
+&ch98,
+&ch99,
+&ch100,
+&ch101,
+&ch102,
+&ch103,
+&ch104,
+&ch105,
+&ch106,
+&ch107,
+&ch108,
+&ch109,
+&ch110,
+&ch111,
+&ch112,
+&ch113,
+&ch114,
+&ch115,
+&ch116,
+&ch117,
+&ch118,
+&ch119,
+&ch120,
+&ch121,
+&ch122,
+&ch123,
+&ch124,
+&ch125,
+&ch126,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+&ch160,
+&ch161,
+&ch162,
+&ch163,
+&ch164,
+&ch165,
+&ch166,
+&ch167,
+&ch168,
+&ch169,
+&ch170,
+&ch171,
+&ch172,
+&ch173,
+&ch174,
+&ch175,
+&ch176,
+&ch177,
+&ch178,
+&ch179,
+&ch180,
+&ch181,
+&ch182,
+&ch183,
+&ch184,
+&ch185,
+&ch186,
+&ch187,
+&ch188,
+&ch189,
+&ch190,
+&ch191,
+&ch192,
+&ch193,
+&ch194,
+&ch195,
+&ch196,
+&ch197,
+&ch198,
+&ch199,
+&ch200,
+&ch201,
+&ch202,
+&ch203,
+&ch204,
+&ch205,
+&ch206,
+&ch207,
+&ch208,
+&ch209,
+&ch210,
+&ch211,
+&ch212,
+&ch213,
+&ch214,
+&ch215,
+&ch216,
+&ch217,
+&ch218,
+&ch219,
+&ch220,
+&ch221,
+&ch222,
+&ch223,
+&ch224,
+&ch225,
+&ch226,
+&ch227,
+&ch228,
+&ch229,
+&ch230,
+&ch231,
+&ch232,
+&ch233,
+&ch234,
+&ch235,
+&ch236,
+&ch237,
+&ch238,
+&ch239,
+&ch240,
+&ch241,
+&ch242,
+&ch243,
+&ch244,
+&ch245,
+&ch246,
+&ch247,
+&ch248,
+&ch249,
+&ch250,
+&ch251,
+&ch252,
+&ch253,
+&ch254,
+&ch255,
+};
+
+#if !defined(__IBMCPP__)
+const 
+#endif
+BitmapFontRec glutBitmapHelvetica12 = {
+"-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1",
+224,
+32,
+chars
+};
+
index 26f88ec505d0ba0ed10a8e9b00d8a2da157565c4..8fe76332b2864d48b2aadadc68599cfa209765ee 100644 (file)
-\r
-/* GENERATED FILE -- DO NOT MODIFY */\r
-\r
-#define glutBitmapHelvetica18 XXX\r
-#include "glutbitmap.h"\r
-#undef glutBitmapHelvetica18\r
-\r
-/* char: 0xff */\r
-\r
-static const GLubyte ch255data[] = {\r
-0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x66,\r
-0x66,\r
-};\r
-\r
-static const BitmapCharRec ch255 = {8,17,-1,4,10,ch255data};\r
-\r
-/* char: 0xfe */\r
-\r
-static const GLubyte ch254data[] = {\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,\r
-0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,\r
-0xc0,0x0,0xc0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch254 = {9,18,-1,4,11,ch254data};\r
-\r
-/* char: 0xfd */\r
-\r
-static const GLubyte ch253data[] = {\r
-0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x18,\r
-0xc,0x6,\r
-};\r
-\r
-static const BitmapCharRec ch253 = {8,18,-1,4,10,ch253data};\r
-\r
-/* char: 0xfc */\r
-\r
-static const GLubyte ch252data[] = {\r
-0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x66,\r
-};\r
-\r
-static const BitmapCharRec ch252 = {8,13,-1,0,10,ch252data};\r
-\r
-/* char: 0xfb */\r
-\r
-static const GLubyte ch251data[] = {\r
-0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x3c,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch251 = {8,14,-1,0,10,ch251data};\r
-\r
-/* char: 0xfa */\r
-\r
-static const GLubyte ch250data[] = {\r
-0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x18,0xc,0x6,\r
-};\r
-\r
-static const BitmapCharRec ch250 = {8,14,-1,0,10,ch250data};\r
-\r
-/* char: 0xf9 */\r
-\r
-static const GLubyte ch249data[] = {\r
-0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0xc,0x18,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch249 = {8,14,-1,0,10,ch249data};\r
-\r
-/* char: 0xf8 */\r
-\r
-static const GLubyte ch248data[] = {\r
-0xce,0x0,0x7f,0x80,0x31,0x80,0x78,0xc0,0x6c,0xc0,0x66,0xc0,0x63,0xc0,0x31,0x80,\r
-0x3f,0xc0,0xe,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch248 = {11,10,0,0,11,ch248data};\r
-\r
-/* char: 0xf7 */\r
-\r
-static const GLubyte ch247data[] = {\r
-0x18,0x18,0x0,0xff,0xff,0x0,0x18,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch247 = {8,8,-1,-1,10,ch247data};\r
-\r
-/* char: 0xf6 */\r
-\r
-static const GLubyte ch246data[] = {\r
-0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,\r
-0x7f,0x0,0x3e,0x0,0x0,0x0,0x36,0x0,0x36,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch246 = {9,13,-1,0,11,ch246data};\r
-\r
-/* char: 0xf5 */\r
-\r
-static const GLubyte ch245data[] = {\r
-0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,\r
-0x7f,0x0,0x3e,0x0,0x0,0x0,0x26,0x0,0x2d,0x0,0x19,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch245 = {9,14,-1,0,11,ch245data};\r
-\r
-/* char: 0xf4 */\r
-\r
-static const GLubyte ch244data[] = {\r
-0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,\r
-0x7f,0x0,0x3e,0x0,0x0,0x0,0x33,0x0,0x1e,0x0,0xc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch244 = {9,14,-1,0,11,ch244data};\r
-\r
-/* char: 0xf3 */\r
-\r
-static const GLubyte ch243data[] = {\r
-0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,\r
-0x7f,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0xc,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch243 = {9,14,-1,0,11,ch243data};\r
-\r
-/* char: 0xf2 */\r
-\r
-static const GLubyte ch242data[] = {\r
-0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,\r
-0x7f,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x18,0x0,0x30,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch242 = {9,14,-1,0,11,ch242data};\r
-\r
-/* char: 0xf1 */\r
-\r
-static const GLubyte ch241data[] = {\r
-0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0x0,0x4c,0x5a,0x32,\r
-};\r
-\r
-static const BitmapCharRec ch241 = {8,14,-1,0,10,ch241data};\r
-\r
-/* char: 0xf0 */\r
-\r
-static const GLubyte ch240data[] = {\r
-0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,\r
-0x7f,0x0,0x3e,0x0,0x4c,0x0,0x38,0x0,0x36,0x0,0x60,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch240 = {9,14,-1,0,11,ch240data};\r
-\r
-/* char: 0xef */\r
-\r
-static const GLubyte ch239data[] = {\r
-0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xd8,0xd8,\r
-};\r
-\r
-static const BitmapCharRec ch239 = {5,13,0,0,4,ch239data};\r
-\r
-/* char: 0xee */\r
-\r
-static const GLubyte ch238data[] = {\r
-0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,0x78,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch238 = {6,14,1,0,4,ch238data};\r
-\r
-/* char: 0xed */\r
-\r
-static const GLubyte ch237data[] = {\r
-0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xc0,0x60,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch237 = {4,14,0,0,4,ch237data};\r
-\r
-/* char: 0xec */\r
-\r
-static const GLubyte ch236data[] = {\r
-0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0x30,0x60,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch236 = {4,14,0,0,4,ch236data};\r
-\r
-/* char: 0xeb */\r
-\r
-static const GLubyte ch235data[] = {\r
-0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x36,0x36,\r
-};\r
-\r
-static const BitmapCharRec ch235 = {8,13,-1,0,10,ch235data};\r
-\r
-/* char: 0xea */\r
-\r
-static const GLubyte ch234data[] = {\r
-0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x66,0x3c,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch234 = {8,14,-1,0,10,ch234data};\r
-\r
-/* char: 0xe9 */\r
-\r
-static const GLubyte ch233data[] = {\r
-0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0xc,0x6,\r
-};\r
-\r
-static const BitmapCharRec ch233 = {8,14,-1,0,10,ch233data};\r
-\r
-/* char: 0xe8 */\r
-\r
-static const GLubyte ch232data[] = {\r
-0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0x30,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch232 = {8,14,-1,0,10,ch232data};\r
-\r
-/* char: 0xe7 */\r
-\r
-static const GLubyte ch231data[] = {\r
-0x78,0x6c,0xc,0x38,0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e,\r
-};\r
-\r
-static const BitmapCharRec ch231 = {8,14,-1,4,10,ch231data};\r
-\r
-/* char: 0xe6 */\r
-\r
-static const GLubyte ch230data[] = {\r
-0x75,0xe0,0xef,0xf8,0xc7,0x18,0xc6,0x0,0xe6,0x0,0x7f,0xf8,0xe,0x18,0xc6,0x18,\r
-0xef,0xf0,0x7d,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch230 = {13,10,-1,0,15,ch230data};\r
-\r
-/* char: 0xe5 */\r
-\r
-static const GLubyte ch229data[] = {\r
-0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x38,0x6c,0x6c,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch229 = {7,14,-1,0,9,ch229data};\r
-\r
-/* char: 0xe4 */\r
-\r
-static const GLubyte ch228data[] = {\r
-0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x6c,0x6c,\r
-};\r
-\r
-static const BitmapCharRec ch228 = {7,13,-1,0,9,ch228data};\r
-\r
-/* char: 0xe3 */\r
-\r
-static const GLubyte ch227data[] = {\r
-0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x4c,0x5a,0x32,\r
-};\r
-\r
-static const BitmapCharRec ch227 = {7,14,-1,0,9,ch227data};\r
-\r
-/* char: 0xe2 */\r
-\r
-static const GLubyte ch226data[] = {\r
-0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x66,0x3c,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch226 = {7,14,-1,0,9,ch226data};\r
-\r
-/* char: 0xe1 */\r
-\r
-static const GLubyte ch225data[] = {\r
-0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x30,0x18,0xc,\r
-};\r
-\r
-static const BitmapCharRec ch225 = {7,14,-1,0,9,ch225data};\r
-\r
-/* char: 0xe0 */\r
-\r
-static const GLubyte ch224data[] = {\r
-0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x18,0x30,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch224 = {7,14,-1,0,9,ch224data};\r
-\r
-/* char: 0xdf */\r
-\r
-static const GLubyte ch223data[] = {\r
-0xdc,0xde,0xc6,0xc6,0xc6,0xc6,0xdc,0xdc,0xc6,0xc6,0xc6,0xc6,0x7c,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch223 = {7,14,-1,0,9,ch223data};\r
-\r
-/* char: 0xde */\r
-\r
-static const GLubyte ch222data[] = {\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc1,0xc0,0xff,0x80,0xff,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch222 = {10,14,-1,0,12,ch222data};\r
-\r
-/* char: 0xdd */\r
-\r
-static const GLubyte ch221data[] = {\r
-0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80,\r
-0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,0x0,0x0,0x6,0x0,\r
-0x3,0x0,0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch221 = {12,18,-1,0,14,ch221data};\r
-\r
-/* char: 0xdc */\r
-\r
-static const GLubyte ch220data[] = {\r
-0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80,\r
-0x19,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch220 = {11,17,-1,0,13,ch220data};\r
-\r
-/* char: 0xdb */\r
-\r
-static const GLubyte ch219data[] = {\r
-0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80,\r
-0xf,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch219 = {11,18,-1,0,13,ch219data};\r
-\r
-/* char: 0xda */\r
-\r
-static const GLubyte ch218data[] = {\r
-0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0xc,0x0,\r
-0x6,0x0,0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch218 = {11,18,-1,0,13,ch218data};\r
-\r
-/* char: 0xd9 */\r
-\r
-static const GLubyte ch217data[] = {\r
-0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x6,0x0,\r
-0xc,0x0,0x18,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch217 = {11,18,-1,0,13,ch217data};\r
-\r
-/* char: 0xd8 */\r
-\r
-static const GLubyte ch216data[] = {\r
-0xc7,0xc0,0xff,0xf0,0x78,0x38,0x38,0x18,0x6c,0x1c,0x6e,0xc,0x67,0xc,0x63,0x8c,\r
-0x61,0xcc,0x70,0xdc,0x30,0x78,0x38,0x38,0x1f,0xfc,0x7,0xcc,\r
-};\r
-\r
-static const BitmapCharRec ch216 = {14,14,0,0,15,ch216data};\r
-\r
-/* char: 0xd7 */\r
-\r
-static const GLubyte ch215data[] = {\r
-0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch215 = {10,9,0,0,10,ch215data};\r
-\r
-/* char: 0xd6 */\r
-\r
-static const GLubyte ch214data[] = {\r
-0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,\r
-0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xd,0x80,\r
-0xd,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch214 = {13,17,-1,0,15,ch214data};\r
-\r
-/* char: 0xd5 */\r
-\r
-static const GLubyte ch213data[] = {\r
-0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,\r
-0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x9,0x80,\r
-0xb,0x40,0x6,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch213 = {13,18,-1,0,15,ch213data};\r
-\r
-/* char: 0xd4 */\r
-\r
-static const GLubyte ch212data[] = {\r
-0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,\r
-0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xc,0xc0,\r
-0x7,0x80,0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch212 = {13,18,-1,0,15,ch212data};\r
-\r
-/* char: 0xd3 */\r
-\r
-static const GLubyte ch211data[] = {\r
-0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,\r
-0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0,\r
-0x1,0x80,0x0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch211 = {13,18,-1,0,15,ch211data};\r
-\r
-/* char: 0xd2 */\r
-\r
-static const GLubyte ch210data[] = {\r
-0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,\r
-0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0,\r
-0x6,0x0,0xc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch210 = {13,18,-1,0,15,ch210data};\r
-\r
-/* char: 0xd1 */\r
-\r
-static const GLubyte ch209data[] = {\r
-0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60,\r
-0xcc,0x60,0xd8,0x60,0xd8,0x60,0xf0,0x60,0xe0,0x60,0xe0,0x60,0x0,0x0,0x13,0x0,\r
-0x16,0x80,0xc,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch209 = {11,18,-1,0,13,ch209data};\r
-\r
-/* char: 0xd0 */\r
-\r
-static const GLubyte ch208data[] = {\r
-0x7f,0x80,0x7f,0xc0,0x60,0xe0,0x60,0x60,0x60,0x30,0x60,0x30,0xfc,0x30,0xfc,0x30,\r
-0x60,0x30,0x60,0x30,0x60,0x60,0x60,0xe0,0x7f,0xc0,0x7f,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch208 = {12,14,0,0,13,ch208data};\r
-\r
-/* char: 0xcf */\r
-\r
-static const GLubyte ch207data[] = {\r
-0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,\r
-0xcc,\r
-};\r
-\r
-static const BitmapCharRec ch207 = {6,17,0,0,6,ch207data};\r
-\r
-/* char: 0xce */\r
-\r
-static const GLubyte ch206data[] = {\r
-0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,\r
-0x78,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch206 = {6,18,0,0,6,ch206data};\r
-\r
-/* char: 0xcd */\r
-\r
-static const GLubyte ch205data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0xc0,\r
-0x60,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch205 = {4,18,-2,0,6,ch205data};\r
-\r
-/* char: 0xcc */\r
-\r
-static const GLubyte ch204data[] = {\r
-0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x30,\r
-0x60,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch204 = {4,18,0,0,6,ch204data};\r
-\r
-/* char: 0xcb */\r
-\r
-static const GLubyte ch203data[] = {\r
-0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0,\r
-0x33,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch203 = {9,17,-1,0,11,ch203data};\r
-\r
-/* char: 0xca */\r
-\r
-static const GLubyte ch202data[] = {\r
-0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0,\r
-0x1e,0x0,0xc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch202 = {9,18,-1,0,11,ch202data};\r
-\r
-/* char: 0xc9 */\r
-\r
-static const GLubyte ch201data[] = {\r
-0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0,\r
-0x6,0x0,0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch201 = {9,18,-1,0,11,ch201data};\r
-\r
-/* char: 0xc8 */\r
-\r
-static const GLubyte ch200data[] = {\r
-0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0,\r
-0x18,0x0,0x30,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch200 = {9,18,-1,0,11,ch200data};\r
-\r
-/* char: 0xc7 */\r
-\r
-static const GLubyte ch199data[] = {\r
-0x1e,0x0,0x1b,0x0,0x3,0x0,0xe,0x0,0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,\r
-0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,\r
-0x3f,0xe0,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch199 = {12,18,-1,4,14,ch199data};\r
-\r
-/* char: 0xc6 */\r
-\r
-static const GLubyte ch198data[] = {\r
-0xc1,0xff,0xc1,0xff,0x61,0x80,0x61,0x80,0x7f,0x80,0x3f,0x80,0x31,0xfe,0x31,0xfe,\r
-0x19,0x80,0x19,0x80,0xd,0x80,0xd,0x80,0x7,0xff,0x7,0xff,\r
-};\r
-\r
-static const BitmapCharRec ch198 = {16,14,-1,0,18,ch198data};\r
-\r
-/* char: 0xc5 */\r
-\r
-static const GLubyte ch197data[] = {\r
-0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,\r
-0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80,\r
-0x19,0x80,0xf,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch197 = {12,18,0,0,12,ch197data};\r
-\r
-/* char: 0xc4 */\r
-\r
-static const GLubyte ch196data[] = {\r
-0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,\r
-0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80,\r
-0x19,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch196 = {12,17,0,0,12,ch196data};\r
-\r
-/* char: 0xc3 */\r
-\r
-static const GLubyte ch195data[] = {\r
-0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,\r
-0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x13,0x0,\r
-0x16,0x80,0xc,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch195 = {12,18,0,0,12,ch195data};\r
-\r
-/* char: 0xc2 */\r
-\r
-static const GLubyte ch194data[] = {\r
-0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,\r
-0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80,\r
-0xf,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch194 = {12,18,0,0,12,ch194data};\r
-\r
-/* char: 0xc1 */\r
-\r
-static const GLubyte ch193data[] = {\r
-0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,\r
-0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0,\r
-0x3,0x0,0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch193 = {12,18,0,0,12,ch193data};\r
-\r
-/* char: 0xc0 */\r
-\r
-static const GLubyte ch192data[] = {\r
-0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,\r
-0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0,\r
-0xc,0x0,0x18,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch192 = {12,18,0,0,12,ch192data};\r
-\r
-/* char: 0xbf */\r
-\r
-static const GLubyte ch191data[] = {\r
-0x7c,0xfe,0xc6,0xc6,0xe0,0x70,0x38,0x18,0x18,0x18,0x0,0x0,0x18,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch191 = {7,14,-1,4,10,ch191data};\r
-\r
-/* char: 0xbe */\r
-\r
-static const GLubyte ch190data[] = {\r
-0x18,0x18,0x18,0x18,0xc,0xfc,0x6,0xd8,0x6,0x78,0x73,0x38,0xf9,0x18,0x99,0x88,\r
-0x30,0xc0,0x30,0xc0,0x98,0x60,0xf8,0x30,0x70,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch190 = {14,13,0,0,15,ch190data};\r
-\r
-/* char: 0xbd */\r
-\r
-static const GLubyte ch189data[] = {\r
-0x30,0xf8,0x30,0xf8,0x18,0x60,0xc,0x30,0xc,0x18,0x66,0x98,0x62,0xf8,0x63,0x70,\r
-0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch189 = {13,13,-1,0,15,ch189data};\r
-\r
-/* char: 0xbc */\r
-\r
-static const GLubyte ch188data[] = {\r
-0x30,0x30,0x30,0x30,0x19,0xf8,0xd,0xb0,0xc,0xf0,0x66,0x70,0x62,0x30,0x63,0x10,\r
-0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch188 = {13,13,-1,0,15,ch188data};\r
-\r
-/* char: 0xbb */\r
-\r
-static const GLubyte ch187data[] = {\r
-0x90,0xd8,0x6c,0x36,0x36,0x6c,0xd8,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data};\r
-\r
-/* char: 0xba */\r
-\r
-static const GLubyte ch186data[] = {\r
-0xf8,0x0,0x70,0xd8,0x88,0x88,0xd8,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch186 = {5,8,-1,-6,7,ch186data};\r
-\r
-/* char: 0xb9 */\r
-\r
-static const GLubyte ch185data[] = {\r
-0x60,0x60,0x60,0x60,0x60,0xe0,0xe0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch185 = {3,8,-1,-5,6,ch185data};\r
-\r
-/* char: 0xb8 */\r
-\r
-static const GLubyte ch184data[] = {\r
-0xf0,0xd8,0x18,0x70,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch184 = {5,5,0,4,5,ch184data};\r
-\r
-/* char: 0xb7 */\r
-\r
-static const GLubyte ch183data[] = {\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch183 = {2,2,-1,-4,4,ch183data};\r
-\r
-/* char: 0xb6 */\r
-\r
-static const GLubyte ch182data[] = {\r
-0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x32,0x72,0xf2,0xf2,0xf2,0xf2,\r
-0x72,0x3f,\r
-};\r
-\r
-static const BitmapCharRec ch182 = {8,18,-1,4,10,ch182data};\r
-\r
-/* char: 0xb5 */\r
-\r
-static const GLubyte ch181data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xdb,0xff,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,\r
-};\r
-\r
-static const BitmapCharRec ch181 = {8,14,-1,4,10,ch181data};\r
-\r
-/* char: 0xb4 */\r
-\r
-static const GLubyte ch180data[] = {\r
-0xc0,0x60,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch180 = {4,3,0,-11,4,ch180data};\r
-\r
-/* char: 0xb3 */\r
-\r
-static const GLubyte ch179data[] = {\r
-0x70,0xf8,0x98,0x30,0x30,0x98,0xf8,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch179 = {5,8,0,-5,6,ch179data};\r
-\r
-/* char: 0xb2 */\r
-\r
-static const GLubyte ch178data[] = {\r
-0xf8,0xf8,0x60,0x30,0x18,0x98,0xf8,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch178 = {5,8,0,-5,6,ch178data};\r
-\r
-/* char: 0xb1 */\r
-\r
-static const GLubyte ch177data[] = {\r
-0xff,0xff,0x0,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch177 = {8,11,-1,0,10,ch177data};\r
-\r
-/* char: 0xb0 */\r
-\r
-static const GLubyte ch176data[] = {\r
-0x70,0xd8,0x88,0xd8,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch176 = {5,5,-1,-8,7,ch176data};\r
-\r
-/* char: 0xaf */\r
-\r
-static const GLubyte ch175data[] = {\r
-0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch175 = {5,1,0,-12,5,ch175data};\r
-\r
-/* char: 0xae */\r
-\r
-static const GLubyte ch174data[] = {\r
-0xf,0x80,0x30,0x60,0x40,0x10,0x48,0x50,0x88,0x88,0x89,0x8,0x8f,0x88,0x88,0x48,\r
-0x88,0x48,0x4f,0x90,0x40,0x10,0x30,0x60,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch174 = {13,13,-1,0,14,ch174data};\r
-\r
-/* char: 0xad */\r
-\r
-static const GLubyte ch173data[] = {\r
-0xf8,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch173 = {5,2,-1,-4,7,ch173data};\r
-\r
-/* char: 0xac */\r
-\r
-static const GLubyte ch172data[] = {\r
-0x1,0x80,0x1,0x80,0x1,0x80,0xff,0x80,0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch172 = {9,5,-1,-3,11,ch172data};\r
-\r
-/* char: 0xab */\r
-\r
-static const GLubyte ch171data[] = {\r
-0x12,0x36,0x6c,0xd8,0xd8,0x6c,0x36,0x12,\r
-};\r
-\r
-static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data};\r
-\r
-/* char: 0xaa */\r
-\r
-static const GLubyte ch170data[] = {\r
-0xf8,0x0,0x68,0xd8,0x48,0x38,0xc8,0x70,\r
-};\r
-\r
-static const BitmapCharRec ch170 = {5,8,-1,-6,7,ch170data};\r
-\r
-/* char: 0xa9 */\r
-\r
-static const GLubyte ch169data[] = {\r
-0xf,0x80,0x30,0x60,0x40,0x10,0x47,0x10,0x88,0x88,0x90,0x8,0x90,0x8,0x90,0x8,\r
-0x88,0x88,0x47,0x10,0x40,0x10,0x30,0x60,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch169 = {13,13,-1,0,15,ch169data};\r
-\r
-/* char: 0xa8 */\r
-\r
-static const GLubyte ch168data[] = {\r
-0xd8,0xd8,\r
-};\r
-\r
-static const BitmapCharRec ch168 = {5,2,0,-11,6,ch168data};\r
-\r
-/* char: 0xa7 */\r
-\r
-static const GLubyte ch167data[] = {\r
-0x3c,0x7e,0xc3,0xc3,0x7,0xe,0x3e,0x73,0xe3,0xc3,0xc7,0x6e,0x7c,0xf0,0xc3,0xc3,\r
-0x7e,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch167 = {8,18,-1,4,10,ch167data};\r
-\r
-/* char: 0xa6 */\r
-\r
-static const GLubyte ch166data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch166 = {2,17,-1,3,4,ch166data};\r
-\r
-/* char: 0xa5 */\r
-\r
-static const GLubyte ch165data[] = {\r
-0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x3c,0x66,0x66,0x66,0xc3,0xc3,\r
-};\r
-\r
-static const BitmapCharRec ch165 = {8,13,-1,0,10,ch165data};\r
-\r
-/* char: 0xa4 */\r
-\r
-static const GLubyte ch164data[] = {\r
-0xc3,0xff,0x66,0x66,0x66,0xff,0xc3,\r
-};\r
-\r
-static const BitmapCharRec ch164 = {8,7,-1,-3,10,ch164data};\r
-\r
-/* char: 0xa3 */\r
-\r
-static const GLubyte ch163data[] = {\r
-0xdf,0x0,0xff,0x80,0x60,0x80,0x30,0x0,0x18,0x0,0x18,0x0,0x7e,0x0,0x30,0x0,\r
-0x60,0x0,0x61,0x80,0x61,0x80,0x3f,0x0,0x1e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch163 = {9,13,0,0,10,ch163data};\r
-\r
-/* char: 0xa2 */\r
-\r
-static const GLubyte ch162data[] = {\r
-0x10,0x10,0x3e,0x7f,0x6b,0xc8,0xc8,0xc8,0xc8,0x6b,0x7f,0x3e,0x4,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch162 = {8,14,-1,2,10,ch162data};\r
-\r
-/* char: 0xa1 */\r
-\r
-static const GLubyte ch161data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x40,0x40,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch161 = {2,14,-2,4,6,ch161data};\r
-\r
-/* char: 0xa0 */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch160data[] = { 0x0 };\r
-static const BitmapCharRec ch160 = {1,1,0,0,5,ch160data};\r
-#else\r
-static const BitmapCharRec ch160 = {0,0,0,0,5,0};\r
-#endif\r
-\r
-/* char: 0x7e '~' */\r
-\r
-static const GLubyte ch126data[] = {\r
-0xcc,0x7e,0x33,\r
-};\r
-\r
-static const BitmapCharRec ch126 = {8,3,-1,-4,10,ch126data};\r
-\r
-/* char: 0x7d '}' */\r
-\r
-static const GLubyte ch125data[] = {\r
-0xc0,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0xc,0x18,0x30,0x30,0x30,0x30,0x30,\r
-0x60,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch125 = {6,18,0,4,6,ch125data};\r
-\r
-/* char: 0x7c '|' */\r
-\r
-static const GLubyte ch124data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch124 = {2,18,-1,4,4,ch124data};\r
-\r
-/* char: 0x7b '{' */\r
-\r
-static const GLubyte ch123data[] = {\r
-0xc,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x30,0x30,0x30,\r
-0x18,0xc,\r
-};\r
-\r
-static const BitmapCharRec ch123 = {6,18,0,4,6,ch123data};\r
-\r
-/* char: 0x7a 'z' */\r
-\r
-static const GLubyte ch122data[] = {\r
-0xfe,0xfe,0xc0,0x60,0x30,0x18,0xc,0x6,0xfe,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch122 = {7,10,-1,0,9,ch122data};\r
-\r
-/* char: 0x79 'y' */\r
-\r
-static const GLubyte ch121data[] = {\r
-0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,\r
-};\r
-\r
-static const BitmapCharRec ch121 = {8,14,-1,4,10,ch121data};\r
-\r
-/* char: 0x78 'x' */\r
-\r
-static const GLubyte ch120data[] = {\r
-0xc3,0xe7,0x66,0x3c,0x18,0x18,0x3c,0x66,0xe7,0xc3,\r
-};\r
-\r
-static const BitmapCharRec ch120 = {8,10,-1,0,10,ch120data};\r
-\r
-/* char: 0x77 'w' */\r
-\r
-static const GLubyte ch119data[] = {\r
-0x19,0x80,0x19,0x80,0x39,0xc0,0x29,0x40,0x69,0x60,0x66,0x60,0x66,0x60,0xc6,0x30,\r
-0xc6,0x30,0xc6,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch119 = {12,10,-1,0,14,ch119data};\r
-\r
-/* char: 0x76 'v' */\r
-\r
-static const GLubyte ch118data[] = {\r
-0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,\r
-};\r
-\r
-static const BitmapCharRec ch118 = {8,10,-1,0,10,ch118data};\r
-\r
-/* char: 0x75 'u' */\r
-\r
-static const GLubyte ch117data[] = {\r
-0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,\r
-};\r
-\r
-static const BitmapCharRec ch117 = {8,10,-1,0,10,ch117data};\r
-\r
-/* char: 0x74 't' */\r
-\r
-static const GLubyte ch116data[] = {\r
-0x18,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch116 = {6,13,0,0,6,ch116data};\r
-\r
-/* char: 0x73 's' */\r
-\r
-static const GLubyte ch115data[] = {\r
-0x78,0xfc,0xc6,0x6,0x3e,0xfc,0xc0,0xc6,0x7e,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch115 = {7,10,-1,0,9,ch115data};\r
-\r
-/* char: 0x72 'r' */\r
-\r
-static const GLubyte ch114data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xd8,0xd8,\r
-};\r
-\r
-static const BitmapCharRec ch114 = {5,10,-1,0,6,ch114data};\r
-\r
-/* char: 0x71 'q' */\r
-\r
-static const GLubyte ch113data[] = {\r
-0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,\r
-0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,0x7f,0x80,0x3d,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch113 = {9,14,-1,4,11,ch113data};\r
-\r
-/* char: 0x70 'p' */\r
-\r
-static const GLubyte ch112data[] = {\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,\r
-0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch112 = {9,14,-1,4,11,ch112data};\r
-\r
-/* char: 0x6f 'o' */\r
-\r
-static const GLubyte ch111data[] = {\r
-0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,\r
-0x7f,0x0,0x3e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch111 = {9,10,-1,0,11,ch111data};\r
-\r
-/* char: 0x6e 'n' */\r
-\r
-static const GLubyte ch110data[] = {\r
-0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,\r
-};\r
-\r
-static const BitmapCharRec ch110 = {8,10,-1,0,10,ch110data};\r
-\r
-/* char: 0x6d 'm' */\r
-\r
-static const GLubyte ch109data[] = {\r
-0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xe7,0x30,\r
-0xde,0xf0,0xcc,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch109 = {12,10,-1,0,14,ch109data};\r
-\r
-/* char: 0x6c 'l' */\r
-\r
-static const GLubyte ch108data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch108 = {2,14,-1,0,4,ch108data};\r
-\r
-/* char: 0x6b 'k' */\r
-\r
-static const GLubyte ch107data[] = {\r
-0xc7,0xc6,0xce,0xcc,0xd8,0xf8,0xf0,0xd8,0xcc,0xc6,0xc0,0xc0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch107 = {8,14,-1,0,9,ch107data};\r
-\r
-/* char: 0x6a 'j' */\r
-\r
-static const GLubyte ch106data[] = {\r
-0xe0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x0,\r
-0x30,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch106 = {4,18,1,4,4,ch106data};\r
-\r
-/* char: 0x69 'i' */\r
-\r
-static const GLubyte ch105data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch105 = {2,14,-1,0,4,ch105data};\r
-\r
-/* char: 0x68 'h' */\r
-\r
-static const GLubyte ch104data[] = {\r
-0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0xc0,0xc0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch104 = {8,14,-1,0,10,ch104data};\r
-\r
-/* char: 0x67 'g' */\r
-\r
-static const GLubyte ch103data[] = {\r
-0x1c,0x0,0x7f,0x0,0x63,0x0,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,\r
-0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x7f,0x80,0x3d,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch103 = {9,14,-1,4,11,ch103data};\r
-\r
-/* char: 0x66 'f' */\r
-\r
-static const GLubyte ch102data[] = {\r
-0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x3c,0x1c,\r
-};\r
-\r
-static const BitmapCharRec ch102 = {6,14,0,0,6,ch102data};\r
-\r
-/* char: 0x65 'e' */\r
-\r
-static const GLubyte ch101data[] = {\r
-0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch101 = {8,10,-1,0,10,ch101data};\r
-\r
-/* char: 0x64 'd' */\r
-\r
-static const GLubyte ch100data[] = {\r
-0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,\r
-0x7f,0x80,0x3d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch100 = {9,14,-1,0,11,ch100data};\r
-\r
-/* char: 0x63 'c' */\r
-\r
-static const GLubyte ch99data[] = {\r
-0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e,\r
-};\r
-\r
-static const BitmapCharRec ch99 = {8,10,-1,0,10,ch99data};\r
-\r
-/* char: 0x62 'b' */\r
-\r
-static const GLubyte ch98data[] = {\r
-0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,\r
-0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch98 = {9,14,-1,0,11,ch98data};\r
-\r
-/* char: 0x61 'a' */\r
-\r
-static const GLubyte ch97data[] = {\r
-0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch97 = {7,10,-1,0,9,ch97data};\r
-\r
-/* char: 0x60 '`' */\r
-\r
-static const GLubyte ch96data[] = {\r
-0xc0,0xc0,0x80,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch96 = {2,5,-1,-9,4,ch96data};\r
-\r
-/* char: 0x5f '_' */\r
-\r
-static const GLubyte ch95data[] = {\r
-0xff,0xc0,0xff,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch95 = {10,2,0,4,10,ch95data};\r
-\r
-/* char: 0x5e '^' */\r
-\r
-static const GLubyte ch94data[] = {\r
-0x82,0xc6,0x6c,0x38,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch94 = {7,5,-1,-8,9,ch94data};\r
-\r
-/* char: 0x5d ']' */\r
-\r
-static const GLubyte ch93data[] = {\r
-0xf0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,\r
-0xf0,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch93 = {4,18,0,4,5,ch93data};\r
-\r
-/* char: 0x5c '\' */\r
-\r
-static const GLubyte ch92data[] = {\r
-0x18,0x18,0x10,0x10,0x30,0x30,0x20,0x20,0x60,0x60,0x40,0x40,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch92 = {5,14,0,0,5,ch92data};\r
-\r
-/* char: 0x5b '[' */\r
-\r
-static const GLubyte ch91data[] = {\r
-0xf0,0xf0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xf0,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch91 = {4,18,-1,4,5,ch91data};\r
-\r
-/* char: 0x5a 'Z' */\r
-\r
-static const GLubyte ch90data[] = {\r
-0xff,0xc0,0xff,0xc0,0xc0,0x0,0x60,0x0,0x30,0x0,0x18,0x0,0x1c,0x0,0xc,0x0,\r
-0x6,0x0,0x3,0x0,0x1,0x80,0x0,0xc0,0xff,0xc0,0xff,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch90 = {10,14,-1,0,12,ch90data};\r
-\r
-/* char: 0x59 'Y' */\r
-\r
-static const GLubyte ch89data[] = {\r
-0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80,\r
-0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch89 = {12,14,-1,0,14,ch89data};\r
-\r
-/* char: 0x58 'X' */\r
-\r
-static const GLubyte ch88data[] = {\r
-0xc0,0x60,0xe0,0xe0,0x60,0xc0,0x71,0xc0,0x31,0x80,0x1b,0x0,0xe,0x0,0xe,0x0,\r
-0x1b,0x0,0x31,0x80,0x71,0xc0,0x60,0xc0,0xe0,0xe0,0xc0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch88 = {11,14,-1,0,13,ch88data};\r
-\r
-/* char: 0x57 'W' */\r
-\r
-static const GLubyte ch87data[] = {\r
-0x18,0x18,0x18,0x18,0x1c,0x38,0x34,0x2c,0x36,0x6c,0x36,0x6c,0x66,0x66,0x66,0x66,\r
-0x62,0x46,0x63,0xc6,0xc3,0xc3,0xc1,0x83,0xc1,0x83,0xc1,0x83,\r
-};\r
-\r
-static const BitmapCharRec ch87 = {16,14,-1,0,18,ch87data};\r
-\r
-/* char: 0x56 'V' */\r
-\r
-static const GLubyte ch86data[] = {\r
-0x6,0x0,0xf,0x0,0xf,0x0,0x19,0x80,0x19,0x80,0x19,0x80,0x30,0xc0,0x30,0xc0,\r
-0x30,0xc0,0x60,0x60,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch86 = {12,14,-1,0,14,ch86data};\r
-\r
-/* char: 0x55 'U' */\r
-\r
-static const GLubyte ch85data[] = {\r
-0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch85 = {11,14,-1,0,13,ch85data};\r
-\r
-/* char: 0x54 'T' */\r
-\r
-static const GLubyte ch84data[] = {\r
-0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,\r
-0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xff,0xc0,0xff,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch84 = {10,14,-1,0,12,ch84data};\r
-\r
-/* char: 0x53 'S' */\r
-\r
-static const GLubyte ch83data[] = {\r
-0x3f,0x0,0x7f,0xc0,0xe0,0xe0,0xc0,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,0x1f,0x0,\r
-0x7c,0x0,0xe0,0x0,0xc0,0x60,0xe0,0xe0,0x7f,0xc0,0x1f,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch83 = {11,14,-1,0,13,ch83data};\r
-\r
-/* char: 0x52 'R' */\r
-\r
-static const GLubyte ch82data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0x80,0xc1,0x80,0xff,0x0,0xff,0x80,\r
-0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch82 = {10,14,-1,0,12,ch82data};\r
-\r
-/* char: 0x51 'Q' */\r
-\r
-static const GLubyte ch81data[] = {\r
-0x0,0x30,0xf,0xb0,0x3f,0xe0,0x70,0xf0,0x61,0xb0,0xe1,0xb8,0xc0,0x18,0xc0,0x18,\r
-0xc0,0x18,0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch81 = {13,15,-1,1,15,ch81data};\r
-\r
-/* char: 0x50 'P' */\r
-\r
-static const GLubyte ch80data[] = {\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,\r
-0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch80 = {10,14,-1,0,12,ch80data};\r
-\r
-/* char: 0x4f 'O' */\r
-\r
-static const GLubyte ch79data[] = {\r
-0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,\r
-0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch79 = {13,14,-1,0,15,ch79data};\r
-\r
-/* char: 0x4e 'N' */\r
-\r
-static const GLubyte ch78data[] = {\r
-0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60,\r
-0xcc,0x60,0xd8,0x60,0xf0,0x60,0xf0,0x60,0xe0,0x60,0xc0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch78 = {11,14,-1,0,13,ch78data};\r
-\r
-/* char: 0x4d 'M' */\r
-\r
-static const GLubyte ch77data[] = {\r
-0xc3,0xc,0xc3,0xc,0xc7,0x8c,0xc4,0x8c,0xcc,0xcc,0xcc,0xcc,0xd8,0x6c,0xd8,0x6c,\r
-0xf0,0x3c,0xf0,0x3c,0xe0,0x1c,0xe0,0x1c,0xc0,0xc,0xc0,0xc,\r
-};\r
-\r
-static const BitmapCharRec ch77 = {14,14,-1,0,16,ch77data};\r
-\r
-/* char: 0x4c 'L' */\r
-\r
-static const GLubyte ch76data[] = {\r
-0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch76 = {8,14,-1,0,10,ch76data};\r
-\r
-/* char: 0x4b 'K' */\r
-\r
-static const GLubyte ch75data[] = {\r
-0xc0,0x70,0xc0,0xe0,0xc1,0xc0,0xc3,0x80,0xc7,0x0,0xce,0x0,0xfc,0x0,0xf8,0x0,\r
-0xdc,0x0,0xce,0x0,0xc7,0x0,0xc3,0x80,0xc1,0xc0,0xc0,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch75 = {12,14,-1,0,13,ch75data};\r
-\r
-/* char: 0x4a 'J' */\r
-\r
-static const GLubyte ch74data[] = {\r
-0x3c,0x7e,0xe7,0xc3,0xc3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,\r
-};\r
-\r
-static const BitmapCharRec ch74 = {8,14,-1,0,10,ch74data};\r
-\r
-/* char: 0x49 'I' */\r
-\r
-static const GLubyte ch73data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch73 = {2,14,-2,0,6,ch73data};\r
-\r
-/* char: 0x48 'H' */\r
-\r
-static const GLubyte ch72data[] = {\r
-0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xff,0xe0,0xff,0xe0,\r
-0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch72 = {11,14,-1,0,13,ch72data};\r
-\r
-/* char: 0x47 'G' */\r
-\r
-static const GLubyte ch71data[] = {\r
-0xf,0xb0,0x3f,0xf0,0x70,0x70,0x60,0x30,0xe0,0x30,0xc1,0xf0,0xc1,0xf0,0xc0,0x0,\r
-0xc0,0x0,0xe0,0x30,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch71 = {12,14,-1,0,14,ch71data};\r
-\r
-/* char: 0x46 'F' */\r
-\r
-static const GLubyte ch70data[] = {\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch70 = {9,14,-1,0,11,ch70data};\r
-\r
-/* char: 0x45 'E' */\r
-\r
-static const GLubyte ch69data[] = {\r
-0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch69 = {9,14,-1,0,11,ch69data};\r
-\r
-/* char: 0x44 'D' */\r
-\r
-static const GLubyte ch68data[] = {\r
-0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,\r
-0xc0,0x60,0xc0,0x60,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch68 = {11,14,-1,0,13,ch68data};\r
-\r
-/* char: 0x43 'C' */\r
-\r
-static const GLubyte ch67data[] = {\r
-0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,\r
-0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch67 = {12,14,-1,0,14,ch67data};\r
-\r
-/* char: 0x42 'B' */\r
-\r
-static const GLubyte ch66data[] = {\r
-0xff,0x80,0xff,0xc0,0xc0,0xe0,0xc0,0x60,0xc0,0x60,0xc0,0xe0,0xff,0xc0,0xff,0x80,\r
-0xc1,0x80,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch66 = {11,14,-1,0,13,ch66data};\r
-\r
-/* char: 0x41 'A' */\r
-\r
-static const GLubyte ch65data[] = {\r
-0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,\r
-0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch65 = {12,14,0,0,12,ch65data};\r
-\r
-/* char: 0x40 '@' */\r
-\r
-static const GLubyte ch64data[] = {\r
-0x7,0xe0,0x1f,0xf0,0x38,0x0,0x70,0x0,0x67,0x70,0xcf,0xf8,0xcc,0xcc,0xcc,0x66,\r
-0xcc,0x66,0xcc,0x63,0xc6,0x33,0x67,0x73,0x63,0xb3,0x30,0x6,0x1c,0xe,0xf,0xfc,\r
-0x3,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch64 = {16,17,-1,3,18,ch64data};\r
-\r
-/* char: 0x3f '?' */\r
-\r
-static const GLubyte ch63data[] = {\r
-0x30,0x30,0x0,0x0,0x30,0x30,0x30,0x38,0x1c,0xe,0xc6,0xc6,0xfe,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch63 = {7,14,-1,0,10,ch63data};\r
-\r
-/* char: 0x3e '>' */\r
-\r
-static const GLubyte ch62data[] = {\r
-0xc0,0xf0,0x3c,0xe,0x3,0xe,0x3c,0xf0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch62 = {8,9,-1,0,10,ch62data};\r
-\r
-/* char: 0x3d '=' */\r
-\r
-static const GLubyte ch61data[] = {\r
-0xfe,0xfe,0x0,0x0,0xfe,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch61 = {7,6,-2,-2,11,ch61data};\r
-\r
-/* char: 0x3c '<' */\r
-\r
-static const GLubyte ch60data[] = {\r
-0x3,0xf,0x3c,0x70,0xc0,0x70,0x3c,0xf,0x3,\r
-};\r
-\r
-static const BitmapCharRec ch60 = {8,9,-1,0,10,ch60data};\r
-\r
-/* char: 0x3b ';' */\r
-\r
-static const GLubyte ch59data[] = {\r
-0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch59 = {2,13,-1,3,5,ch59data};\r
-\r
-/* char: 0x3a ':' */\r
-\r
-static const GLubyte ch58data[] = {\r
-0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch58 = {2,10,-1,0,5,ch58data};\r
-\r
-/* char: 0x39 '9' */\r
-\r
-static const GLubyte ch57data[] = {\r
-0x7c,0xfe,0xc6,0x3,0x3,0x3b,0x7f,0xc3,0xc3,0xc3,0xc7,0x7e,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch57 = {8,13,-1,0,10,ch57data};\r
-\r
-/* char: 0x38 '8' */\r
-\r
-static const GLubyte ch56data[] = {\r
-0x3c,0x7e,0xe7,0xc3,0xc3,0x66,0x7e,0x66,0xc3,0xc3,0xe7,0x7e,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch56 = {8,13,-1,0,10,ch56data};\r
-\r
-/* char: 0x37 '7' */\r
-\r
-static const GLubyte ch55data[] = {\r
-0x60,0x60,0x30,0x30,0x30,0x18,0x18,0xc,0xc,0x6,0x3,0xff,0xff,\r
-};\r
-\r
-static const BitmapCharRec ch55 = {8,13,-1,0,10,ch55data};\r
-\r
-/* char: 0x36 '6' */\r
-\r
-static const GLubyte ch54data[] = {\r
-0x3c,0x7e,0xe3,0xc3,0xc3,0xc3,0xfe,0xdc,0xc0,0xc0,0x63,0x7f,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch54 = {8,13,-1,0,10,ch54data};\r
-\r
-/* char: 0x35 '5' */\r
-\r
-static const GLubyte ch53data[] = {\r
-0x7c,0xfe,0xc7,0xc3,0x3,0x3,0xc7,0xfe,0xfc,0xc0,0xc0,0xfe,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch53 = {8,13,-1,0,10,ch53data};\r
-\r
-/* char: 0x34 '4' */\r
-\r
-static const GLubyte ch52data[] = {\r
-0x3,0x0,0x3,0x0,0x3,0x0,0xff,0x80,0xff,0x80,0xc3,0x0,0x63,0x0,0x33,0x0,\r
-0x33,0x0,0x1b,0x0,0xf,0x0,0x7,0x0,0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch52 = {9,13,-1,0,10,ch52data};\r
-\r
-/* char: 0x33 '3' */\r
-\r
-static const GLubyte ch51data[] = {\r
-0x3c,0x7e,0xc7,0xc3,0x3,0x7,0x1e,0x1c,0x6,0xc3,0xc3,0x7e,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch51 = {8,13,-1,0,10,ch51data};\r
-\r
-/* char: 0x32 '2' */\r
-\r
-static const GLubyte ch50data[] = {\r
-0xff,0xff,0xc0,0xe0,0x70,0x38,0x1c,0xe,0x7,0x3,0xc3,0xfe,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch50 = {8,13,-1,0,10,ch50data};\r
-\r
-/* char: 0x31 '1' */\r
-\r
-static const GLubyte ch49data[] = {\r
-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0xf8,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch49 = {5,13,-2,0,10,ch49data};\r
-\r
-/* char: 0x30 '0' */\r
-\r
-static const GLubyte ch48data[] = {\r
-0x3c,0x7e,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x7e,0x3c,\r
-};\r
-\r
-static const BitmapCharRec ch48 = {8,13,-1,0,10,ch48data};\r
-\r
-/* char: 0x2f '/' */\r
-\r
-static const GLubyte ch47data[] = {\r
-0xc0,0xc0,0x40,0x40,0x60,0x60,0x20,0x20,0x30,0x30,0x10,0x10,0x18,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch47 = {5,14,0,0,5,ch47data};\r
-\r
-/* char: 0x2e '.' */\r
-\r
-static const GLubyte ch46data[] = {\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch46 = {2,2,-1,0,5,ch46data};\r
-\r
-/* char: 0x2d '-' */\r
-\r
-static const GLubyte ch45data[] = {\r
-0xff,0xff,\r
-};\r
-\r
-static const BitmapCharRec ch45 = {8,2,-1,-4,11,ch45data};\r
-\r
-/* char: 0x2c ',' */\r
-\r
-static const GLubyte ch44data[] = {\r
-0x80,0x40,0x40,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch44 = {2,5,-1,3,5,ch44data};\r
-\r
-/* char: 0x2b '+' */\r
-\r
-static const GLubyte ch43data[] = {\r
-0x18,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch43 = {8,10,-1,0,10,ch43data};\r
-\r
-/* char: 0x2a '*' */\r
-\r
-static const GLubyte ch42data[] = {\r
-0x88,0x70,0x70,0xf8,0x20,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch42 = {5,6,-1,-8,7,ch42data};\r
-\r
-/* char: 0x29 ')' */\r
-\r
-static const GLubyte ch41data[] = {\r
-0x80,0xc0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0x60,\r
-0xc0,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch41 = {4,18,-1,4,6,ch41data};\r
-\r
-/* char: 0x28 '(' */\r
-\r
-static const GLubyte ch40data[] = {\r
-0x10,0x30,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,0x60,\r
-0x30,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch40 = {4,18,-1,4,6,ch40data};\r
-\r
-/* char: 0x27 ''' */\r
-\r
-static const GLubyte ch39data[] = {\r
-0x80,0x40,0x40,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch39 = {2,5,-1,-9,4,ch39data};\r
-\r
-/* char: 0x26 '&' */\r
-\r
-static const GLubyte ch38data[] = {\r
-0x3c,0x70,0x7e,0xe0,0xe7,0xc0,0xc3,0x80,0xc3,0xc0,0xc6,0xc0,0xee,0xc0,0x7c,0x0,\r
-0x3c,0x0,0x66,0x0,0x66,0x0,0x7e,0x0,0x3c,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch38 = {12,13,-1,0,13,ch38data};\r
-\r
-/* char: 0x25 '%' */\r
-\r
-static const GLubyte ch37data[] = {\r
-0x18,0x78,0x18,0xfc,0xc,0xcc,0xc,0xcc,0x6,0xfc,0x6,0x78,0x3,0x0,0x7b,0x0,\r
-0xfd,0x80,0xcd,0x80,0xcc,0xc0,0xfc,0xc0,0x78,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch37 = {14,13,-1,0,16,ch37data};\r
-\r
-/* char: 0x24 '$' */\r
-\r
-static const GLubyte ch36data[] = {\r
-0x8,0x0,0x8,0x0,0x3e,0x0,0x7f,0x0,0xeb,0x80,0xc9,0x80,0x9,0x80,0xf,0x0,\r
-0x3e,0x0,0x78,0x0,0xe8,0x0,0xc8,0x0,0xcb,0x0,0x7f,0x0,0x3e,0x0,0x8,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch36 = {9,16,-1,2,10,ch36data};\r
-\r
-/* char: 0x23 '#' */\r
-\r
-static const GLubyte ch35data[] = {\r
-0x24,0x0,0x24,0x0,0x24,0x0,0xff,0x80,0xff,0x80,0x12,0x0,0x12,0x0,0x12,0x0,\r
-0x7f,0xc0,0x7f,0xc0,0x9,0x0,0x9,0x0,0x9,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch35 = {10,13,0,0,10,ch35data};\r
-\r
-/* char: 0x22 '"' */\r
-\r
-static const GLubyte ch34data[] = {\r
-0x90,0x90,0xd8,0xd8,0xd8,\r
-};\r
-\r
-static const BitmapCharRec ch34 = {5,5,0,-9,5,ch34data};\r
-\r
-/* char: 0x21 '!' */\r
-\r
-static const GLubyte ch33data[] = {\r
-0xc0,0xc0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch33 = {2,14,-2,0,6,ch33data};\r
-\r
-/* char: 0x20 ' ' */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch32data[] = { 0x0 };\r
-static const BitmapCharRec ch32 = {1,1,0,0,5,ch32data};\r
-#else\r
-static const BitmapCharRec ch32 = {0,0,0,0,5,0};\r
-#endif\r
-\r
-static const BitmapCharRec * const chars[] = {\r
-&ch32,\r
-&ch33,\r
-&ch34,\r
-&ch35,\r
-&ch36,\r
-&ch37,\r
-&ch38,\r
-&ch39,\r
-&ch40,\r
-&ch41,\r
-&ch42,\r
-&ch43,\r
-&ch44,\r
-&ch45,\r
-&ch46,\r
-&ch47,\r
-&ch48,\r
-&ch49,\r
-&ch50,\r
-&ch51,\r
-&ch52,\r
-&ch53,\r
-&ch54,\r
-&ch55,\r
-&ch56,\r
-&ch57,\r
-&ch58,\r
-&ch59,\r
-&ch60,\r
-&ch61,\r
-&ch62,\r
-&ch63,\r
-&ch64,\r
-&ch65,\r
-&ch66,\r
-&ch67,\r
-&ch68,\r
-&ch69,\r
-&ch70,\r
-&ch71,\r
-&ch72,\r
-&ch73,\r
-&ch74,\r
-&ch75,\r
-&ch76,\r
-&ch77,\r
-&ch78,\r
-&ch79,\r
-&ch80,\r
-&ch81,\r
-&ch82,\r
-&ch83,\r
-&ch84,\r
-&ch85,\r
-&ch86,\r
-&ch87,\r
-&ch88,\r
-&ch89,\r
-&ch90,\r
-&ch91,\r
-&ch92,\r
-&ch93,\r
-&ch94,\r
-&ch95,\r
-&ch96,\r
-&ch97,\r
-&ch98,\r
-&ch99,\r
-&ch100,\r
-&ch101,\r
-&ch102,\r
-&ch103,\r
-&ch104,\r
-&ch105,\r
-&ch106,\r
-&ch107,\r
-&ch108,\r
-&ch109,\r
-&ch110,\r
-&ch111,\r
-&ch112,\r
-&ch113,\r
-&ch114,\r
-&ch115,\r
-&ch116,\r
-&ch117,\r
-&ch118,\r
-&ch119,\r
-&ch120,\r
-&ch121,\r
-&ch122,\r
-&ch123,\r
-&ch124,\r
-&ch125,\r
-&ch126,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-&ch160,\r
-&ch161,\r
-&ch162,\r
-&ch163,\r
-&ch164,\r
-&ch165,\r
-&ch166,\r
-&ch167,\r
-&ch168,\r
-&ch169,\r
-&ch170,\r
-&ch171,\r
-&ch172,\r
-&ch173,\r
-&ch174,\r
-&ch175,\r
-&ch176,\r
-&ch177,\r
-&ch178,\r
-&ch179,\r
-&ch180,\r
-&ch181,\r
-&ch182,\r
-&ch183,\r
-&ch184,\r
-&ch185,\r
-&ch186,\r
-&ch187,\r
-&ch188,\r
-&ch189,\r
-&ch190,\r
-&ch191,\r
-&ch192,\r
-&ch193,\r
-&ch194,\r
-&ch195,\r
-&ch196,\r
-&ch197,\r
-&ch198,\r
-&ch199,\r
-&ch200,\r
-&ch201,\r
-&ch202,\r
-&ch203,\r
-&ch204,\r
-&ch205,\r
-&ch206,\r
-&ch207,\r
-&ch208,\r
-&ch209,\r
-&ch210,\r
-&ch211,\r
-&ch212,\r
-&ch213,\r
-&ch214,\r
-&ch215,\r
-&ch216,\r
-&ch217,\r
-&ch218,\r
-&ch219,\r
-&ch220,\r
-&ch221,\r
-&ch222,\r
-&ch223,\r
-&ch224,\r
-&ch225,\r
-&ch226,\r
-&ch227,\r
-&ch228,\r
-&ch229,\r
-&ch230,\r
-&ch231,\r
-&ch232,\r
-&ch233,\r
-&ch234,\r
-&ch235,\r
-&ch236,\r
-&ch237,\r
-&ch238,\r
-&ch239,\r
-&ch240,\r
-&ch241,\r
-&ch242,\r
-&ch243,\r
-&ch244,\r
-&ch245,\r
-&ch246,\r
-&ch247,\r
-&ch248,\r
-&ch249,\r
-&ch250,\r
-&ch251,\r
-&ch252,\r
-&ch253,\r
-&ch254,\r
-&ch255,\r
-};\r
-\r
-#if !defined(__IBMCPP__)\r
-const \r
-#endif\r
-BitmapFontRec glutBitmapHelvetica18 = {\r
-"-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1",\r
-224,\r
-32,\r
-chars\r
-};\r
-\r
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#define glutBitmapHelvetica18 XXX
+#include "glutbitmap.h"
+#undef glutBitmapHelvetica18
+
+/* char: 0xff */
+
+static const GLubyte ch255data[] = {
+0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x66,
+0x66,
+};
+
+static const BitmapCharRec ch255 = {8,17,-1,4,10,ch255data};
+
+/* char: 0xfe */
+
+static const GLubyte ch254data[] = {
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,
+0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,
+0xc0,0x0,0xc0,0x0,
+};
+
+static const BitmapCharRec ch254 = {9,18,-1,4,11,ch254data};
+
+/* char: 0xfd */
+
+static const GLubyte ch253data[] = {
+0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,0x0,0x18,
+0xc,0x6,
+};
+
+static const BitmapCharRec ch253 = {8,18,-1,4,10,ch253data};
+
+/* char: 0xfc */
+
+static const GLubyte ch252data[] = {
+0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x66,
+};
+
+static const BitmapCharRec ch252 = {8,13,-1,0,10,ch252data};
+
+/* char: 0xfb */
+
+static const GLubyte ch251data[] = {
+0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x66,0x3c,0x18,
+};
+
+static const BitmapCharRec ch251 = {8,14,-1,0,10,ch251data};
+
+/* char: 0xfa */
+
+static const GLubyte ch250data[] = {
+0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0x18,0xc,0x6,
+};
+
+static const BitmapCharRec ch250 = {8,14,-1,0,10,ch250data};
+
+/* char: 0xf9 */
+
+static const GLubyte ch249data[] = {
+0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x0,0xc,0x18,0x30,
+};
+
+static const BitmapCharRec ch249 = {8,14,-1,0,10,ch249data};
+
+/* char: 0xf8 */
+
+static const GLubyte ch248data[] = {
+0xce,0x0,0x7f,0x80,0x31,0x80,0x78,0xc0,0x6c,0xc0,0x66,0xc0,0x63,0xc0,0x31,0x80,
+0x3f,0xc0,0xe,0x60,
+};
+
+static const BitmapCharRec ch248 = {11,10,0,0,11,ch248data};
+
+/* char: 0xf7 */
+
+static const GLubyte ch247data[] = {
+0x18,0x18,0x0,0xff,0xff,0x0,0x18,0x18,
+};
+
+static const BitmapCharRec ch247 = {8,8,-1,-1,10,ch247data};
+
+/* char: 0xf6 */
+
+static const GLubyte ch246data[] = {
+0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,
+0x7f,0x0,0x3e,0x0,0x0,0x0,0x36,0x0,0x36,0x0,
+};
+
+static const BitmapCharRec ch246 = {9,13,-1,0,11,ch246data};
+
+/* char: 0xf5 */
+
+static const GLubyte ch245data[] = {
+0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,
+0x7f,0x0,0x3e,0x0,0x0,0x0,0x26,0x0,0x2d,0x0,0x19,0x0,
+};
+
+static const BitmapCharRec ch245 = {9,14,-1,0,11,ch245data};
+
+/* char: 0xf4 */
+
+static const GLubyte ch244data[] = {
+0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,
+0x7f,0x0,0x3e,0x0,0x0,0x0,0x33,0x0,0x1e,0x0,0xc,0x0,
+};
+
+static const BitmapCharRec ch244 = {9,14,-1,0,11,ch244data};
+
+/* char: 0xf3 */
+
+static const GLubyte ch243data[] = {
+0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,
+0x7f,0x0,0x3e,0x0,0x0,0x0,0x18,0x0,0xc,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch243 = {9,14,-1,0,11,ch243data};
+
+/* char: 0xf2 */
+
+static const GLubyte ch242data[] = {
+0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,
+0x7f,0x0,0x3e,0x0,0x0,0x0,0xc,0x0,0x18,0x0,0x30,0x0,
+};
+
+static const BitmapCharRec ch242 = {9,14,-1,0,11,ch242data};
+
+/* char: 0xf1 */
+
+static const GLubyte ch241data[] = {
+0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0x0,0x4c,0x5a,0x32,
+};
+
+static const BitmapCharRec ch241 = {8,14,-1,0,10,ch241data};
+
+/* char: 0xf0 */
+
+static const GLubyte ch240data[] = {
+0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,
+0x7f,0x0,0x3e,0x0,0x4c,0x0,0x38,0x0,0x36,0x0,0x60,0x0,
+};
+
+static const BitmapCharRec ch240 = {9,14,-1,0,11,ch240data};
+
+/* char: 0xef */
+
+static const GLubyte ch239data[] = {
+0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xd8,0xd8,
+};
+
+static const BitmapCharRec ch239 = {5,13,0,0,4,ch239data};
+
+/* char: 0xee */
+
+static const GLubyte ch238data[] = {
+0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,0x78,0x30,
+};
+
+static const BitmapCharRec ch238 = {6,14,1,0,4,ch238data};
+
+/* char: 0xed */
+
+static const GLubyte ch237data[] = {
+0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0xc0,0x60,0x30,
+};
+
+static const BitmapCharRec ch237 = {4,14,0,0,4,ch237data};
+
+/* char: 0xec */
+
+static const GLubyte ch236data[] = {
+0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x0,0x30,0x60,0xc0,
+};
+
+static const BitmapCharRec ch236 = {4,14,0,0,4,ch236data};
+
+/* char: 0xeb */
+
+static const GLubyte ch235data[] = {
+0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x36,0x36,
+};
+
+static const BitmapCharRec ch235 = {8,13,-1,0,10,ch235data};
+
+/* char: 0xea */
+
+static const GLubyte ch234data[] = {
+0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x66,0x3c,0x18,
+};
+
+static const BitmapCharRec ch234 = {8,14,-1,0,10,ch234data};
+
+/* char: 0xe9 */
+
+static const GLubyte ch233data[] = {
+0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0xc,0x6,
+};
+
+static const BitmapCharRec ch233 = {8,14,-1,0,10,ch233data};
+
+/* char: 0xe8 */
+
+static const GLubyte ch232data[] = {
+0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,0x0,0x18,0x30,0x60,
+};
+
+static const BitmapCharRec ch232 = {8,14,-1,0,10,ch232data};
+
+/* char: 0xe7 */
+
+static const GLubyte ch231data[] = {
+0x78,0x6c,0xc,0x38,0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e,
+};
+
+static const BitmapCharRec ch231 = {8,14,-1,4,10,ch231data};
+
+/* char: 0xe6 */
+
+static const GLubyte ch230data[] = {
+0x75,0xe0,0xef,0xf8,0xc7,0x18,0xc6,0x0,0xe6,0x0,0x7f,0xf8,0xe,0x18,0xc6,0x18,
+0xef,0xf0,0x7d,0xe0,
+};
+
+static const BitmapCharRec ch230 = {13,10,-1,0,15,ch230data};
+
+/* char: 0xe5 */
+
+static const GLubyte ch229data[] = {
+0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x38,0x6c,0x6c,0x38,
+};
+
+static const BitmapCharRec ch229 = {7,14,-1,0,9,ch229data};
+
+/* char: 0xe4 */
+
+static const GLubyte ch228data[] = {
+0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x6c,0x6c,
+};
+
+static const BitmapCharRec ch228 = {7,13,-1,0,9,ch228data};
+
+/* char: 0xe3 */
+
+static const GLubyte ch227data[] = {
+0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x4c,0x5a,0x32,
+};
+
+static const BitmapCharRec ch227 = {7,14,-1,0,9,ch227data};
+
+/* char: 0xe2 */
+
+static const GLubyte ch226data[] = {
+0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x66,0x3c,0x18,
+};
+
+static const BitmapCharRec ch226 = {7,14,-1,0,9,ch226data};
+
+/* char: 0xe1 */
+
+static const GLubyte ch225data[] = {
+0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x30,0x18,0xc,
+};
+
+static const BitmapCharRec ch225 = {7,14,-1,0,9,ch225data};
+
+/* char: 0xe0 */
+
+static const GLubyte ch224data[] = {
+0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,0x0,0x18,0x30,0x60,
+};
+
+static const BitmapCharRec ch224 = {7,14,-1,0,9,ch224data};
+
+/* char: 0xdf */
+
+static const GLubyte ch223data[] = {
+0xdc,0xde,0xc6,0xc6,0xc6,0xc6,0xdc,0xdc,0xc6,0xc6,0xc6,0xc6,0x7c,0x38,
+};
+
+static const BitmapCharRec ch223 = {7,14,-1,0,9,ch223data};
+
+/* char: 0xde */
+
+static const GLubyte ch222data[] = {
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc1,0xc0,0xff,0x80,0xff,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,
+};
+
+static const BitmapCharRec ch222 = {10,14,-1,0,12,ch222data};
+
+/* char: 0xdd */
+
+static const GLubyte ch221data[] = {
+0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80,
+0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,0x0,0x0,0x6,0x0,
+0x3,0x0,0x1,0x80,
+};
+
+static const BitmapCharRec ch221 = {12,18,-1,0,14,ch221data};
+
+/* char: 0xdc */
+
+static const GLubyte ch220data[] = {
+0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80,
+0x19,0x80,
+};
+
+static const BitmapCharRec ch220 = {11,17,-1,0,13,ch220data};
+
+/* char: 0xdb */
+
+static const GLubyte ch219data[] = {
+0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x19,0x80,
+0xf,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch219 = {11,18,-1,0,13,ch219data};
+
+/* char: 0xda */
+
+static const GLubyte ch218data[] = {
+0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0xc,0x0,
+0x6,0x0,0x3,0x0,
+};
+
+static const BitmapCharRec ch218 = {11,18,-1,0,13,ch218data};
+
+/* char: 0xd9 */
+
+static const GLubyte ch217data[] = {
+0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0x0,0x0,0x6,0x0,
+0xc,0x0,0x18,0x0,
+};
+
+static const BitmapCharRec ch217 = {11,18,-1,0,13,ch217data};
+
+/* char: 0xd8 */
+
+static const GLubyte ch216data[] = {
+0xc7,0xc0,0xff,0xf0,0x78,0x38,0x38,0x18,0x6c,0x1c,0x6e,0xc,0x67,0xc,0x63,0x8c,
+0x61,0xcc,0x70,0xdc,0x30,0x78,0x38,0x38,0x1f,0xfc,0x7,0xcc,
+};
+
+static const BitmapCharRec ch216 = {14,14,0,0,15,ch216data};
+
+/* char: 0xd7 */
+
+static const GLubyte ch215data[] = {
+0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch215 = {10,9,0,0,10,ch215data};
+
+/* char: 0xd6 */
+
+static const GLubyte ch214data[] = {
+0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,
+0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xd,0x80,
+0xd,0x80,
+};
+
+static const BitmapCharRec ch214 = {13,17,-1,0,15,ch214data};
+
+/* char: 0xd5 */
+
+static const GLubyte ch213data[] = {
+0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,
+0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x9,0x80,
+0xb,0x40,0x6,0x40,
+};
+
+static const BitmapCharRec ch213 = {13,18,-1,0,15,ch213data};
+
+/* char: 0xd4 */
+
+static const GLubyte ch212data[] = {
+0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,
+0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0xc,0xc0,
+0x7,0x80,0x3,0x0,
+};
+
+static const BitmapCharRec ch212 = {13,18,-1,0,15,ch212data};
+
+/* char: 0xd3 */
+
+static const GLubyte ch211data[] = {
+0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,
+0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0,
+0x1,0x80,0x0,0xc0,
+};
+
+static const BitmapCharRec ch211 = {13,18,-1,0,15,ch211data};
+
+/* char: 0xd2 */
+
+static const GLubyte ch210data[] = {
+0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,
+0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,0x0,0x0,0x3,0x0,
+0x6,0x0,0xc,0x0,
+};
+
+static const BitmapCharRec ch210 = {13,18,-1,0,15,ch210data};
+
+/* char: 0xd1 */
+
+static const GLubyte ch209data[] = {
+0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60,
+0xcc,0x60,0xd8,0x60,0xd8,0x60,0xf0,0x60,0xe0,0x60,0xe0,0x60,0x0,0x0,0x13,0x0,
+0x16,0x80,0xc,0x80,
+};
+
+static const BitmapCharRec ch209 = {11,18,-1,0,13,ch209data};
+
+/* char: 0xd0 */
+
+static const GLubyte ch208data[] = {
+0x7f,0x80,0x7f,0xc0,0x60,0xe0,0x60,0x60,0x60,0x30,0x60,0x30,0xfc,0x30,0xfc,0x30,
+0x60,0x30,0x60,0x30,0x60,0x60,0x60,0xe0,0x7f,0xc0,0x7f,0x80,
+};
+
+static const BitmapCharRec ch208 = {12,14,0,0,13,ch208data};
+
+/* char: 0xcf */
+
+static const GLubyte ch207data[] = {
+0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,
+0xcc,
+};
+
+static const BitmapCharRec ch207 = {6,17,0,0,6,ch207data};
+
+/* char: 0xce */
+
+static const GLubyte ch206data[] = {
+0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0xcc,
+0x78,0x30,
+};
+
+static const BitmapCharRec ch206 = {6,18,0,0,6,ch206data};
+
+/* char: 0xcd */
+
+static const GLubyte ch205data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0xc0,
+0x60,0x30,
+};
+
+static const BitmapCharRec ch205 = {4,18,-2,0,6,ch205data};
+
+/* char: 0xcc */
+
+static const GLubyte ch204data[] = {
+0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x30,
+0x60,0xc0,
+};
+
+static const BitmapCharRec ch204 = {4,18,0,0,6,ch204data};
+
+/* char: 0xcb */
+
+static const GLubyte ch203data[] = {
+0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0,
+0x33,0x0,
+};
+
+static const BitmapCharRec ch203 = {9,17,-1,0,11,ch203data};
+
+/* char: 0xca */
+
+static const GLubyte ch202data[] = {
+0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0x33,0x0,
+0x1e,0x0,0xc,0x0,
+};
+
+static const BitmapCharRec ch202 = {9,18,-1,0,11,ch202data};
+
+/* char: 0xc9 */
+
+static const GLubyte ch201data[] = {
+0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0,
+0x6,0x0,0x3,0x0,
+};
+
+static const BitmapCharRec ch201 = {9,18,-1,0,11,ch201data};
+
+/* char: 0xc8 */
+
+static const GLubyte ch200data[] = {
+0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,0x0,0x0,0xc,0x0,
+0x18,0x0,0x30,0x0,
+};
+
+static const BitmapCharRec ch200 = {9,18,-1,0,11,ch200data};
+
+/* char: 0xc7 */
+
+static const GLubyte ch199data[] = {
+0x1e,0x0,0x1b,0x0,0x3,0x0,0xe,0x0,0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,
+0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,
+0x3f,0xe0,0xf,0x80,
+};
+
+static const BitmapCharRec ch199 = {12,18,-1,4,14,ch199data};
+
+/* char: 0xc6 */
+
+static const GLubyte ch198data[] = {
+0xc1,0xff,0xc1,0xff,0x61,0x80,0x61,0x80,0x7f,0x80,0x3f,0x80,0x31,0xfe,0x31,0xfe,
+0x19,0x80,0x19,0x80,0xd,0x80,0xd,0x80,0x7,0xff,0x7,0xff,
+};
+
+static const BitmapCharRec ch198 = {16,14,-1,0,18,ch198data};
+
+/* char: 0xc5 */
+
+static const GLubyte ch197data[] = {
+0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,
+0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80,
+0x19,0x80,0xf,0x0,
+};
+
+static const BitmapCharRec ch197 = {12,18,0,0,12,ch197data};
+
+/* char: 0xc4 */
+
+static const GLubyte ch196data[] = {
+0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,
+0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80,
+0x19,0x80,
+};
+
+static const BitmapCharRec ch196 = {12,17,0,0,12,ch196data};
+
+/* char: 0xc3 */
+
+static const GLubyte ch195data[] = {
+0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,
+0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x13,0x0,
+0x16,0x80,0xc,0x80,
+};
+
+static const BitmapCharRec ch195 = {12,18,0,0,12,ch195data};
+
+/* char: 0xc2 */
+
+static const GLubyte ch194data[] = {
+0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,
+0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x19,0x80,
+0xf,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch194 = {12,18,0,0,12,ch194data};
+
+/* char: 0xc1 */
+
+static const GLubyte ch193data[] = {
+0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,
+0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0,
+0x3,0x0,0x1,0x80,
+};
+
+static const BitmapCharRec ch193 = {12,18,0,0,12,ch193data};
+
+/* char: 0xc0 */
+
+static const GLubyte ch192data[] = {
+0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,
+0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,0x0,0x0,0x6,0x0,
+0xc,0x0,0x18,0x0,
+};
+
+static const BitmapCharRec ch192 = {12,18,0,0,12,ch192data};
+
+/* char: 0xbf */
+
+static const GLubyte ch191data[] = {
+0x7c,0xfe,0xc6,0xc6,0xe0,0x70,0x38,0x18,0x18,0x18,0x0,0x0,0x18,0x18,
+};
+
+static const BitmapCharRec ch191 = {7,14,-1,4,10,ch191data};
+
+/* char: 0xbe */
+
+static const GLubyte ch190data[] = {
+0x18,0x18,0x18,0x18,0xc,0xfc,0x6,0xd8,0x6,0x78,0x73,0x38,0xf9,0x18,0x99,0x88,
+0x30,0xc0,0x30,0xc0,0x98,0x60,0xf8,0x30,0x70,0x30,
+};
+
+static const BitmapCharRec ch190 = {14,13,0,0,15,ch190data};
+
+/* char: 0xbd */
+
+static const GLubyte ch189data[] = {
+0x30,0xf8,0x30,0xf8,0x18,0x60,0xc,0x30,0xc,0x18,0x66,0x98,0x62,0xf8,0x63,0x70,
+0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60,
+};
+
+static const BitmapCharRec ch189 = {13,13,-1,0,15,ch189data};
+
+/* char: 0xbc */
+
+static const GLubyte ch188data[] = {
+0x30,0x30,0x30,0x30,0x19,0xf8,0xd,0xb0,0xc,0xf0,0x66,0x70,0x62,0x30,0x63,0x10,
+0x61,0x80,0x61,0x80,0xe0,0xc0,0xe0,0x60,0x60,0x60,
+};
+
+static const BitmapCharRec ch188 = {13,13,-1,0,15,ch188data};
+
+/* char: 0xbb */
+
+static const GLubyte ch187data[] = {
+0x90,0xd8,0x6c,0x36,0x36,0x6c,0xd8,0x90,
+};
+
+static const BitmapCharRec ch187 = {7,8,-1,-1,9,ch187data};
+
+/* char: 0xba */
+
+static const GLubyte ch186data[] = {
+0xf8,0x0,0x70,0xd8,0x88,0x88,0xd8,0x70,
+};
+
+static const BitmapCharRec ch186 = {5,8,-1,-6,7,ch186data};
+
+/* char: 0xb9 */
+
+static const GLubyte ch185data[] = {
+0x60,0x60,0x60,0x60,0x60,0xe0,0xe0,0x60,
+};
+
+static const BitmapCharRec ch185 = {3,8,-1,-5,6,ch185data};
+
+/* char: 0xb8 */
+
+static const GLubyte ch184data[] = {
+0xf0,0xd8,0x18,0x70,0x60,
+};
+
+static const BitmapCharRec ch184 = {5,5,0,4,5,ch184data};
+
+/* char: 0xb7 */
+
+static const GLubyte ch183data[] = {
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch183 = {2,2,-1,-4,4,ch183data};
+
+/* char: 0xb6 */
+
+static const GLubyte ch182data[] = {
+0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x32,0x72,0xf2,0xf2,0xf2,0xf2,
+0x72,0x3f,
+};
+
+static const BitmapCharRec ch182 = {8,18,-1,4,10,ch182data};
+
+/* char: 0xb5 */
+
+static const GLubyte ch181data[] = {
+0xc0,0xc0,0xc0,0xc0,0xdb,0xff,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,
+};
+
+static const BitmapCharRec ch181 = {8,14,-1,4,10,ch181data};
+
+/* char: 0xb4 */
+
+static const GLubyte ch180data[] = {
+0xc0,0x60,0x30,
+};
+
+static const BitmapCharRec ch180 = {4,3,0,-11,4,ch180data};
+
+/* char: 0xb3 */
+
+static const GLubyte ch179data[] = {
+0x70,0xf8,0x98,0x30,0x30,0x98,0xf8,0x70,
+};
+
+static const BitmapCharRec ch179 = {5,8,0,-5,6,ch179data};
+
+/* char: 0xb2 */
+
+static const GLubyte ch178data[] = {
+0xf8,0xf8,0x60,0x30,0x18,0x98,0xf8,0x70,
+};
+
+static const BitmapCharRec ch178 = {5,8,0,-5,6,ch178data};
+
+/* char: 0xb1 */
+
+static const GLubyte ch177data[] = {
+0xff,0xff,0x0,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,
+};
+
+static const BitmapCharRec ch177 = {8,11,-1,0,10,ch177data};
+
+/* char: 0xb0 */
+
+static const GLubyte ch176data[] = {
+0x70,0xd8,0x88,0xd8,0x70,
+};
+
+static const BitmapCharRec ch176 = {5,5,-1,-8,7,ch176data};
+
+/* char: 0xaf */
+
+static const GLubyte ch175data[] = {
+0xf8,
+};
+
+static const BitmapCharRec ch175 = {5,1,0,-12,5,ch175data};
+
+/* char: 0xae */
+
+static const GLubyte ch174data[] = {
+0xf,0x80,0x30,0x60,0x40,0x10,0x48,0x50,0x88,0x88,0x89,0x8,0x8f,0x88,0x88,0x48,
+0x88,0x48,0x4f,0x90,0x40,0x10,0x30,0x60,0xf,0x80,
+};
+
+static const BitmapCharRec ch174 = {13,13,-1,0,14,ch174data};
+
+/* char: 0xad */
+
+static const GLubyte ch173data[] = {
+0xf8,0xf8,
+};
+
+static const BitmapCharRec ch173 = {5,2,-1,-4,7,ch173data};
+
+/* char: 0xac */
+
+static const GLubyte ch172data[] = {
+0x1,0x80,0x1,0x80,0x1,0x80,0xff,0x80,0xff,0x80,
+};
+
+static const BitmapCharRec ch172 = {9,5,-1,-3,11,ch172data};
+
+/* char: 0xab */
+
+static const GLubyte ch171data[] = {
+0x12,0x36,0x6c,0xd8,0xd8,0x6c,0x36,0x12,
+};
+
+static const BitmapCharRec ch171 = {7,8,-1,-1,9,ch171data};
+
+/* char: 0xaa */
+
+static const GLubyte ch170data[] = {
+0xf8,0x0,0x68,0xd8,0x48,0x38,0xc8,0x70,
+};
+
+static const BitmapCharRec ch170 = {5,8,-1,-6,7,ch170data};
+
+/* char: 0xa9 */
+
+static const GLubyte ch169data[] = {
+0xf,0x80,0x30,0x60,0x40,0x10,0x47,0x10,0x88,0x88,0x90,0x8,0x90,0x8,0x90,0x8,
+0x88,0x88,0x47,0x10,0x40,0x10,0x30,0x60,0xf,0x80,
+};
+
+static const BitmapCharRec ch169 = {13,13,-1,0,15,ch169data};
+
+/* char: 0xa8 */
+
+static const GLubyte ch168data[] = {
+0xd8,0xd8,
+};
+
+static const BitmapCharRec ch168 = {5,2,0,-11,6,ch168data};
+
+/* char: 0xa7 */
+
+static const GLubyte ch167data[] = {
+0x3c,0x7e,0xc3,0xc3,0x7,0xe,0x3e,0x73,0xe3,0xc3,0xc7,0x6e,0x7c,0xf0,0xc3,0xc3,
+0x7e,0x3c,
+};
+
+static const BitmapCharRec ch167 = {8,18,-1,4,10,ch167data};
+
+/* char: 0xa6 */
+
+static const GLubyte ch166data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,
+};
+
+static const BitmapCharRec ch166 = {2,17,-1,3,4,ch166data};
+
+/* char: 0xa5 */
+
+static const GLubyte ch165data[] = {
+0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x3c,0x66,0x66,0x66,0xc3,0xc3,
+};
+
+static const BitmapCharRec ch165 = {8,13,-1,0,10,ch165data};
+
+/* char: 0xa4 */
+
+static const GLubyte ch164data[] = {
+0xc3,0xff,0x66,0x66,0x66,0xff,0xc3,
+};
+
+static const BitmapCharRec ch164 = {8,7,-1,-3,10,ch164data};
+
+/* char: 0xa3 */
+
+static const GLubyte ch163data[] = {
+0xdf,0x0,0xff,0x80,0x60,0x80,0x30,0x0,0x18,0x0,0x18,0x0,0x7e,0x0,0x30,0x0,
+0x60,0x0,0x61,0x80,0x61,0x80,0x3f,0x0,0x1e,0x0,
+};
+
+static const BitmapCharRec ch163 = {9,13,0,0,10,ch163data};
+
+/* char: 0xa2 */
+
+static const GLubyte ch162data[] = {
+0x10,0x10,0x3e,0x7f,0x6b,0xc8,0xc8,0xc8,0xc8,0x6b,0x7f,0x3e,0x4,0x4,
+};
+
+static const BitmapCharRec ch162 = {8,14,-1,2,10,ch162data};
+
+/* char: 0xa1 */
+
+static const GLubyte ch161data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x40,0x40,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch161 = {2,14,-2,4,6,ch161data};
+
+/* char: 0xa0 */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch160data[] = { 0x0 };
+static const BitmapCharRec ch160 = {1,1,0,0,5,ch160data};
+#else
+static const BitmapCharRec ch160 = {0,0,0,0,5,0};
+#endif
+
+/* char: 0x7e '~' */
+
+static const GLubyte ch126data[] = {
+0xcc,0x7e,0x33,
+};
+
+static const BitmapCharRec ch126 = {8,3,-1,-4,10,ch126data};
+
+/* char: 0x7d '}' */
+
+static const GLubyte ch125data[] = {
+0xc0,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0xc,0x18,0x30,0x30,0x30,0x30,0x30,
+0x60,0xc0,
+};
+
+static const BitmapCharRec ch125 = {6,18,0,4,6,ch125data};
+
+/* char: 0x7c '|' */
+
+static const GLubyte ch124data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch124 = {2,18,-1,4,4,ch124data};
+
+/* char: 0x7b '{' */
+
+static const GLubyte ch123data[] = {
+0xc,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x30,0x30,0x30,
+0x18,0xc,
+};
+
+static const BitmapCharRec ch123 = {6,18,0,4,6,ch123data};
+
+/* char: 0x7a 'z' */
+
+static const GLubyte ch122data[] = {
+0xfe,0xfe,0xc0,0x60,0x30,0x18,0xc,0x6,0xfe,0xfe,
+};
+
+static const BitmapCharRec ch122 = {7,10,-1,0,9,ch122data};
+
+/* char: 0x79 'y' */
+
+static const GLubyte ch121data[] = {
+0x70,0x70,0x18,0x18,0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,
+};
+
+static const BitmapCharRec ch121 = {8,14,-1,4,10,ch121data};
+
+/* char: 0x78 'x' */
+
+static const GLubyte ch120data[] = {
+0xc3,0xe7,0x66,0x3c,0x18,0x18,0x3c,0x66,0xe7,0xc3,
+};
+
+static const BitmapCharRec ch120 = {8,10,-1,0,10,ch120data};
+
+/* char: 0x77 'w' */
+
+static const GLubyte ch119data[] = {
+0x19,0x80,0x19,0x80,0x39,0xc0,0x29,0x40,0x69,0x60,0x66,0x60,0x66,0x60,0xc6,0x30,
+0xc6,0x30,0xc6,0x30,
+};
+
+static const BitmapCharRec ch119 = {12,10,-1,0,14,ch119data};
+
+/* char: 0x76 'v' */
+
+static const GLubyte ch118data[] = {
+0x18,0x18,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3,0xc3,
+};
+
+static const BitmapCharRec ch118 = {8,10,-1,0,10,ch118data};
+
+/* char: 0x75 'u' */
+
+static const GLubyte ch117data[] = {
+0x73,0xfb,0xc7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,
+};
+
+static const BitmapCharRec ch117 = {8,10,-1,0,10,ch117data};
+
+/* char: 0x74 't' */
+
+static const GLubyte ch116data[] = {
+0x18,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x30,
+};
+
+static const BitmapCharRec ch116 = {6,13,0,0,6,ch116data};
+
+/* char: 0x73 's' */
+
+static const GLubyte ch115data[] = {
+0x78,0xfc,0xc6,0x6,0x3e,0xfc,0xc0,0xc6,0x7e,0x3c,
+};
+
+static const BitmapCharRec ch115 = {7,10,-1,0,9,ch115data};
+
+/* char: 0x72 'r' */
+
+static const GLubyte ch114data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xd8,0xd8,
+};
+
+static const BitmapCharRec ch114 = {5,10,-1,0,6,ch114data};
+
+/* char: 0x71 'q' */
+
+static const GLubyte ch113data[] = {
+0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,
+0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,0x7f,0x80,0x3d,0x80,
+};
+
+static const BitmapCharRec ch113 = {9,14,-1,4,11,ch113data};
+
+/* char: 0x70 'p' */
+
+static const GLubyte ch112data[] = {
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,
+0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,0xff,0x0,0xde,0x0,
+};
+
+static const BitmapCharRec ch112 = {9,14,-1,4,11,ch112data};
+
+/* char: 0x6f 'o' */
+
+static const GLubyte ch111data[] = {
+0x3e,0x0,0x7f,0x0,0x63,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x0,
+0x7f,0x0,0x3e,0x0,
+};
+
+static const BitmapCharRec ch111 = {9,10,-1,0,11,ch111data};
+
+/* char: 0x6e 'n' */
+
+static const GLubyte ch110data[] = {
+0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,
+};
+
+static const BitmapCharRec ch110 = {8,10,-1,0,10,ch110data};
+
+/* char: 0x6d 'm' */
+
+static const GLubyte ch109data[] = {
+0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xe7,0x30,
+0xde,0xf0,0xcc,0x60,
+};
+
+static const BitmapCharRec ch109 = {12,10,-1,0,14,ch109data};
+
+/* char: 0x6c 'l' */
+
+static const GLubyte ch108data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch108 = {2,14,-1,0,4,ch108data};
+
+/* char: 0x6b 'k' */
+
+static const GLubyte ch107data[] = {
+0xc7,0xc6,0xce,0xcc,0xd8,0xf8,0xf0,0xd8,0xcc,0xc6,0xc0,0xc0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch107 = {8,14,-1,0,9,ch107data};
+
+/* char: 0x6a 'j' */
+
+static const GLubyte ch106data[] = {
+0xe0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x0,0x0,
+0x30,0x30,
+};
+
+static const BitmapCharRec ch106 = {4,18,1,4,4,ch106data};
+
+/* char: 0x69 'i' */
+
+static const GLubyte ch105data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch105 = {2,14,-1,0,4,ch105data};
+
+/* char: 0x68 'h' */
+
+static const GLubyte ch104data[] = {
+0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xe3,0xdf,0xce,0xc0,0xc0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch104 = {8,14,-1,0,10,ch104data};
+
+/* char: 0x67 'g' */
+
+static const GLubyte ch103data[] = {
+0x1c,0x0,0x7f,0x0,0x63,0x0,0x1,0x80,0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,
+0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x7f,0x80,0x3d,0x80,
+};
+
+static const BitmapCharRec ch103 = {9,14,-1,4,11,ch103data};
+
+/* char: 0x66 'f' */
+
+static const GLubyte ch102data[] = {
+0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfc,0xfc,0x30,0x30,0x3c,0x1c,
+};
+
+static const BitmapCharRec ch102 = {6,14,0,0,6,ch102data};
+
+/* char: 0x65 'e' */
+
+static const GLubyte ch101data[] = {
+0x3c,0x7f,0xe3,0xc0,0xc0,0xff,0xc3,0xc3,0x7e,0x3c,
+};
+
+static const BitmapCharRec ch101 = {8,10,-1,0,10,ch101data};
+
+/* char: 0x64 'd' */
+
+static const GLubyte ch100data[] = {
+0x3d,0x80,0x7f,0x80,0x63,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x80,
+0x7f,0x80,0x3d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,
+};
+
+static const BitmapCharRec ch100 = {9,14,-1,0,11,ch100data};
+
+/* char: 0x63 'c' */
+
+static const GLubyte ch99data[] = {
+0x3e,0x7f,0x63,0xc0,0xc0,0xc0,0xc0,0x63,0x7f,0x3e,
+};
+
+static const BitmapCharRec ch99 = {8,10,-1,0,10,ch99data};
+
+/* char: 0x62 'b' */
+
+static const GLubyte ch98data[] = {
+0xde,0x0,0xff,0x0,0xe3,0x0,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xe3,0x0,
+0xff,0x0,0xde,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,
+};
+
+static const BitmapCharRec ch98 = {9,14,-1,0,11,ch98data};
+
+/* char: 0x61 'a' */
+
+static const GLubyte ch97data[] = {
+0x76,0xee,0xc6,0xc6,0xe6,0x7e,0xe,0xc6,0xee,0x7c,
+};
+
+static const BitmapCharRec ch97 = {7,10,-1,0,9,ch97data};
+
+/* char: 0x60 '`' */
+
+static const GLubyte ch96data[] = {
+0xc0,0xc0,0x80,0x80,0x40,
+};
+
+static const BitmapCharRec ch96 = {2,5,-1,-9,4,ch96data};
+
+/* char: 0x5f '_' */
+
+static const GLubyte ch95data[] = {
+0xff,0xc0,0xff,0xc0,
+};
+
+static const BitmapCharRec ch95 = {10,2,0,4,10,ch95data};
+
+/* char: 0x5e '^' */
+
+static const GLubyte ch94data[] = {
+0x82,0xc6,0x6c,0x38,0x10,
+};
+
+static const BitmapCharRec ch94 = {7,5,-1,-8,9,ch94data};
+
+/* char: 0x5d ']' */
+
+static const GLubyte ch93data[] = {
+0xf0,0xf0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+0xf0,0xf0,
+};
+
+static const BitmapCharRec ch93 = {4,18,0,4,5,ch93data};
+
+/* char: 0x5c '\' */
+
+static const GLubyte ch92data[] = {
+0x18,0x18,0x10,0x10,0x30,0x30,0x20,0x20,0x60,0x60,0x40,0x40,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch92 = {5,14,0,0,5,ch92data};
+
+/* char: 0x5b '[' */
+
+static const GLubyte ch91data[] = {
+0xf0,0xf0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xf0,0xf0,
+};
+
+static const BitmapCharRec ch91 = {4,18,-1,4,5,ch91data};
+
+/* char: 0x5a 'Z' */
+
+static const GLubyte ch90data[] = {
+0xff,0xc0,0xff,0xc0,0xc0,0x0,0x60,0x0,0x30,0x0,0x18,0x0,0x1c,0x0,0xc,0x0,
+0x6,0x0,0x3,0x0,0x1,0x80,0x0,0xc0,0xff,0xc0,0xff,0xc0,
+};
+
+static const BitmapCharRec ch90 = {10,14,-1,0,12,ch90data};
+
+/* char: 0x59 'Y' */
+
+static const GLubyte ch89data[] = {
+0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xf,0x0,0x19,0x80,
+0x30,0xc0,0x30,0xc0,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,
+};
+
+static const BitmapCharRec ch89 = {12,14,-1,0,14,ch89data};
+
+/* char: 0x58 'X' */
+
+static const GLubyte ch88data[] = {
+0xc0,0x60,0xe0,0xe0,0x60,0xc0,0x71,0xc0,0x31,0x80,0x1b,0x0,0xe,0x0,0xe,0x0,
+0x1b,0x0,0x31,0x80,0x71,0xc0,0x60,0xc0,0xe0,0xe0,0xc0,0x60,
+};
+
+static const BitmapCharRec ch88 = {11,14,-1,0,13,ch88data};
+
+/* char: 0x57 'W' */
+
+static const GLubyte ch87data[] = {
+0x18,0x18,0x18,0x18,0x1c,0x38,0x34,0x2c,0x36,0x6c,0x36,0x6c,0x66,0x66,0x66,0x66,
+0x62,0x46,0x63,0xc6,0xc3,0xc3,0xc1,0x83,0xc1,0x83,0xc1,0x83,
+};
+
+static const BitmapCharRec ch87 = {16,14,-1,0,18,ch87data};
+
+/* char: 0x56 'V' */
+
+static const GLubyte ch86data[] = {
+0x6,0x0,0xf,0x0,0xf,0x0,0x19,0x80,0x19,0x80,0x19,0x80,0x30,0xc0,0x30,0xc0,
+0x30,0xc0,0x60,0x60,0x60,0x60,0x60,0x60,0xc0,0x30,0xc0,0x30,
+};
+
+static const BitmapCharRec ch86 = {12,14,-1,0,14,ch86data};
+
+/* char: 0x55 'U' */
+
+static const GLubyte ch85data[] = {
+0x1f,0x0,0x7f,0xc0,0x60,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+};
+
+static const BitmapCharRec ch85 = {11,14,-1,0,13,ch85data};
+
+/* char: 0x54 'T' */
+
+static const GLubyte ch84data[] = {
+0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,
+0xc,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0xff,0xc0,0xff,0xc0,
+};
+
+static const BitmapCharRec ch84 = {10,14,-1,0,12,ch84data};
+
+/* char: 0x53 'S' */
+
+static const GLubyte ch83data[] = {
+0x3f,0x0,0x7f,0xc0,0xe0,0xe0,0xc0,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,0x1f,0x0,
+0x7c,0x0,0xe0,0x0,0xc0,0x60,0xe0,0xe0,0x7f,0xc0,0x1f,0x0,
+};
+
+static const BitmapCharRec ch83 = {11,14,-1,0,13,ch83data};
+
+/* char: 0x52 'R' */
+
+static const GLubyte ch82data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0x80,0xc1,0x80,0xff,0x0,0xff,0x80,
+0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,
+};
+
+static const BitmapCharRec ch82 = {10,14,-1,0,12,ch82data};
+
+/* char: 0x51 'Q' */
+
+static const GLubyte ch81data[] = {
+0x0,0x30,0xf,0xb0,0x3f,0xe0,0x70,0xf0,0x61,0xb0,0xe1,0xb8,0xc0,0x18,0xc0,0x18,
+0xc0,0x18,0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,
+};
+
+static const BitmapCharRec ch81 = {13,15,-1,1,15,ch81data};
+
+/* char: 0x50 'P' */
+
+static const GLubyte ch80data[] = {
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x80,
+0xc1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,
+};
+
+static const BitmapCharRec ch80 = {10,14,-1,0,12,ch80data};
+
+/* char: 0x4f 'O' */
+
+static const GLubyte ch79data[] = {
+0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x38,0xc0,0x18,0xc0,0x18,0xc0,0x18,
+0xc0,0x18,0xe0,0x38,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,
+};
+
+static const BitmapCharRec ch79 = {13,14,-1,0,15,ch79data};
+
+/* char: 0x4e 'N' */
+
+static const GLubyte ch78data[] = {
+0xc0,0x60,0xc0,0xe0,0xc1,0xe0,0xc1,0xe0,0xc3,0x60,0xc6,0x60,0xc6,0x60,0xcc,0x60,
+0xcc,0x60,0xd8,0x60,0xf0,0x60,0xf0,0x60,0xe0,0x60,0xc0,0x60,
+};
+
+static const BitmapCharRec ch78 = {11,14,-1,0,13,ch78data};
+
+/* char: 0x4d 'M' */
+
+static const GLubyte ch77data[] = {
+0xc3,0xc,0xc3,0xc,0xc7,0x8c,0xc4,0x8c,0xcc,0xcc,0xcc,0xcc,0xd8,0x6c,0xd8,0x6c,
+0xf0,0x3c,0xf0,0x3c,0xe0,0x1c,0xe0,0x1c,0xc0,0xc,0xc0,0xc,
+};
+
+static const BitmapCharRec ch77 = {14,14,-1,0,16,ch77data};
+
+/* char: 0x4c 'L' */
+
+static const GLubyte ch76data[] = {
+0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch76 = {8,14,-1,0,10,ch76data};
+
+/* char: 0x4b 'K' */
+
+static const GLubyte ch75data[] = {
+0xc0,0x70,0xc0,0xe0,0xc1,0xc0,0xc3,0x80,0xc7,0x0,0xce,0x0,0xfc,0x0,0xf8,0x0,
+0xdc,0x0,0xce,0x0,0xc7,0x0,0xc3,0x80,0xc1,0xc0,0xc0,0xe0,
+};
+
+static const BitmapCharRec ch75 = {12,14,-1,0,13,ch75data};
+
+/* char: 0x4a 'J' */
+
+static const GLubyte ch74data[] = {
+0x3c,0x7e,0xe7,0xc3,0xc3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,
+};
+
+static const BitmapCharRec ch74 = {8,14,-1,0,10,ch74data};
+
+/* char: 0x49 'I' */
+
+static const GLubyte ch73data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch73 = {2,14,-2,0,6,ch73data};
+
+/* char: 0x48 'H' */
+
+static const GLubyte ch72data[] = {
+0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xff,0xe0,0xff,0xe0,
+0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+};
+
+static const BitmapCharRec ch72 = {11,14,-1,0,13,ch72data};
+
+/* char: 0x47 'G' */
+
+static const GLubyte ch71data[] = {
+0xf,0xb0,0x3f,0xf0,0x70,0x70,0x60,0x30,0xe0,0x30,0xc1,0xf0,0xc1,0xf0,0xc0,0x0,
+0xc0,0x0,0xe0,0x30,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,
+};
+
+static const BitmapCharRec ch71 = {12,14,-1,0,14,ch71data};
+
+/* char: 0x46 'F' */
+
+static const GLubyte ch70data[] = {
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,
+};
+
+static const BitmapCharRec ch70 = {9,14,-1,0,11,ch70data};
+
+/* char: 0x45 'E' */
+
+static const GLubyte ch69data[] = {
+0xff,0x80,0xff,0x80,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x0,0xff,0x0,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,0xff,0x80,
+};
+
+static const BitmapCharRec ch69 = {9,14,-1,0,11,ch69data};
+
+/* char: 0x44 'D' */
+
+static const GLubyte ch68data[] = {
+0xff,0x0,0xff,0x80,0xc1,0xc0,0xc0,0xc0,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,
+0xc0,0x60,0xc0,0x60,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,
+};
+
+static const BitmapCharRec ch68 = {11,14,-1,0,13,ch68data};
+
+/* char: 0x43 'C' */
+
+static const GLubyte ch67data[] = {
+0xf,0x80,0x3f,0xe0,0x70,0x70,0x60,0x30,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,
+0xc0,0x0,0xe0,0x0,0x60,0x30,0x70,0x70,0x3f,0xe0,0xf,0x80,
+};
+
+static const BitmapCharRec ch67 = {12,14,-1,0,14,ch67data};
+
+/* char: 0x42 'B' */
+
+static const GLubyte ch66data[] = {
+0xff,0x80,0xff,0xc0,0xc0,0xe0,0xc0,0x60,0xc0,0x60,0xc0,0xe0,0xff,0xc0,0xff,0x80,
+0xc1,0x80,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0xff,0x80,0xff,0x0,
+};
+
+static const BitmapCharRec ch66 = {11,14,-1,0,13,ch66data};
+
+/* char: 0x41 'A' */
+
+static const GLubyte ch65data[] = {
+0xc0,0x30,0xc0,0x30,0x60,0x60,0x60,0x60,0x7f,0xe0,0x3f,0xc0,0x30,0xc0,0x30,0xc0,
+0x19,0x80,0x19,0x80,0xf,0x0,0xf,0x0,0x6,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch65 = {12,14,0,0,12,ch65data};
+
+/* char: 0x40 '@' */
+
+static const GLubyte ch64data[] = {
+0x7,0xe0,0x1f,0xf0,0x38,0x0,0x70,0x0,0x67,0x70,0xcf,0xf8,0xcc,0xcc,0xcc,0x66,
+0xcc,0x66,0xcc,0x63,0xc6,0x33,0x67,0x73,0x63,0xb3,0x30,0x6,0x1c,0xe,0xf,0xfc,
+0x3,0xf0,
+};
+
+static const BitmapCharRec ch64 = {16,17,-1,3,18,ch64data};
+
+/* char: 0x3f '?' */
+
+static const GLubyte ch63data[] = {
+0x30,0x30,0x0,0x0,0x30,0x30,0x30,0x38,0x1c,0xe,0xc6,0xc6,0xfe,0x7c,
+};
+
+static const BitmapCharRec ch63 = {7,14,-1,0,10,ch63data};
+
+/* char: 0x3e '>' */
+
+static const GLubyte ch62data[] = {
+0xc0,0xf0,0x3c,0xe,0x3,0xe,0x3c,0xf0,0xc0,
+};
+
+static const BitmapCharRec ch62 = {8,9,-1,0,10,ch62data};
+
+/* char: 0x3d '=' */
+
+static const GLubyte ch61data[] = {
+0xfe,0xfe,0x0,0x0,0xfe,0xfe,
+};
+
+static const BitmapCharRec ch61 = {7,6,-2,-2,11,ch61data};
+
+/* char: 0x3c '<' */
+
+static const GLubyte ch60data[] = {
+0x3,0xf,0x3c,0x70,0xc0,0x70,0x3c,0xf,0x3,
+};
+
+static const BitmapCharRec ch60 = {8,9,-1,0,10,ch60data};
+
+/* char: 0x3b ';' */
+
+static const GLubyte ch59data[] = {
+0x80,0x40,0x40,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch59 = {2,13,-1,3,5,ch59data};
+
+/* char: 0x3a ':' */
+
+static const GLubyte ch58data[] = {
+0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch58 = {2,10,-1,0,5,ch58data};
+
+/* char: 0x39 '9' */
+
+static const GLubyte ch57data[] = {
+0x7c,0xfe,0xc6,0x3,0x3,0x3b,0x7f,0xc3,0xc3,0xc3,0xc7,0x7e,0x3c,
+};
+
+static const BitmapCharRec ch57 = {8,13,-1,0,10,ch57data};
+
+/* char: 0x38 '8' */
+
+static const GLubyte ch56data[] = {
+0x3c,0x7e,0xe7,0xc3,0xc3,0x66,0x7e,0x66,0xc3,0xc3,0xe7,0x7e,0x3c,
+};
+
+static const BitmapCharRec ch56 = {8,13,-1,0,10,ch56data};
+
+/* char: 0x37 '7' */
+
+static const GLubyte ch55data[] = {
+0x60,0x60,0x30,0x30,0x30,0x18,0x18,0xc,0xc,0x6,0x3,0xff,0xff,
+};
+
+static const BitmapCharRec ch55 = {8,13,-1,0,10,ch55data};
+
+/* char: 0x36 '6' */
+
+static const GLubyte ch54data[] = {
+0x3c,0x7e,0xe3,0xc3,0xc3,0xc3,0xfe,0xdc,0xc0,0xc0,0x63,0x7f,0x3c,
+};
+
+static const BitmapCharRec ch54 = {8,13,-1,0,10,ch54data};
+
+/* char: 0x35 '5' */
+
+static const GLubyte ch53data[] = {
+0x7c,0xfe,0xc7,0xc3,0x3,0x3,0xc7,0xfe,0xfc,0xc0,0xc0,0xfe,0xfe,
+};
+
+static const BitmapCharRec ch53 = {8,13,-1,0,10,ch53data};
+
+/* char: 0x34 '4' */
+
+static const GLubyte ch52data[] = {
+0x3,0x0,0x3,0x0,0x3,0x0,0xff,0x80,0xff,0x80,0xc3,0x0,0x63,0x0,0x33,0x0,
+0x33,0x0,0x1b,0x0,0xf,0x0,0x7,0x0,0x3,0x0,
+};
+
+static const BitmapCharRec ch52 = {9,13,-1,0,10,ch52data};
+
+/* char: 0x33 '3' */
+
+static const GLubyte ch51data[] = {
+0x3c,0x7e,0xc7,0xc3,0x3,0x7,0x1e,0x1c,0x6,0xc3,0xc3,0x7e,0x3c,
+};
+
+static const BitmapCharRec ch51 = {8,13,-1,0,10,ch51data};
+
+/* char: 0x32 '2' */
+
+static const GLubyte ch50data[] = {
+0xff,0xff,0xc0,0xe0,0x70,0x38,0x1c,0xe,0x7,0x3,0xc3,0xfe,0x3c,
+};
+
+static const BitmapCharRec ch50 = {8,13,-1,0,10,ch50data};
+
+/* char: 0x31 '1' */
+
+static const GLubyte ch49data[] = {
+0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0xf8,0x18,
+};
+
+static const BitmapCharRec ch49 = {5,13,-2,0,10,ch49data};
+
+/* char: 0x30 '0' */
+
+static const GLubyte ch48data[] = {
+0x3c,0x7e,0x66,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x7e,0x3c,
+};
+
+static const BitmapCharRec ch48 = {8,13,-1,0,10,ch48data};
+
+/* char: 0x2f '/' */
+
+static const GLubyte ch47data[] = {
+0xc0,0xc0,0x40,0x40,0x60,0x60,0x20,0x20,0x30,0x30,0x10,0x10,0x18,0x18,
+};
+
+static const BitmapCharRec ch47 = {5,14,0,0,5,ch47data};
+
+/* char: 0x2e '.' */
+
+static const GLubyte ch46data[] = {
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch46 = {2,2,-1,0,5,ch46data};
+
+/* char: 0x2d '-' */
+
+static const GLubyte ch45data[] = {
+0xff,0xff,
+};
+
+static const BitmapCharRec ch45 = {8,2,-1,-4,11,ch45data};
+
+/* char: 0x2c ',' */
+
+static const GLubyte ch44data[] = {
+0x80,0x40,0x40,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch44 = {2,5,-1,3,5,ch44data};
+
+/* char: 0x2b '+' */
+
+static const GLubyte ch43data[] = {
+0x18,0x18,0x18,0x18,0xff,0xff,0x18,0x18,0x18,0x18,
+};
+
+static const BitmapCharRec ch43 = {8,10,-1,0,10,ch43data};
+
+/* char: 0x2a '*' */
+
+static const GLubyte ch42data[] = {
+0x88,0x70,0x70,0xf8,0x20,0x20,
+};
+
+static const BitmapCharRec ch42 = {5,6,-1,-8,7,ch42data};
+
+/* char: 0x29 ')' */
+
+static const GLubyte ch41data[] = {
+0x80,0xc0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x60,0x60,
+0xc0,0x80,
+};
+
+static const BitmapCharRec ch41 = {4,18,-1,4,6,ch41data};
+
+/* char: 0x28 '(' */
+
+static const GLubyte ch40data[] = {
+0x10,0x30,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,0x60,
+0x30,0x10,
+};
+
+static const BitmapCharRec ch40 = {4,18,-1,4,6,ch40data};
+
+/* char: 0x27 ''' */
+
+static const GLubyte ch39data[] = {
+0x80,0x40,0x40,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch39 = {2,5,-1,-9,4,ch39data};
+
+/* char: 0x26 '&' */
+
+static const GLubyte ch38data[] = {
+0x3c,0x70,0x7e,0xe0,0xe7,0xc0,0xc3,0x80,0xc3,0xc0,0xc6,0xc0,0xee,0xc0,0x7c,0x0,
+0x3c,0x0,0x66,0x0,0x66,0x0,0x7e,0x0,0x3c,0x0,
+};
+
+static const BitmapCharRec ch38 = {12,13,-1,0,13,ch38data};
+
+/* char: 0x25 '%' */
+
+static const GLubyte ch37data[] = {
+0x18,0x78,0x18,0xfc,0xc,0xcc,0xc,0xcc,0x6,0xfc,0x6,0x78,0x3,0x0,0x7b,0x0,
+0xfd,0x80,0xcd,0x80,0xcc,0xc0,0xfc,0xc0,0x78,0x60,
+};
+
+static const BitmapCharRec ch37 = {14,13,-1,0,16,ch37data};
+
+/* char: 0x24 '$' */
+
+static const GLubyte ch36data[] = {
+0x8,0x0,0x8,0x0,0x3e,0x0,0x7f,0x0,0xeb,0x80,0xc9,0x80,0x9,0x80,0xf,0x0,
+0x3e,0x0,0x78,0x0,0xe8,0x0,0xc8,0x0,0xcb,0x0,0x7f,0x0,0x3e,0x0,0x8,0x0,
+};
+
+static const BitmapCharRec ch36 = {9,16,-1,2,10,ch36data};
+
+/* char: 0x23 '#' */
+
+static const GLubyte ch35data[] = {
+0x24,0x0,0x24,0x0,0x24,0x0,0xff,0x80,0xff,0x80,0x12,0x0,0x12,0x0,0x12,0x0,
+0x7f,0xc0,0x7f,0xc0,0x9,0x0,0x9,0x0,0x9,0x0,
+};
+
+static const BitmapCharRec ch35 = {10,13,0,0,10,ch35data};
+
+/* char: 0x22 '"' */
+
+static const GLubyte ch34data[] = {
+0x90,0x90,0xd8,0xd8,0xd8,
+};
+
+static const BitmapCharRec ch34 = {5,5,0,-9,5,ch34data};
+
+/* char: 0x21 '!' */
+
+static const GLubyte ch33data[] = {
+0xc0,0xc0,0x0,0x0,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch33 = {2,14,-2,0,6,ch33data};
+
+/* char: 0x20 ' ' */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch32data[] = { 0x0 };
+static const BitmapCharRec ch32 = {1,1,0,0,5,ch32data};
+#else
+static const BitmapCharRec ch32 = {0,0,0,0,5,0};
+#endif
+
+static const BitmapCharRec * const chars[] = {
+&ch32,
+&ch33,
+&ch34,
+&ch35,
+&ch36,
+&ch37,
+&ch38,
+&ch39,
+&ch40,
+&ch41,
+&ch42,
+&ch43,
+&ch44,
+&ch45,
+&ch46,
+&ch47,
+&ch48,
+&ch49,
+&ch50,
+&ch51,
+&ch52,
+&ch53,
+&ch54,
+&ch55,
+&ch56,
+&ch57,
+&ch58,
+&ch59,
+&ch60,
+&ch61,
+&ch62,
+&ch63,
+&ch64,
+&ch65,
+&ch66,
+&ch67,
+&ch68,
+&ch69,
+&ch70,
+&ch71,
+&ch72,
+&ch73,
+&ch74,
+&ch75,
+&ch76,
+&ch77,
+&ch78,
+&ch79,
+&ch80,
+&ch81,
+&ch82,
+&ch83,
+&ch84,
+&ch85,
+&ch86,
+&ch87,
+&ch88,
+&ch89,
+&ch90,
+&ch91,
+&ch92,
+&ch93,
+&ch94,
+&ch95,
+&ch96,
+&ch97,
+&ch98,
+&ch99,
+&ch100,
+&ch101,
+&ch102,
+&ch103,
+&ch104,
+&ch105,
+&ch106,
+&ch107,
+&ch108,
+&ch109,
+&ch110,
+&ch111,
+&ch112,
+&ch113,
+&ch114,
+&ch115,
+&ch116,
+&ch117,
+&ch118,
+&ch119,
+&ch120,
+&ch121,
+&ch122,
+&ch123,
+&ch124,
+&ch125,
+&ch126,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+&ch160,
+&ch161,
+&ch162,
+&ch163,
+&ch164,
+&ch165,
+&ch166,
+&ch167,
+&ch168,
+&ch169,
+&ch170,
+&ch171,
+&ch172,
+&ch173,
+&ch174,
+&ch175,
+&ch176,
+&ch177,
+&ch178,
+&ch179,
+&ch180,
+&ch181,
+&ch182,
+&ch183,
+&ch184,
+&ch185,
+&ch186,
+&ch187,
+&ch188,
+&ch189,
+&ch190,
+&ch191,
+&ch192,
+&ch193,
+&ch194,
+&ch195,
+&ch196,
+&ch197,
+&ch198,
+&ch199,
+&ch200,
+&ch201,
+&ch202,
+&ch203,
+&ch204,
+&ch205,
+&ch206,
+&ch207,
+&ch208,
+&ch209,
+&ch210,
+&ch211,
+&ch212,
+&ch213,
+&ch214,
+&ch215,
+&ch216,
+&ch217,
+&ch218,
+&ch219,
+&ch220,
+&ch221,
+&ch222,
+&ch223,
+&ch224,
+&ch225,
+&ch226,
+&ch227,
+&ch228,
+&ch229,
+&ch230,
+&ch231,
+&ch232,
+&ch233,
+&ch234,
+&ch235,
+&ch236,
+&ch237,
+&ch238,
+&ch239,
+&ch240,
+&ch241,
+&ch242,
+&ch243,
+&ch244,
+&ch245,
+&ch246,
+&ch247,
+&ch248,
+&ch249,
+&ch250,
+&ch251,
+&ch252,
+&ch253,
+&ch254,
+&ch255,
+};
+
+#if !defined(__IBMCPP__)
+const 
+#endif
+BitmapFontRec glutBitmapHelvetica18 = {
+"-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1",
+224,
+32,
+chars
+};
+
index da5d0735e2930694cf070714841adfbc87a538f5..9e9f2e366e95395ebde28921b26bb948b7c1558d 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1997. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#ifdef __VMS\r
-#include <GL/vms_x_fix.h>\r
-#endif\r
-\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <stdio.h>\r
-\r
-#if !defined(_WIN32) && !defined(__OS2__)\r
-   #include <X11/Xlib.h>\r
-   #include <X11/Xatom.h>\r
-#endif\r
-\r
-/* SGI optimization introduced in IRIX 6.3 to avoid X server\r
-   round trips for interning common X atoms. */\r
-#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)\r
-#include <X11/SGIFastAtom.h>\r
-#else\r
-#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)\r
-#endif\r
-\r
-#include "glutint.h"\r
-\r
-/* GLUT inter-file variables */\r
-/* *INDENT-OFF* */\r
-char *__glutProgramName = NULL;\r
-int __glutArgc = 0;\r
-char **__glutArgv = NULL;\r
-char *__glutGeometry = NULL;\r
-Display *__glutDisplay = NULL;\r
-int __glutScreen;\r
-Window __glutRoot;\r
-int __glutScreenHeight;\r
-int __glutScreenWidth;\r
-GLboolean __glutIconic = GL_FALSE;\r
-GLboolean __glutDebug = GL_FALSE;\r
-unsigned int __glutDisplayMode =\r
-  GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH;\r
-char *__glutDisplayString = NULL;\r
-int __glutConnectionFD;\r
-XSizeHints __glutSizeHints = {0};\r
-int __glutInitWidth = 300, __glutInitHeight = 300;\r
-int __glutInitX = -1, __glutInitY = -1;\r
-GLboolean __glutForceDirect = GL_FALSE,\r
-  __glutTryDirect = GL_TRUE;\r
-Atom __glutWMDeleteWindow;\r
-/* *INDENT-ON* */\r
-\r
-#ifdef _WIN32\r
-void (__cdecl *__glutExitFunc)(int retval) = NULL;\r
-#endif\r
-\r
-static Bool synchronize = False;\r
-\r
-#if defined(__OS2__)\r
-\r
-MRESULT EXPENTRY GlutWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );\r
-MRESULT EXPENTRY GlutWindowChildProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );\r
-\r
-\r
-void __glutOpenOS2Connection(char* display)\r
-{\r
-  static char *classname=NULL;\r
-extern HAB   hab;      /* PM anchor block handle         */\r
-ERRORID  erridErrorCode;/* last error id code */\r
-int ii;\r
-\r
-  /* Make sure we register the window only once. */\r
-  if(classname)\r
-    return;\r
-\r
-  classname = "GLUT";\r
-\r
-    if ( !WinRegisterClass( hab, /* PM anchor block handle     */\r
-             classname,/* window class name          */\r
-             GlutWindowProc,/* address of window procedure*/\r
-             CS_SIZEREDRAW, /* |CS_SYNCPAINT size changes cause redrawing */\r
-             0UL ) )        /* window data                  */\r
-    {   erridErrorCode = WinGetLastError(hab);\r
-        ii = erridErrorCode;\r
-          return;\r
-    }\r
-\r
-  classname = "GLUTCHILD";\r
-\r
-    if ( !WinRegisterClass( hab, /* PM anchor block handle     */\r
-             classname,/* window class name          */\r
-             GlutWindowChildProc,/* address of window procedure*/\r
-             CS_SIZEREDRAW, /* size changes cause redrawing */\r
-             0UL ) )        /* window data                  */\r
-    {   erridErrorCode = WinGetLastError(hab);\r
-        ii = erridErrorCode;\r
-          return;\r
-    }\r
-\r
-  __glutScreenWidth     = GetSystemMetrics(SM_CXSCREEN);\r
-  __glutScreenHeight    = GetSystemMetrics(SM_CYSCREEN);\r
-\r
-  /* Set the root window to NULL because windows creates a top-level\r
-     window when the parent is NULL.  X creates a top-level window\r
-     when the parent is the root window. */\r
-  __glutRoot            = NULLHANDLE;\r
-\r
-  /* Set the display to 1 -- we shouldn't be using this anywhere\r
-     (except as an argument to X calls). */\r
-  __glutDisplay         = (Display*)1;\r
-\r
-  /* There isn't any concept of multiple screens in Win32, therefore,\r
-     we don't need to keep track of the screen we're on... it's always\r
-     the same one. */\r
-  __glutScreen          = 0;\r
-}\r
-\r
-#elif defined(_WIN32)\r
-\r
-#ifdef __BORLANDC__\r
-#include <float.h>  /* For masking floating point exceptions. */\r
-#endif\r
-\r
-void\r
-__glutOpenWin32Connection(char* display)\r
-{\r
-  static char *classname;\r
-  WNDCLASS  wc;\r
-  HINSTANCE hInstance = GetModuleHandle(NULL);\r
-\r
-  /* Make sure we register the window only once. */\r
-  if(classname)\r
-    return;\r
-\r
-#ifdef __BORLANDC__\r
-  /* Under certain conditions (e.g. while rendering solid surfaces with\r
-     lighting enabled) Microsoft OpenGL libraries cause some illegal\r
-     operations like floating point overflow or division by zero. The\r
-     default behaviour of Microsoft compilers is to mask (ignore)\r
-     floating point exceptions, while Borland compilers do not.  The\r
-     following function of Borland RTL allows to mask exceptions.\r
-     Advice from Pier Giorgio Esposito (mc2172@mclink.it). */\r
-  _control87(MCW_EM,MCW_EM);\r
-#endif\r
-\r
-  classname = "GLUT";\r
-\r
-  /* Clear (important!) and then fill in the window class structure. */\r
-  memset(&wc, 0, sizeof(WNDCLASS));\r
-  wc.style         = CS_OWNDC;\r
-  wc.lpfnWndProc   = (WNDPROC)__glutWindowProc;\r
-  wc.hInstance     = hInstance;\r
-  wc.hIcon         = LoadIcon(hInstance, "GLUT_ICON");\r
-  wc.hCursor       = LoadCursor(hInstance, IDC_ARROW);\r
-  wc.hbrBackground = NULL;\r
-  wc.lpszMenuName  = NULL;\r
-  wc.lpszClassName = classname;\r
-\r
-  /* Fill in a default icon if one isn't specified as a resource. */\r
-  if(!wc.hIcon)\r
-    wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);\r
-\r
-  if(!RegisterClass(&wc)) {\r
-    __glutFatalError("RegisterClass() failed:"\r
-                    "Cannot register GLUT window class.");\r
-  }\r
-\r
-  __glutScreenWidth     = GetSystemMetrics(SM_CXSCREEN);\r
-  __glutScreenHeight    = GetSystemMetrics(SM_CYSCREEN);\r
-\r
-  /* Set the root window to NULL because windows creates a top-level\r
-     window when the parent is NULL.  X creates a top-level window\r
-     when the parent is the root window. */\r
-  __glutRoot            = NULL;\r
-\r
-  /* Set the display to 1 -- we shouldn't be using this anywhere\r
-     (except as an argument to X calls). */\r
-  __glutDisplay         = (Display*)1;\r
-\r
-  /* There isn't any concept of multiple screens in Win32, therefore,\r
-     we don't need to keep track of the screen we're on... it's always\r
-     the same one. */\r
-  __glutScreen          = 0;\r
-}\r
-#else /* !_WIN32 */\r
-void\r
-__glutOpenXConnection(char *display)\r
-{\r
-  int errorBase, eventBase;\r
-\r
-  __glutDisplay = XOpenDisplay(display);\r
-  if (!__glutDisplay)\r
-    __glutFatalError("could not open display: %s",\r
-      XDisplayName(display));\r
-  if (synchronize)\r
-    XSynchronize(__glutDisplay, True);\r
-  if (!glXQueryExtension(__glutDisplay, &errorBase, &eventBase))\r
-    __glutFatalError(\r
-      "OpenGL GLX extension not supported by display: %s",\r
-      XDisplayName(display));\r
-  __glutScreen = DefaultScreen(__glutDisplay);\r
-  __glutRoot = RootWindow(__glutDisplay, __glutScreen);\r
-  __glutScreenWidth = DisplayWidth(__glutDisplay, __glutScreen);\r
-  __glutScreenHeight = DisplayHeight(__glutDisplay,\r
-    __glutScreen);\r
-  __glutConnectionFD = ConnectionNumber(__glutDisplay);\r
-  __glutWMDeleteWindow = XSGIFastInternAtom(__glutDisplay,\r
-    "WM_DELETE_WINDOW", SGI_XA_WM_DELETE_WINDOW, False);\r
-}\r
-#endif /* _WIN32 */\r
-\r
-void\r
-#ifdef OLD_VMS\r
-  __glutInitTime(struct timeval6 *beginning)\r
-#else\r
-  __glutInitTime(struct timeval *beginning)\r
-#endif\r
-{\r
-  static int beenhere = 0;\r
-#ifdef OLD_VMS\r
-   static struct timeval6 genesis;\r
-#else\r
-   static struct timeval genesis;\r
-#endif\r
-\r
-  if (!beenhere) {\r
-    GETTIMEOFDAY(&genesis);\r
-    beenhere = 1;\r
-  }\r
-  *beginning = genesis;\r
-}\r
-\r
-static void\r
-removeArgs(int *argcp, char **argv, int numToRemove)\r
-{\r
-  int i, j;\r
-\r
-  for (i = 0, j = numToRemove; argv[j]; i++, j++) {\r
-    argv[i] = argv[j];\r
-  }\r
-  argv[i] = NULL;\r
-  *argcp -= numToRemove;\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutInit(int *argcp, char **argv)\r
-{\r
-  char *display = NULL;\r
-  char *str, *geometry = NULL;\r
-#ifdef OLD_VMS\r
-   struct timeval6 unused;\r
-#else\r
-   struct timeval unused;\r
-#endif\r
-  int i;\r
-\r
-  if (__glutDisplay) {\r
-    __glutWarning("glutInit being called a second time.");\r
-    return;\r
-  }\r
-  /* Determine temporary program name. */\r
-  str = strrchr(argv[0], '/');\r
-  if (str == NULL) {\r
-    __glutProgramName = argv[0];\r
-  } else {\r
-    __glutProgramName = str + 1;\r
-  }\r
-\r
-  /* Make private copy of command line arguments. */\r
-  __glutArgc = *argcp;\r
-  __glutArgv = (char **) malloc(__glutArgc * sizeof(char *));\r
-  if (!__glutArgv)\r
-    __glutFatalError("out of memory.");\r
-  for (i = 0; i < __glutArgc; i++) {\r
-    __glutArgv[i] = __glutStrdup(argv[i]);\r
-    if (!__glutArgv[i])\r
-      __glutFatalError("out of memory.");\r
-  }\r
-\r
-  /* determine permanent program name */\r
-  str = strrchr(__glutArgv[0], '/');\r
-  if (str == NULL) {\r
-    __glutProgramName = __glutArgv[0];\r
-  } else {\r
-    __glutProgramName = str + 1;\r
-  }\r
-\r
-  /* parse arguments for standard options */\r
-  for (i = 1; i < __glutArgc; i++) {\r
-    if (!strcmp(__glutArgv[i], "-display")) {\r
-#if defined(_WIN32)\r
-      __glutWarning("-display option not supported by Win32 GLUT.");\r
-#endif\r
-      if (++i >= __glutArgc) {\r
-        __glutFatalError(\r
-          "follow -display option with X display name.");\r
-      }\r
-      display = __glutArgv[i];\r
-      removeArgs(argcp, &argv[1], 2);\r
-    } else if (!strcmp(__glutArgv[i], "-geometry")) {\r
-      if (++i >= __glutArgc) {\r
-        __glutFatalError(\r
-          "follow -geometry option with geometry parameter.");\r
-      }\r
-      geometry = __glutArgv[i];\r
-      removeArgs(argcp, &argv[1], 2);\r
-    } else if (!strcmp(__glutArgv[i], "-direct")) {\r
-#if defined(_WIN32)\r
-      __glutWarning("-direct option not supported by Win32 GLUT.");\r
-#endif\r
-      if (!__glutTryDirect)\r
-        __glutFatalError(\r
-          "cannot force both direct and indirect rendering.");\r
-      __glutForceDirect = GL_TRUE;\r
-      removeArgs(argcp, &argv[1], 1);\r
-    } else if (!strcmp(__glutArgv[i], "-indirect")) {\r
-#if defined(_WIN32)\r
-      __glutWarning("-indirect option not supported by Win32 GLUT.");\r
-#endif\r
-      if (__glutForceDirect)\r
-        __glutFatalError(\r
-          "cannot force both direct and indirect rendering.");\r
-      __glutTryDirect = GL_FALSE;\r
-      removeArgs(argcp, &argv[1], 1);\r
-    } else if (!strcmp(__glutArgv[i], "-iconic")) {\r
-      __glutIconic = GL_TRUE;\r
-      removeArgs(argcp, &argv[1], 1);\r
-    } else if (!strcmp(__glutArgv[i], "-gldebug")) {\r
-      __glutDebug = GL_TRUE;\r
-      removeArgs(argcp, &argv[1], 1);\r
-    } else if (!strcmp(__glutArgv[i], "-sync")) {\r
-#if defined(_WIN32)\r
-      __glutWarning("-sync option not supported by Win32 GLUT.");\r
-#endif\r
-      synchronize = GL_TRUE;\r
-      removeArgs(argcp, &argv[1], 1);\r
-    } else {\r
-      /* Once unknown option encountered, stop command line\r
-         processing. */\r
-      break;\r
-    }\r
-  }\r
-#if defined(__OS2__)\r
-  __glutOpenOS2Connection(display);\r
-#elif defined(_WIN32)\r
-  __glutOpenWin32Connection(display);\r
-#else\r
-  __glutOpenXConnection(display);\r
-#endif\r
-  if (geometry) {\r
-    int flags, x, y, width, height;\r
-\r
-    /* Fix bogus "{width|height} may be used before set"\r
-       warning */\r
-    width = 0;\r
-    height = 0;\r
-\r
-    flags = XParseGeometry(geometry, &x, &y,\r
-      (unsigned int *) &width, (unsigned int *) &height);\r
-    if (WidthValue & flags) {\r
-      /* Careful because X does not allow zero or negative\r
-         width windows */\r
-      if (width > 0)\r
-        __glutInitWidth = width;\r
-    }\r
-    if (HeightValue & flags) {\r
-      /* Careful because X does not allow zero or negative\r
-         height windows */\r
-      if (height > 0)\r
-        __glutInitHeight = height;\r
-    }\r
-    glutInitWindowSize(__glutInitWidth, __glutInitHeight);\r
-    if (XValue & flags) {\r
-      if (XNegative & flags)\r
-        x = DisplayWidth(__glutDisplay, __glutScreen) +\r
-          x - __glutSizeHints.width;\r
-      /* Play safe: reject negative X locations */\r
-      if (x >= 0)\r
-        __glutInitX = x;\r
-    }\r
-    if (YValue & flags) {\r
-      if (YNegative & flags)\r
-        y = DisplayHeight(__glutDisplay, __glutScreen) +\r
-          y - __glutSizeHints.height;\r
-      /* Play safe: reject negative Y locations */\r
-      if (y >= 0)\r
-        __glutInitY = y;\r
-    }\r
-    glutInitWindowPosition(__glutInitX, __glutInitY);\r
-  }\r
-  __glutInitTime(&unused);\r
-\r
-  /* check if GLUT_FPS env var is set */\r
-  {\r
-     const char *fps = getenv("GLUT_FPS");\r
-     if (fps) {\r
-        sscanf(fps, "%d", &__glutFPS);\r
-        if (__glutFPS <= 0)\r
-           __glutFPS = 5000;  /* 5000 milliseconds */\r
-     }\r
-  }\r
-}\r
-\r
-#ifdef _WIN32\r
-void APIENTRY\r
-__glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int))\r
-{\r
-  __glutExitFunc = exitfunc;\r
-  glutInit(argcp, argv);\r
-}\r
-#endif\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutInitWindowPosition(int x, int y)\r
-{\r
-  __glutInitX = x;\r
-  __glutInitY = y;\r
-  if (x >= 0 && y >= 0) {\r
-    __glutSizeHints.x = x;\r
-    __glutSizeHints.y = y;\r
-    __glutSizeHints.flags |= USPosition;\r
-  } else {\r
-    __glutSizeHints.flags &= ~USPosition;\r
-  }\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutInitWindowSize(int width, int height)\r
-{\r
-  __glutInitWidth = width;\r
-  __glutInitHeight = height;\r
-  if (width > 0 && height > 0) {\r
-    __glutSizeHints.width = width;\r
-    __glutSizeHints.height = height;\r
-    __glutSizeHints.flags |= USSize;\r
-  } else {\r
-    __glutSizeHints.flags &= ~USSize;\r
-  }\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutInitDisplayMode(unsigned int mask)\r
-{\r
-  __glutDisplayMode = mask;\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
+
+/* 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. */
+
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#if !defined(_WIN32) && !defined(__OS2__)
+   #include <X11/Xlib.h>
+   #include <X11/Xatom.h>
+#endif
+
+/* SGI optimization introduced in IRIX 6.3 to avoid X server
+   round trips for interning common X atoms. */
+#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
+#include <X11/SGIFastAtom.h>
+#else
+#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
+#endif
+
+#include "glutint.h"
+
+/* GLUT inter-file variables */
+/* *INDENT-OFF* */
+char *__glutProgramName = NULL;
+int __glutArgc = 0;
+char **__glutArgv = NULL;
+char *__glutGeometry = NULL;
+Display *__glutDisplay = NULL;
+int __glutScreen;
+Window __glutRoot;
+int __glutScreenHeight;
+int __glutScreenWidth;
+GLboolean __glutIconic = GL_FALSE;
+GLboolean __glutDebug = GL_FALSE;
+unsigned int __glutDisplayMode =
+  GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH;
+char *__glutDisplayString = NULL;
+int __glutConnectionFD;
+XSizeHints __glutSizeHints = {0};
+int __glutInitWidth = 300, __glutInitHeight = 300;
+int __glutInitX = -1, __glutInitY = -1;
+GLboolean __glutForceDirect = GL_FALSE,
+  __glutTryDirect = GL_TRUE;
+Atom __glutWMDeleteWindow;
+/* *INDENT-ON* */
+
+#ifdef _WIN32
+void (__cdecl *__glutExitFunc)(int retval) = NULL;
+#endif
+
+static Bool synchronize = False;
+
+#if defined(__OS2__)
+
+MRESULT EXPENTRY GlutWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
+MRESULT EXPENTRY GlutWindowChildProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
+
+
+void __glutOpenOS2Connection(char* display)
+{
+  static char *classname=NULL;
+extern HAB   hab;      /* PM anchor block handle         */
+ERRORID  erridErrorCode;/* last error id code */
+int ii;
+
+  /* Make sure we register the window only once. */
+  if(classname)
+    return;
+
+  classname = "GLUT";
+
+    if ( !WinRegisterClass( hab, /* PM anchor block handle     */
+             classname,/* window class name          */
+             GlutWindowProc,/* address of window procedure*/
+             CS_SIZEREDRAW, /* |CS_SYNCPAINT size changes cause redrawing */
+             0UL ) )        /* window data                  */
+    {   erridErrorCode = WinGetLastError(hab);
+        ii = erridErrorCode;
+          return;
+    }
+
+  classname = "GLUTCHILD";
+
+    if ( !WinRegisterClass( hab, /* PM anchor block handle     */
+             classname,/* window class name          */
+             GlutWindowChildProc,/* address of window procedure*/
+             CS_SIZEREDRAW, /* size changes cause redrawing */
+             0UL ) )        /* window data                  */
+    {   erridErrorCode = WinGetLastError(hab);
+        ii = erridErrorCode;
+          return;
+    }
+
+  __glutScreenWidth     = GetSystemMetrics(SM_CXSCREEN);
+  __glutScreenHeight    = GetSystemMetrics(SM_CYSCREEN);
+
+  /* Set the root window to NULL because windows creates a top-level
+     window when the parent is NULL.  X creates a top-level window
+     when the parent is the root window. */
+  __glutRoot            = NULLHANDLE;
+
+  /* Set the display to 1 -- we shouldn't be using this anywhere
+     (except as an argument to X calls). */
+  __glutDisplay         = (Display*)1;
+
+  /* There isn't any concept of multiple screens in Win32, therefore,
+     we don't need to keep track of the screen we're on... it's always
+     the same one. */
+  __glutScreen          = 0;
+}
+
+#elif defined(_WIN32)
+
+#ifdef __BORLANDC__
+#include <float.h>  /* For masking floating point exceptions. */
+#endif
+
+void
+__glutOpenWin32Connection(char* display)
+{
+  static char *classname;
+  WNDCLASS  wc;
+  HINSTANCE hInstance = GetModuleHandle(NULL);
+
+  /* Make sure we register the window only once. */
+  if(classname)
+    return;
+
+#ifdef __BORLANDC__
+  /* Under certain conditions (e.g. while rendering solid surfaces with
+     lighting enabled) Microsoft OpenGL libraries cause some illegal
+     operations like floating point overflow or division by zero. The
+     default behaviour of Microsoft compilers is to mask (ignore)
+     floating point exceptions, while Borland compilers do not.  The
+     following function of Borland RTL allows to mask exceptions.
+     Advice from Pier Giorgio Esposito (mc2172@mclink.it). */
+  _control87(MCW_EM,MCW_EM);
+#endif
+
+  classname = "GLUT";
+
+  /* Clear (important!) and then fill in the window class structure. */
+  memset(&wc, 0, sizeof(WNDCLASS));
+  wc.style         = CS_OWNDC;
+  wc.lpfnWndProc   = (WNDPROC)__glutWindowProc;
+  wc.hInstance     = hInstance;
+  wc.hIcon         = LoadIcon(hInstance, "GLUT_ICON");
+  wc.hCursor       = LoadCursor(hInstance, IDC_ARROW);
+  wc.hbrBackground = NULL;
+  wc.lpszMenuName  = NULL;
+  wc.lpszClassName = classname;
+
+  /* Fill in a default icon if one isn't specified as a resource. */
+  if(!wc.hIcon)
+    wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
+
+  if(!RegisterClass(&wc)) {
+    __glutFatalError("RegisterClass() failed:"
+                    "Cannot register GLUT window class.");
+  }
+
+  __glutScreenWidth     = GetSystemMetrics(SM_CXSCREEN);
+  __glutScreenHeight    = GetSystemMetrics(SM_CYSCREEN);
+
+  /* Set the root window to NULL because windows creates a top-level
+     window when the parent is NULL.  X creates a top-level window
+     when the parent is the root window. */
+  __glutRoot            = NULL;
+
+  /* Set the display to 1 -- we shouldn't be using this anywhere
+     (except as an argument to X calls). */
+  __glutDisplay         = (Display*)1;
+
+  /* There isn't any concept of multiple screens in Win32, therefore,
+     we don't need to keep track of the screen we're on... it's always
+     the same one. */
+  __glutScreen          = 0;
+}
+#else /* !_WIN32 */
+void
+__glutOpenXConnection(char *display)
+{
+  int errorBase, eventBase;
+
+  __glutDisplay = XOpenDisplay(display);
+  if (!__glutDisplay)
+    __glutFatalError("could not open display: %s",
+      XDisplayName(display));
+  if (synchronize)
+    XSynchronize(__glutDisplay, True);
+  if (!glXQueryExtension(__glutDisplay, &errorBase, &eventBase))
+    __glutFatalError(
+      "OpenGL GLX extension not supported by display: %s",
+      XDisplayName(display));
+  __glutScreen = DefaultScreen(__glutDisplay);
+  __glutRoot = RootWindow(__glutDisplay, __glutScreen);
+  __glutScreenWidth = DisplayWidth(__glutDisplay, __glutScreen);
+  __glutScreenHeight = DisplayHeight(__glutDisplay,
+    __glutScreen);
+  __glutConnectionFD = ConnectionNumber(__glutDisplay);
+  __glutWMDeleteWindow = XSGIFastInternAtom(__glutDisplay,
+    "WM_DELETE_WINDOW", SGI_XA_WM_DELETE_WINDOW, False);
+}
+#endif /* _WIN32 */
+
+void
+#ifdef OLD_VMS
+  __glutInitTime(struct timeval6 *beginning)
+#else
+  __glutInitTime(struct timeval *beginning)
+#endif
+{
+  static int beenhere = 0;
+#ifdef OLD_VMS
+   static struct timeval6 genesis;
+#else
+   static struct timeval genesis;
+#endif
+
+  if (!beenhere) {
+    GETTIMEOFDAY(&genesis);
+    beenhere = 1;
+  }
+  *beginning = genesis;
+}
+
+static void
+removeArgs(int *argcp, char **argv, int numToRemove)
+{
+  int i, j;
+
+  for (i = 0, j = numToRemove; argv[j]; i++, j++) {
+    argv[i] = argv[j];
+  }
+  argv[i] = NULL;
+  *argcp -= numToRemove;
+}
+
+void GLUTAPIENTRY
+glutInit(int *argcp, char **argv)
+{
+  char *display = NULL;
+  char *str, *geometry = NULL;
+#ifdef OLD_VMS
+   struct timeval6 unused;
+#else
+   struct timeval unused;
+#endif
+  int i;
+
+  if (__glutDisplay) {
+    __glutWarning("glutInit being called a second time.");
+    return;
+  }
+  /* Determine temporary program name. */
+  str = strrchr(argv[0], '/');
+  if (str == NULL) {
+    __glutProgramName = argv[0];
+  } else {
+    __glutProgramName = str + 1;
+  }
+
+  /* Make private copy of command line arguments. */
+  __glutArgc = *argcp;
+  __glutArgv = (char **) malloc(__glutArgc * sizeof(char *));
+  if (!__glutArgv)
+    __glutFatalError("out of memory.");
+  for (i = 0; i < __glutArgc; i++) {
+    __glutArgv[i] = __glutStrdup(argv[i]);
+    if (!__glutArgv[i])
+      __glutFatalError("out of memory.");
+  }
+
+  /* determine permanent program name */
+  str = strrchr(__glutArgv[0], '/');
+  if (str == NULL) {
+    __glutProgramName = __glutArgv[0];
+  } else {
+    __glutProgramName = str + 1;
+  }
+
+  /* parse arguments for standard options */
+  for (i = 1; i < __glutArgc; i++) {
+    if (!strcmp(__glutArgv[i], "-display")) {
+#if defined(_WIN32)
+      __glutWarning("-display option not supported by Win32 GLUT.");
+#endif
+      if (++i >= __glutArgc) {
+        __glutFatalError(
+          "follow -display option with X display name.");
+      }
+      display = __glutArgv[i];
+      removeArgs(argcp, &argv[1], 2);
+    } else if (!strcmp(__glutArgv[i], "-geometry")) {
+      if (++i >= __glutArgc) {
+        __glutFatalError(
+          "follow -geometry option with geometry parameter.");
+      }
+      geometry = __glutArgv[i];
+      removeArgs(argcp, &argv[1], 2);
+    } else if (!strcmp(__glutArgv[i], "-direct")) {
+#if defined(_WIN32)
+      __glutWarning("-direct option not supported by Win32 GLUT.");
+#endif
+      if (!__glutTryDirect)
+        __glutFatalError(
+          "cannot force both direct and indirect rendering.");
+      __glutForceDirect = GL_TRUE;
+      removeArgs(argcp, &argv[1], 1);
+    } else if (!strcmp(__glutArgv[i], "-indirect")) {
+#if defined(_WIN32)
+      __glutWarning("-indirect option not supported by Win32 GLUT.");
+#endif
+      if (__glutForceDirect)
+        __glutFatalError(
+          "cannot force both direct and indirect rendering.");
+      __glutTryDirect = GL_FALSE;
+      removeArgs(argcp, &argv[1], 1);
+    } else if (!strcmp(__glutArgv[i], "-iconic")) {
+      __glutIconic = GL_TRUE;
+      removeArgs(argcp, &argv[1], 1);
+    } else if (!strcmp(__glutArgv[i], "-gldebug")) {
+      __glutDebug = GL_TRUE;
+      removeArgs(argcp, &argv[1], 1);
+    } else if (!strcmp(__glutArgv[i], "-sync")) {
+#if defined(_WIN32)
+      __glutWarning("-sync option not supported by Win32 GLUT.");
+#endif
+      synchronize = GL_TRUE;
+      removeArgs(argcp, &argv[1], 1);
+    } else {
+      /* Once unknown option encountered, stop command line
+         processing. */
+      break;
+    }
+  }
+#if defined(__OS2__)
+  __glutOpenOS2Connection(display);
+#elif defined(_WIN32)
+  __glutOpenWin32Connection(display);
+#else
+  __glutOpenXConnection(display);
+#endif
+  if (geometry) {
+    int flags, x, y, width, height;
+
+    /* Fix bogus "{width|height} may be used before set"
+       warning */
+    width = 0;
+    height = 0;
+
+    flags = XParseGeometry(geometry, &x, &y,
+      (unsigned int *) &width, (unsigned int *) &height);
+    if (WidthValue & flags) {
+      /* Careful because X does not allow zero or negative
+         width windows */
+      if (width > 0)
+        __glutInitWidth = width;
+    }
+    if (HeightValue & flags) {
+      /* Careful because X does not allow zero or negative
+         height windows */
+      if (height > 0)
+        __glutInitHeight = height;
+    }
+    glutInitWindowSize(__glutInitWidth, __glutInitHeight);
+    if (XValue & flags) {
+      if (XNegative & flags)
+        x = DisplayWidth(__glutDisplay, __glutScreen) +
+          x - __glutSizeHints.width;
+      /* Play safe: reject negative X locations */
+      if (x >= 0)
+        __glutInitX = x;
+    }
+    if (YValue & flags) {
+      if (YNegative & flags)
+        y = DisplayHeight(__glutDisplay, __glutScreen) +
+          y - __glutSizeHints.height;
+      /* Play safe: reject negative Y locations */
+      if (y >= 0)
+        __glutInitY = y;
+    }
+    glutInitWindowPosition(__glutInitX, __glutInitY);
+  }
+  __glutInitTime(&unused);
+
+  /* check if GLUT_FPS env var is set */
+  {
+     const char *fps = getenv("GLUT_FPS");
+     if (fps) {
+        sscanf(fps, "%d", &__glutFPS);
+        if (__glutFPS <= 0)
+           __glutFPS = 5000;  /* 5000 milliseconds */
+     }
+  }
+}
+
+#ifdef _WIN32
+void APIENTRY
+__glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int))
+{
+  __glutExitFunc = exitfunc;
+  glutInit(argcp, argv);
+}
+#endif
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutInitWindowPosition(int x, int y)
+{
+  __glutInitX = x;
+  __glutInitY = y;
+  if (x >= 0 && y >= 0) {
+    __glutSizeHints.x = x;
+    __glutSizeHints.y = y;
+    __glutSizeHints.flags |= USPosition;
+  } else {
+    __glutSizeHints.flags &= ~USPosition;
+  }
+}
+
+void GLUTAPIENTRY
+glutInitWindowSize(int width, int height)
+{
+  __glutInitWidth = width;
+  __glutInitHeight = height;
+  if (width > 0 && height > 0) {
+    __glutSizeHints.width = width;
+    __glutSizeHints.height = height;
+    __glutSizeHints.flags |= USSize;
+  } else {
+    __glutSizeHints.flags &= ~USSize;
+  }
+}
+
+void GLUTAPIENTRY
+glutInitDisplayMode(unsigned int mask)
+{
+  __glutDisplayMode = mask;
+}
+
+/* ENDCENTRY */
index c517fe12490e46204b751b28c3d9f6e358646715..e65b691cb12838077c3ed555766682196538d505 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <assert.h>\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-\r
-#include "glutint.h"\r
-#define POFIG 0\r
-#if POFIG\r
-\r
-int __glutNumDials = 0;\r
-int __glutNumSpaceballButtons = 0;\r
-int __glutNumButtonBoxButtons = 0;\r
-int __glutNumTabletButtons = 0;\r
-int __glutNumMouseButtons = 3;  /* Good guess. */\r
-XDevice *__glutTablet = NULL;\r
-XDevice *__glutDials = NULL;\r
-XDevice *__glutSpaceball = NULL;\r
-\r
-int __glutHasJoystick = 0;\r
-int __glutNumJoystickButtons = 0;\r
-int __glutNumJoystickAxes = 0;\r
-\r
-#if !defined(_WIN32)\r
-typedef struct _Range {\r
-  int min;\r
-  int range;\r
-} Range;\r
-\r
-#define NUM_SPACEBALL_AXIS     6\r
-#define NUM_TABLET_AXIS                2\r
-#define NUM_DIALS_AXIS         8\r
-\r
-Range __glutSpaceballRange[NUM_SPACEBALL_AXIS];\r
-Range __glutTabletRange[NUM_TABLET_AXIS];\r
-int *__glutDialsResolution;\r
-\r
-/* Safely assumes 0 is an illegal event type for X Input\r
-   extension events. */\r
-int __glutDeviceMotionNotify = 0;\r
-int __glutDeviceButtonPress = 0;\r
-int __glutDeviceButtonPressGrab = 0;\r
-int __glutDeviceButtonRelease = 0;\r
-int __glutDeviceStateNotify = 0;\r
-\r
-static int\r
-normalizeTabletPos(int axis, int rawValue)\r
-{\r
-  assert(rawValue >= __glutTabletRange[axis].min);\r
-  assert(rawValue <= __glutTabletRange[axis].min\r
-    + __glutTabletRange[axis].range);\r
-  /* Normalize rawValue to between 0 and 4000. */\r
-  return ((rawValue - __glutTabletRange[axis].min) * 4000) /\r
-    __glutTabletRange[axis].range;\r
-}\r
-\r
-static int\r
-normalizeDialAngle(int axis, int rawValue)\r
-{\r
-  /* XXX Assumption made that the resolution of the device is\r
-     number of clicks for one complete dial revolution.  This\r
-     is true for SGI's dial & button box. */\r
-  return (rawValue * 360.0) / __glutDialsResolution[axis];\r
-}\r
-\r
-static int\r
-normalizeSpaceballAngle(int axis, int rawValue)\r
-{\r
-  assert(rawValue >= __glutSpaceballRange[axis].min);\r
-  assert(rawValue <= __glutSpaceballRange[axis].min +\r
-    __glutSpaceballRange[axis].range);\r
-  /* Normalize rawValue to between -1800 and 1800. */\r
-  return ((rawValue - __glutSpaceballRange[axis].min) * 3600) /\r
-    __glutSpaceballRange[axis].range - 1800;\r
-}\r
-\r
-static int\r
-normalizeSpaceballDelta(int axis, int rawValue)\r
-{\r
-  assert(rawValue >= __glutSpaceballRange[axis].min);\r
-  assert(rawValue <= __glutSpaceballRange[axis].min +\r
-    __glutSpaceballRange[axis].range);\r
-  /* Normalize rawValue to between -1000 and 1000. */\r
-  return ((rawValue - __glutSpaceballRange[axis].min) * 2000) /\r
-    __glutSpaceballRange[axis].range - 1000;\r
-}\r
-\r
-static void\r
-queryTabletPos(GLUTwindow * window)\r
-{\r
-  XDeviceState *state;\r
-  XInputClass *any;\r
-  XValuatorState *v;\r
-  int i;\r
-\r
-  state = XQueryDeviceState(__glutDisplay, __glutTablet);\r
-  any = state->data;\r
-  for (i = 0; i < state->num_classes; i++) {\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-    switch (any->c_class) {\r
-#else\r
-    switch (any->class) {\r
-#endif\r
-    case ValuatorClass:\r
-      v = (XValuatorState *) any;\r
-      if (v->num_valuators < 2)\r
-        goto end;\r
-      if (window->tabletPos[0] == -1)\r
-        window->tabletPos[0] = normalizeTabletPos(0, v->valuators[0]);\r
-      if (window->tabletPos[1] == -1)\r
-        window->tabletPos[1] = normalizeTabletPos(1, v->valuators[1]);\r
-    }\r
-    any = (XInputClass *) ((char *) any + any->length);\r
-  }\r
-end:\r
-  XFreeDeviceState(state);\r
-}\r
-\r
-static void\r
-tabletPosChange(GLUTwindow * window, int first, int count, int *data)\r
-{\r
-  int i, value, genEvent = 0;\r
-\r
-  for (i = first; i < first + count; i++) {\r
-    switch (i) {\r
-    case 0:            /* X axis */\r
-    case 1:            /* Y axis */\r
-      value = normalizeTabletPos(i, data[i - first]);\r
-      if (value != window->tabletPos[i]) {\r
-        window->tabletPos[i] = value;\r
-        genEvent = 1;\r
-      }\r
-      break;\r
-    }\r
-  }\r
-  if (window->tabletPos[0] == -1 || window->tabletPos[1] == -1)\r
-    queryTabletPos(window);\r
-  if (genEvent)\r
-    window->tabletMotion(window->tabletPos[0], window->tabletPos[1]);\r
-}\r
-#endif /* !_WIN32 */\r
-\r
-static int\r
-__glutProcessDeviceEvents(XEvent * event)\r
-{\r
-#if !defined(_WIN32)\r
-  GLUTwindow *window;\r
-\r
-  /* XXX Ugly code fan out. */\r
-\r
-  /* Can't use switch/case since X Input event types are\r
-     dynamic. */\r
-\r
-  if (__glutDeviceMotionNotify && event->type == __glutDeviceMotionNotify) {\r
-    XDeviceMotionEvent *devmot = (XDeviceMotionEvent *) event;\r
-\r
-    window = __glutGetWindow(devmot->window);\r
-    if (window) {\r
-      if (__glutTablet\r
-        && devmot->deviceid == __glutTablet->device_id\r
-        && window->tabletMotion) {\r
-        tabletPosChange(window, devmot->first_axis, devmot->axes_count,\r
-          devmot->axis_data);\r
-      } else if (__glutDials\r
-          && devmot->deviceid == __glutDials->device_id\r
-        && window->dials) {\r
-        int i, first = devmot->first_axis, count = devmot->axes_count;\r
-\r
-        for (i = first; i < first + count; i++)\r
-          window->dials(i + 1,\r
-            normalizeDialAngle(i, devmot->axis_data[i - first]));\r
-      } else if (__glutSpaceball\r
-        && devmot->deviceid == __glutSpaceball->device_id) {\r
-        /* XXX Assume that space ball motion events come in as\r
-           all the first 6 axes.  Assume first 3 axes are XYZ\r
-           translations; second 3 axes are XYZ rotations. */\r
-        if (devmot->first_axis == 0 && devmot->axes_count == 6) {\r
-          if (window->spaceMotion)\r
-            window->spaceMotion(\r
-              normalizeSpaceballDelta(0, devmot->axis_data[0]),\r
-              normalizeSpaceballDelta(1, devmot->axis_data[1]),\r
-              normalizeSpaceballDelta(2, devmot->axis_data[2]));\r
-          if (window->spaceRotate)\r
-            window->spaceRotate(\r
-              normalizeSpaceballAngle(3, devmot->axis_data[3]),\r
-              normalizeSpaceballAngle(4, devmot->axis_data[4]),\r
-              normalizeSpaceballAngle(5, devmot->axis_data[5]));\r
-        }\r
-      }\r
-      return 1;\r
-    }\r
-  } else if (__glutDeviceButtonPress\r
-    && event->type == __glutDeviceButtonPress) {\r
-    XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event;\r
-\r
-    window = __glutGetWindow(devbtn->window);\r
-    if (window) {\r
-      if (__glutTablet\r
-        && devbtn->deviceid == __glutTablet->device_id\r
-        && window->tabletButton\r
-        && devbtn->first_axis == 0\r
-        && devbtn->axes_count == 2) {\r
-        tabletPosChange(window, devbtn->first_axis, devbtn->axes_count,\r
-          devbtn->axis_data);\r
-        window->tabletButton(devbtn->button, GLUT_DOWN,\r
-          window->tabletPos[0], window->tabletPos[1]);\r
-      } else if (__glutDials\r
-          && devbtn->deviceid == __glutDials->device_id\r
-        && window->buttonBox) {\r
-        window->buttonBox(devbtn->button, GLUT_DOWN);\r
-      } else if (__glutSpaceball\r
-          && devbtn->deviceid == __glutSpaceball->device_id\r
-        && window->spaceButton) {\r
-        window->spaceButton(devbtn->button, GLUT_DOWN);\r
-      }\r
-      return 1;\r
-    }\r
-  } else if (__glutDeviceButtonRelease\r
-    && event->type == __glutDeviceButtonRelease) {\r
-    XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event;\r
-\r
-    window = __glutGetWindow(devbtn->window);\r
-    if (window) {\r
-      if (__glutTablet\r
-        && devbtn->deviceid == __glutTablet->device_id\r
-        && window->tabletButton\r
-        && devbtn->first_axis == 0\r
-        && devbtn->axes_count == 2) {\r
-        tabletPosChange(window, devbtn->first_axis, devbtn->axes_count,\r
-          devbtn->axis_data);\r
-        window->tabletButton(devbtn->button, GLUT_UP,\r
-          window->tabletPos[0], window->tabletPos[1]);\r
-      } else if (__glutDials\r
-          && devbtn->deviceid == __glutDials->device_id\r
-        && window->buttonBox) {\r
-        window->buttonBox(devbtn->button, GLUT_UP);\r
-      } else if (__glutSpaceball\r
-          && devbtn->deviceid == __glutSpaceball->device_id\r
-        && window->spaceButton) {\r
-        window->spaceButton(devbtn->button, GLUT_UP);\r
-      }\r
-      return 1;\r
-    }\r
-  }\r
-#else\r
-  {\r
-    JOYINFOEX info;\r
-    JOYCAPS joyCaps;\r
-\r
-    memset(&info, 0, sizeof(JOYINFOEX)); \r
-    info.dwSize = sizeof(JOYINFOEX); \r
-    info.dwFlags = JOY_RETURNALL;\r
-\r
-    if (joyGetPosEx(JOYSTICKID1,&info) != JOYERR_NOERROR) {\r
-      __glutHasJoystick = 1;\r
-      joyGetDevCaps(JOYSTICKID1, &joyCaps, sizeof(joyCaps));\r
-      __glutNumJoystickButtons = joyCaps.wNumButtons;\r
-      __glutNumJoystickAxes = joyCaps.wNumAxes;\r
-    } else {\r
-      __glutHasJoystick = 0;\r
-      __glutNumJoystickButtons = 0;\r
-      __glutNumJoystickAxes = 0;\r
-    }\r
-  }\r
-#endif /* !_WIN32 */\r
-  return 0;\r
-}\r
-\r
-static GLUTeventParser eventParser =\r
-{__glutProcessDeviceEvents, NULL};\r
-\r
-static void\r
-addDeviceEventParser(void)\r
-{\r
-  static Bool been_here = False;\r
-\r
-  if (been_here)\r
-    return;\r
-  been_here = True;\r
-  __glutRegisterEventParser(&eventParser);\r
-}\r
-\r
-static int\r
-probeDevices(void)\r
-{\r
-  static Bool been_here = False;\r
-  static int support;\r
-#if !defined(_WIN32)\r
-  XExtensionVersion *version;\r
-  XDeviceInfoPtr device_info, device;\r
-  XAnyClassPtr any;\r
-  XButtonInfoPtr b;\r
-  XValuatorInfoPtr v;\r
-  XAxisInfoPtr a;\r
-  int num_dev = 0, btns = 0, dials = 0;\r
-  int i, j, k;\r
-#endif /* !_WIN32 */\r
-\r
-  if (been_here) {\r
-    return support;\r
-  }\r
-  been_here = True;\r
-\r
-#if !defined(_WIN32)\r
-  version = XGetExtensionVersion(__glutDisplay, "XInputExtension");\r
-  /* Ugh.  XInput extension API forces annoying cast of a pointer\r
-     to a long so it can be compared with the NoSuchExtension\r
-     value (#defined to 1). */\r
-  if (version == NULL || ((long) version) == NoSuchExtension) {\r
-    support = 0;\r
-    return support;\r
-  }\r
-  XFree(version);\r
-  device_info = XListInputDevices(__glutDisplay, &num_dev);\r
-  if (device_info) {\r
-    for (i = 0; i < num_dev; i++) {\r
-      /* XXX These are SGI names for these devices;\r
-         unfortunately, no good standard exists for standard\r
-         types of X input extension devices. */\r
-\r
-      device = &device_info[i];\r
-      any = (XAnyClassPtr) device->inputclassinfo;\r
-\r
-      if (!__glutSpaceball && !strcmp(device->name, "spaceball")) {\r
-        v = NULL;\r
-        b = NULL;\r
-        for (j = 0; j < device->num_classes; j++) {\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-          switch (any->c_class) {\r
-#else\r
-          switch (any->class) {\r
-#endif\r
-          case ButtonClass:\r
-            b = (XButtonInfoPtr) any;\r
-            btns = b->num_buttons;\r
-            break;\r
-          case ValuatorClass:\r
-            v = (XValuatorInfoPtr) any;\r
-            /* Sanity check: at least 6 valuators? */\r
-            if (v->num_axes < NUM_SPACEBALL_AXIS)\r
-              goto skip_device;\r
-            a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo));\r
-            for (k = 0; k < NUM_SPACEBALL_AXIS; k++, a++) {\r
-              __glutSpaceballRange[k].min = a->min_value;\r
-              __glutSpaceballRange[k].range = a->max_value - a->min_value;\r
-            }\r
-            break;\r
-          }\r
-          any = (XAnyClassPtr) ((char *) any + any->length);\r
-        }\r
-        if (v) {\r
-          __glutSpaceball = XOpenDevice(__glutDisplay, device->id);\r
-          if (__glutSpaceball) {\r
-            __glutNumSpaceballButtons = btns;\r
-            addDeviceEventParser();\r
-          }\r
-        }\r
-      } else if (!__glutDials && !strcmp(device->name, "dial+buttons")) {\r
-        v = NULL;\r
-        b = NULL;\r
-        for (j = 0; j < device->num_classes; j++) {\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-          switch (any->c_class) {\r
-#else\r
-          switch (any->class) {\r
-#endif\r
-          case ButtonClass:\r
-            b = (XButtonInfoPtr) any;\r
-            btns = b->num_buttons;\r
-            break;\r
-          case ValuatorClass:\r
-            v = (XValuatorInfoPtr) any;\r
-            /* Sanity check: at least 8 valuators? */\r
-            if (v->num_axes < NUM_DIALS_AXIS)\r
-              goto skip_device;\r
-            dials = v->num_axes;\r
-            __glutDialsResolution = (int *) malloc(sizeof(int) * dials);\r
-            a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo));\r
-            for (k = 0; k < dials; k++, a++) {\r
-              __glutDialsResolution[k] = a->resolution;\r
-            }\r
-            break;\r
-          }\r
-          any = (XAnyClassPtr) ((char *) any + any->length);\r
-        }\r
-        if (v) {\r
-          __glutDials = XOpenDevice(__glutDisplay, device->id);\r
-          if (__glutDials) {\r
-            __glutNumButtonBoxButtons = btns;\r
-            __glutNumDials = dials;\r
-            addDeviceEventParser();\r
-          }\r
-        }\r
-      } else if (!__glutTablet && !strcmp(device->name, "tablet")) {\r
-        v = NULL;\r
-        b = NULL;\r
-        for (j = 0; j < device->num_classes; j++) {\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-          switch (any->c_class) {\r
-#else\r
-          switch (any->class) {\r
-#endif\r
-          case ButtonClass:\r
-            b = (XButtonInfoPtr) any;\r
-            btns = b->num_buttons;\r
-            break;\r
-          case ValuatorClass:\r
-            v = (XValuatorInfoPtr) any;\r
-            /* Sanity check: exactly 2 valuators? */\r
-            if (v->num_axes != NUM_TABLET_AXIS)\r
-              goto skip_device;\r
-            a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo));\r
-            for (k = 0; k < NUM_TABLET_AXIS; k++, a++) {\r
-              __glutTabletRange[k].min = a->min_value;\r
-              __glutTabletRange[k].range = a->max_value - a->min_value;\r
-            }\r
-            break;\r
-          }\r
-          any = (XAnyClassPtr) ((char *) any + any->length);\r
-        }\r
-        if (v) {\r
-          __glutTablet = XOpenDevice(__glutDisplay, device->id);\r
-          if (__glutTablet) {\r
-            __glutNumTabletButtons = btns;\r
-            addDeviceEventParser();\r
-          }\r
-        }\r
-      } else if (!strcmp(device->name, "mouse")) {\r
-        for (j = 0; j < device->num_classes; j++) {\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-          if (any->c_class == ButtonClass) {\r
-#else\r
-          if (any->class == ButtonClass) {\r
-#endif\r
-            b = (XButtonInfoPtr) any;\r
-            __glutNumMouseButtons = b->num_buttons;\r
-          }\r
-          any = (XAnyClassPtr) ((char *) any + any->length);\r
-        }\r
-      }\r
-    skip_device:;\r
-    }\r
-    XFreeDeviceList(device_info);\r
-  }\r
-#else /* _WIN32 */\r
-  __glutNumMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS);\r
-#endif /* !_WIN32 */\r
-  /* X Input extension might be supported, but only if there is\r
-     a tablet, dials, or spaceball do we claim devices are\r
-     supported. */\r
-  support = __glutTablet || __glutDials || __glutSpaceball;\r
-  return support;\r
-}\r
-\r
-void\r
-__glutUpdateInputDeviceMask(GLUTwindow * window)\r
-{\r
-#if !defined(_WIN32)\r
-  /* 5 (dial and buttons) + 5 (tablet locator and buttons) + 5\r
-     (Spaceball buttons and axis) = 15 */\r
-  XEventClass eventList[15];\r
-  int rc, numEvents;\r
-\r
-  rc = probeDevices();\r
-  if (rc) {\r
-    numEvents = 0;\r
-    if (__glutTablet) {\r
-      if (window->tabletMotion) {\r
-        DeviceMotionNotify(__glutTablet, __glutDeviceMotionNotify,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-      if (window->tabletButton) {\r
-        DeviceButtonPress(__glutTablet, __glutDeviceButtonPress,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-        DeviceButtonPressGrab(__glutTablet, __glutDeviceButtonPressGrab,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-        DeviceButtonRelease(__glutTablet, __glutDeviceButtonRelease,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-      if (window->tabletMotion || window->tabletButton) {\r
-        DeviceStateNotify(__glutTablet, __glutDeviceStateNotify,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-    }\r
-    if (__glutDials) {\r
-      if (window->dials) {\r
-        DeviceMotionNotify(__glutDials, __glutDeviceMotionNotify,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-      if (window->buttonBox) {\r
-        DeviceButtonPress(__glutDials, __glutDeviceButtonPress,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-        DeviceButtonPressGrab(__glutDials, __glutDeviceButtonPressGrab,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-        DeviceButtonRelease(__glutDials, __glutDeviceButtonRelease,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-      if (window->dials || window->buttonBox) {\r
-        DeviceStateNotify(__glutDials, __glutDeviceStateNotify,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-    }\r
-    if (__glutSpaceball) {\r
-      if (window->spaceMotion || window->spaceRotate) {\r
-        DeviceMotionNotify(__glutSpaceball, __glutDeviceMotionNotify,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-      if (window->spaceButton) {\r
-        DeviceButtonPress(__glutSpaceball, __glutDeviceButtonPress,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-        DeviceButtonPressGrab(__glutSpaceball, __glutDeviceButtonPressGrab,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-        DeviceButtonRelease(__glutSpaceball, __glutDeviceButtonRelease,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-      if (window->spaceMotion || window->spaceRotate || window->spaceButton) {\r
-        DeviceStateNotify(__glutSpaceball, __glutDeviceStateNotify,\r
-          eventList[numEvents]);\r
-        numEvents++;\r
-      }\r
-    }\r
-#if 0\r
-    if (window->children) {\r
-      GLUTwindow *child = window->children;\r
-\r
-      do {\r
-        XChangeDeviceDontPropagateList(__glutDisplay, child->win,\r
-          numEvents, eventList, AddToList);\r
-        child = child->siblings;\r
-      } while (child);\r
-    }\r
-#endif\r
-    XSelectExtensionEvent(__glutDisplay, window->win,\r
-      eventList, numEvents);\r
-    if (window->overlay) {\r
-      XSelectExtensionEvent(__glutDisplay, window->overlay->win,\r
-        eventList, numEvents);\r
-    }\r
-  } else {\r
-    /* X Input extension not supported; no chance for exotic\r
-       input devices. */\r
-  }\r
-#endif /* !_WIN32 */\r
-}\r
-\r
-#endif //POFIG\r
-\r
-/* CENTRY */\r
-int GLUTAPIENTRY\r
-glutDeviceGet(GLenum param)\r
-{\r
-#if POFIG\r
-  probeDevices();\r
-#endif\r
-  switch (param) {\r
-  case GLUT_HAS_KEYBOARD:\r
-  case GLUT_HAS_MOUSE:\r
-    /* Assume window system always has mouse and keyboard. */\r
-    return 1;\r
-#if POFIG\r
-  case GLUT_HAS_SPACEBALL:\r
-    return __glutSpaceball != NULL;\r
-  case GLUT_HAS_DIAL_AND_BUTTON_BOX:\r
-    return __glutDials != NULL;\r
-  case GLUT_HAS_TABLET:\r
-    return __glutTablet != NULL;\r
-  case GLUT_NUM_MOUSE_BUTTONS:\r
-    return __glutNumMouseButtons;\r
-  case GLUT_NUM_SPACEBALL_BUTTONS:\r
-    return __glutNumSpaceballButtons;\r
-  case GLUT_NUM_BUTTON_BOX_BUTTONS:\r
-    return __glutNumButtonBoxButtons;\r
-  case GLUT_NUM_DIALS:\r
-    return __glutNumDials;\r
-  case GLUT_NUM_TABLET_BUTTONS:\r
-    return __glutNumTabletButtons;\r
-  case GLUT_DEVICE_IGNORE_KEY_REPEAT:\r
-    return __glutCurrentWindow->ignoreKeyRepeat;\r
-#ifndef _WIN32\r
-  case GLUT_DEVICE_KEY_REPEAT:\r
-    {\r
-      XKeyboardState state;\r
-\r
-      XGetKeyboardControl(__glutDisplay, &state);\r
-      return state.global_auto_repeat;\r
-    }\r
-  case GLUT_JOYSTICK_POLL_RATE:\r
-    return 0;\r
-#else\r
-  case GLUT_DEVICE_KEY_REPEAT:\r
-    /* Win32 cannot globally disable key repeat. */\r
-    return GLUT_KEY_REPEAT_ON;\r
-  case GLUT_JOYSTICK_POLL_RATE:\r
-    return __glutCurrentWindow->joyPollInterval;\r
-#endif\r
-  case GLUT_HAS_JOYSTICK:\r
-    return __glutHasJoystick;\r
-  case GLUT_JOYSTICK_BUTTONS:\r
-    return __glutNumJoystickButtons;\r
-  case GLUT_JOYSTICK_AXES:\r
-    return __glutNumJoystickAxes;\r
-#endif //POFIG\r
-  default:\r
-    __glutWarning("invalid glutDeviceGet parameter: %d", param);\r
-    return -1;\r
-  }\r
-}\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1997, 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. */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "glutint.h"
+#define POFIG 0
+#if POFIG
+
+int __glutNumDials = 0;
+int __glutNumSpaceballButtons = 0;
+int __glutNumButtonBoxButtons = 0;
+int __glutNumTabletButtons = 0;
+int __glutNumMouseButtons = 3;  /* Good guess. */
+XDevice *__glutTablet = NULL;
+XDevice *__glutDials = NULL;
+XDevice *__glutSpaceball = NULL;
+
+int __glutHasJoystick = 0;
+int __glutNumJoystickButtons = 0;
+int __glutNumJoystickAxes = 0;
+
+#if !defined(_WIN32)
+typedef struct _Range {
+  int min;
+  int range;
+} Range;
+
+#define NUM_SPACEBALL_AXIS     6
+#define NUM_TABLET_AXIS                2
+#define NUM_DIALS_AXIS         8
+
+Range __glutSpaceballRange[NUM_SPACEBALL_AXIS];
+Range __glutTabletRange[NUM_TABLET_AXIS];
+int *__glutDialsResolution;
+
+/* Safely assumes 0 is an illegal event type for X Input
+   extension events. */
+int __glutDeviceMotionNotify = 0;
+int __glutDeviceButtonPress = 0;
+int __glutDeviceButtonPressGrab = 0;
+int __glutDeviceButtonRelease = 0;
+int __glutDeviceStateNotify = 0;
+
+static int
+normalizeTabletPos(int axis, int rawValue)
+{
+  assert(rawValue >= __glutTabletRange[axis].min);
+  assert(rawValue <= __glutTabletRange[axis].min
+    + __glutTabletRange[axis].range);
+  /* Normalize rawValue to between 0 and 4000. */
+  return ((rawValue - __glutTabletRange[axis].min) * 4000) /
+    __glutTabletRange[axis].range;
+}
+
+static int
+normalizeDialAngle(int axis, int rawValue)
+{
+  /* XXX Assumption made that the resolution of the device is
+     number of clicks for one complete dial revolution.  This
+     is true for SGI's dial & button box. */
+  return (rawValue * 360.0) / __glutDialsResolution[axis];
+}
+
+static int
+normalizeSpaceballAngle(int axis, int rawValue)
+{
+  assert(rawValue >= __glutSpaceballRange[axis].min);
+  assert(rawValue <= __glutSpaceballRange[axis].min +
+    __glutSpaceballRange[axis].range);
+  /* Normalize rawValue to between -1800 and 1800. */
+  return ((rawValue - __glutSpaceballRange[axis].min) * 3600) /
+    __glutSpaceballRange[axis].range - 1800;
+}
+
+static int
+normalizeSpaceballDelta(int axis, int rawValue)
+{
+  assert(rawValue >= __glutSpaceballRange[axis].min);
+  assert(rawValue <= __glutSpaceballRange[axis].min +
+    __glutSpaceballRange[axis].range);
+  /* Normalize rawValue to between -1000 and 1000. */
+  return ((rawValue - __glutSpaceballRange[axis].min) * 2000) /
+    __glutSpaceballRange[axis].range - 1000;
+}
+
+static void
+queryTabletPos(GLUTwindow * window)
+{
+  XDeviceState *state;
+  XInputClass *any;
+  XValuatorState *v;
+  int i;
+
+  state = XQueryDeviceState(__glutDisplay, __glutTablet);
+  any = state->data;
+  for (i = 0; i < state->num_classes; i++) {
+#if defined(__cplusplus) || defined(c_plusplus)
+    switch (any->c_class) {
+#else
+    switch (any->class) {
+#endif
+    case ValuatorClass:
+      v = (XValuatorState *) any;
+      if (v->num_valuators < 2)
+        goto end;
+      if (window->tabletPos[0] == -1)
+        window->tabletPos[0] = normalizeTabletPos(0, v->valuators[0]);
+      if (window->tabletPos[1] == -1)
+        window->tabletPos[1] = normalizeTabletPos(1, v->valuators[1]);
+    }
+    any = (XInputClass *) ((char *) any + any->length);
+  }
+end:
+  XFreeDeviceState(state);
+}
+
+static void
+tabletPosChange(GLUTwindow * window, int first, int count, int *data)
+{
+  int i, value, genEvent = 0;
+
+  for (i = first; i < first + count; i++) {
+    switch (i) {
+    case 0:            /* X axis */
+    case 1:            /* Y axis */
+      value = normalizeTabletPos(i, data[i - first]);
+      if (value != window->tabletPos[i]) {
+        window->tabletPos[i] = value;
+        genEvent = 1;
+      }
+      break;
+    }
+  }
+  if (window->tabletPos[0] == -1 || window->tabletPos[1] == -1)
+    queryTabletPos(window);
+  if (genEvent)
+    window->tabletMotion(window->tabletPos[0], window->tabletPos[1]);
+}
+#endif /* !_WIN32 */
+
+static int
+__glutProcessDeviceEvents(XEvent * event)
+{
+#if !defined(_WIN32)
+  GLUTwindow *window;
+
+  /* XXX Ugly code fan out. */
+
+  /* Can't use switch/case since X Input event types are
+     dynamic. */
+
+  if (__glutDeviceMotionNotify && event->type == __glutDeviceMotionNotify) {
+    XDeviceMotionEvent *devmot = (XDeviceMotionEvent *) event;
+
+    window = __glutGetWindow(devmot->window);
+    if (window) {
+      if (__glutTablet
+        && devmot->deviceid == __glutTablet->device_id
+        && window->tabletMotion) {
+        tabletPosChange(window, devmot->first_axis, devmot->axes_count,
+          devmot->axis_data);
+      } else if (__glutDials
+          && devmot->deviceid == __glutDials->device_id
+        && window->dials) {
+        int i, first = devmot->first_axis, count = devmot->axes_count;
+
+        for (i = first; i < first + count; i++)
+          window->dials(i + 1,
+            normalizeDialAngle(i, devmot->axis_data[i - first]));
+      } else if (__glutSpaceball
+        && devmot->deviceid == __glutSpaceball->device_id) {
+        /* XXX Assume that space ball motion events come in as
+           all the first 6 axes.  Assume first 3 axes are XYZ
+           translations; second 3 axes are XYZ rotations. */
+        if (devmot->first_axis == 0 && devmot->axes_count == 6) {
+          if (window->spaceMotion)
+            window->spaceMotion(
+              normalizeSpaceballDelta(0, devmot->axis_data[0]),
+              normalizeSpaceballDelta(1, devmot->axis_data[1]),
+              normalizeSpaceballDelta(2, devmot->axis_data[2]));
+          if (window->spaceRotate)
+            window->spaceRotate(
+              normalizeSpaceballAngle(3, devmot->axis_data[3]),
+              normalizeSpaceballAngle(4, devmot->axis_data[4]),
+              normalizeSpaceballAngle(5, devmot->axis_data[5]));
+        }
+      }
+      return 1;
+    }
+  } else if (__glutDeviceButtonPress
+    && event->type == __glutDeviceButtonPress) {
+    XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event;
+
+    window = __glutGetWindow(devbtn->window);
+    if (window) {
+      if (__glutTablet
+        && devbtn->deviceid == __glutTablet->device_id
+        && window->tabletButton
+        && devbtn->first_axis == 0
+        && devbtn->axes_count == 2) {
+        tabletPosChange(window, devbtn->first_axis, devbtn->axes_count,
+          devbtn->axis_data);
+        window->tabletButton(devbtn->button, GLUT_DOWN,
+          window->tabletPos[0], window->tabletPos[1]);
+      } else if (__glutDials
+          && devbtn->deviceid == __glutDials->device_id
+        && window->buttonBox) {
+        window->buttonBox(devbtn->button, GLUT_DOWN);
+      } else if (__glutSpaceball
+          && devbtn->deviceid == __glutSpaceball->device_id
+        && window->spaceButton) {
+        window->spaceButton(devbtn->button, GLUT_DOWN);
+      }
+      return 1;
+    }
+  } else if (__glutDeviceButtonRelease
+    && event->type == __glutDeviceButtonRelease) {
+    XDeviceButtonEvent *devbtn = (XDeviceButtonEvent *) event;
+
+    window = __glutGetWindow(devbtn->window);
+    if (window) {
+      if (__glutTablet
+        && devbtn->deviceid == __glutTablet->device_id
+        && window->tabletButton
+        && devbtn->first_axis == 0
+        && devbtn->axes_count == 2) {
+        tabletPosChange(window, devbtn->first_axis, devbtn->axes_count,
+          devbtn->axis_data);
+        window->tabletButton(devbtn->button, GLUT_UP,
+          window->tabletPos[0], window->tabletPos[1]);
+      } else if (__glutDials
+          && devbtn->deviceid == __glutDials->device_id
+        && window->buttonBox) {
+        window->buttonBox(devbtn->button, GLUT_UP);
+      } else if (__glutSpaceball
+          && devbtn->deviceid == __glutSpaceball->device_id
+        && window->spaceButton) {
+        window->spaceButton(devbtn->button, GLUT_UP);
+      }
+      return 1;
+    }
+  }
+#else
+  {
+    JOYINFOEX info;
+    JOYCAPS joyCaps;
+
+    memset(&info, 0, sizeof(JOYINFOEX)); 
+    info.dwSize = sizeof(JOYINFOEX); 
+    info.dwFlags = JOY_RETURNALL;
+
+    if (joyGetPosEx(JOYSTICKID1,&info) != JOYERR_NOERROR) {
+      __glutHasJoystick = 1;
+      joyGetDevCaps(JOYSTICKID1, &joyCaps, sizeof(joyCaps));
+      __glutNumJoystickButtons = joyCaps.wNumButtons;
+      __glutNumJoystickAxes = joyCaps.wNumAxes;
+    } else {
+      __glutHasJoystick = 0;
+      __glutNumJoystickButtons = 0;
+      __glutNumJoystickAxes = 0;
+    }
+  }
+#endif /* !_WIN32 */
+  return 0;
+}
+
+static GLUTeventParser eventParser =
+{__glutProcessDeviceEvents, NULL};
+
+static void
+addDeviceEventParser(void)
+{
+  static Bool been_here = False;
+
+  if (been_here)
+    return;
+  been_here = True;
+  __glutRegisterEventParser(&eventParser);
+}
+
+static int
+probeDevices(void)
+{
+  static Bool been_here = False;
+  static int support;
+#if !defined(_WIN32)
+  XExtensionVersion *version;
+  XDeviceInfoPtr device_info, device;
+  XAnyClassPtr any;
+  XButtonInfoPtr b;
+  XValuatorInfoPtr v;
+  XAxisInfoPtr a;
+  int num_dev = 0, btns = 0, dials = 0;
+  int i, j, k;
+#endif /* !_WIN32 */
+
+  if (been_here) {
+    return support;
+  }
+  been_here = True;
+
+#if !defined(_WIN32)
+  version = XGetExtensionVersion(__glutDisplay, "XInputExtension");
+  /* Ugh.  XInput extension API forces annoying cast of a pointer
+     to a long so it can be compared with the NoSuchExtension
+     value (#defined to 1). */
+  if (version == NULL || ((long) version) == NoSuchExtension) {
+    support = 0;
+    return support;
+  }
+  XFree(version);
+  device_info = XListInputDevices(__glutDisplay, &num_dev);
+  if (device_info) {
+    for (i = 0; i < num_dev; i++) {
+      /* XXX These are SGI names for these devices;
+         unfortunately, no good standard exists for standard
+         types of X input extension devices. */
+
+      device = &device_info[i];
+      any = (XAnyClassPtr) device->inputclassinfo;
+
+      if (!__glutSpaceball && !strcmp(device->name, "spaceball")) {
+        v = NULL;
+        b = NULL;
+        for (j = 0; j < device->num_classes; j++) {
+#if defined(__cplusplus) || defined(c_plusplus)
+          switch (any->c_class) {
+#else
+          switch (any->class) {
+#endif
+          case ButtonClass:
+            b = (XButtonInfoPtr) any;
+            btns = b->num_buttons;
+            break;
+          case ValuatorClass:
+            v = (XValuatorInfoPtr) any;
+            /* Sanity check: at least 6 valuators? */
+            if (v->num_axes < NUM_SPACEBALL_AXIS)
+              goto skip_device;
+            a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo));
+            for (k = 0; k < NUM_SPACEBALL_AXIS; k++, a++) {
+              __glutSpaceballRange[k].min = a->min_value;
+              __glutSpaceballRange[k].range = a->max_value - a->min_value;
+            }
+            break;
+          }
+          any = (XAnyClassPtr) ((char *) any + any->length);
+        }
+        if (v) {
+          __glutSpaceball = XOpenDevice(__glutDisplay, device->id);
+          if (__glutSpaceball) {
+            __glutNumSpaceballButtons = btns;
+            addDeviceEventParser();
+          }
+        }
+      } else if (!__glutDials && !strcmp(device->name, "dial+buttons")) {
+        v = NULL;
+        b = NULL;
+        for (j = 0; j < device->num_classes; j++) {
+#if defined(__cplusplus) || defined(c_plusplus)
+          switch (any->c_class) {
+#else
+          switch (any->class) {
+#endif
+          case ButtonClass:
+            b = (XButtonInfoPtr) any;
+            btns = b->num_buttons;
+            break;
+          case ValuatorClass:
+            v = (XValuatorInfoPtr) any;
+            /* Sanity check: at least 8 valuators? */
+            if (v->num_axes < NUM_DIALS_AXIS)
+              goto skip_device;
+            dials = v->num_axes;
+            __glutDialsResolution = (int *) malloc(sizeof(int) * dials);
+            a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo));
+            for (k = 0; k < dials; k++, a++) {
+              __glutDialsResolution[k] = a->resolution;
+            }
+            break;
+          }
+          any = (XAnyClassPtr) ((char *) any + any->length);
+        }
+        if (v) {
+          __glutDials = XOpenDevice(__glutDisplay, device->id);
+          if (__glutDials) {
+            __glutNumButtonBoxButtons = btns;
+            __glutNumDials = dials;
+            addDeviceEventParser();
+          }
+        }
+      } else if (!__glutTablet && !strcmp(device->name, "tablet")) {
+        v = NULL;
+        b = NULL;
+        for (j = 0; j < device->num_classes; j++) {
+#if defined(__cplusplus) || defined(c_plusplus)
+          switch (any->c_class) {
+#else
+          switch (any->class) {
+#endif
+          case ButtonClass:
+            b = (XButtonInfoPtr) any;
+            btns = b->num_buttons;
+            break;
+          case ValuatorClass:
+            v = (XValuatorInfoPtr) any;
+            /* Sanity check: exactly 2 valuators? */
+            if (v->num_axes != NUM_TABLET_AXIS)
+              goto skip_device;
+            a = (XAxisInfoPtr) ((char *) v + sizeof(XValuatorInfo));
+            for (k = 0; k < NUM_TABLET_AXIS; k++, a++) {
+              __glutTabletRange[k].min = a->min_value;
+              __glutTabletRange[k].range = a->max_value - a->min_value;
+            }
+            break;
+          }
+          any = (XAnyClassPtr) ((char *) any + any->length);
+        }
+        if (v) {
+          __glutTablet = XOpenDevice(__glutDisplay, device->id);
+          if (__glutTablet) {
+            __glutNumTabletButtons = btns;
+            addDeviceEventParser();
+          }
+        }
+      } else if (!strcmp(device->name, "mouse")) {
+        for (j = 0; j < device->num_classes; j++) {
+#if defined(__cplusplus) || defined(c_plusplus)
+          if (any->c_class == ButtonClass) {
+#else
+          if (any->class == ButtonClass) {
+#endif
+            b = (XButtonInfoPtr) any;
+            __glutNumMouseButtons = b->num_buttons;
+          }
+          any = (XAnyClassPtr) ((char *) any + any->length);
+        }
+      }
+    skip_device:;
+    }
+    XFreeDeviceList(device_info);
+  }
+#else /* _WIN32 */
+  __glutNumMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS);
+#endif /* !_WIN32 */
+  /* X Input extension might be supported, but only if there is
+     a tablet, dials, or spaceball do we claim devices are
+     supported. */
+  support = __glutTablet || __glutDials || __glutSpaceball;
+  return support;
+}
+
+void
+__glutUpdateInputDeviceMask(GLUTwindow * window)
+{
+#if !defined(_WIN32)
+  /* 5 (dial and buttons) + 5 (tablet locator and buttons) + 5
+     (Spaceball buttons and axis) = 15 */
+  XEventClass eventList[15];
+  int rc, numEvents;
+
+  rc = probeDevices();
+  if (rc) {
+    numEvents = 0;
+    if (__glutTablet) {
+      if (window->tabletMotion) {
+        DeviceMotionNotify(__glutTablet, __glutDeviceMotionNotify,
+          eventList[numEvents]);
+        numEvents++;
+      }
+      if (window->tabletButton) {
+        DeviceButtonPress(__glutTablet, __glutDeviceButtonPress,
+          eventList[numEvents]);
+        numEvents++;
+        DeviceButtonPressGrab(__glutTablet, __glutDeviceButtonPressGrab,
+          eventList[numEvents]);
+        numEvents++;
+        DeviceButtonRelease(__glutTablet, __glutDeviceButtonRelease,
+          eventList[numEvents]);
+        numEvents++;
+      }
+      if (window->tabletMotion || window->tabletButton) {
+        DeviceStateNotify(__glutTablet, __glutDeviceStateNotify,
+          eventList[numEvents]);
+        numEvents++;
+      }
+    }
+    if (__glutDials) {
+      if (window->dials) {
+        DeviceMotionNotify(__glutDials, __glutDeviceMotionNotify,
+          eventList[numEvents]);
+        numEvents++;
+      }
+      if (window->buttonBox) {
+        DeviceButtonPress(__glutDials, __glutDeviceButtonPress,
+          eventList[numEvents]);
+        numEvents++;
+        DeviceButtonPressGrab(__glutDials, __glutDeviceButtonPressGrab,
+          eventList[numEvents]);
+        numEvents++;
+        DeviceButtonRelease(__glutDials, __glutDeviceButtonRelease,
+          eventList[numEvents]);
+        numEvents++;
+      }
+      if (window->dials || window->buttonBox) {
+        DeviceStateNotify(__glutDials, __glutDeviceStateNotify,
+          eventList[numEvents]);
+        numEvents++;
+      }
+    }
+    if (__glutSpaceball) {
+      if (window->spaceMotion || window->spaceRotate) {
+        DeviceMotionNotify(__glutSpaceball, __glutDeviceMotionNotify,
+          eventList[numEvents]);
+        numEvents++;
+      }
+      if (window->spaceButton) {
+        DeviceButtonPress(__glutSpaceball, __glutDeviceButtonPress,
+          eventList[numEvents]);
+        numEvents++;
+        DeviceButtonPressGrab(__glutSpaceball, __glutDeviceButtonPressGrab,
+          eventList[numEvents]);
+        numEvents++;
+        DeviceButtonRelease(__glutSpaceball, __glutDeviceButtonRelease,
+          eventList[numEvents]);
+        numEvents++;
+      }
+      if (window->spaceMotion || window->spaceRotate || window->spaceButton) {
+        DeviceStateNotify(__glutSpaceball, __glutDeviceStateNotify,
+          eventList[numEvents]);
+        numEvents++;
+      }
+    }
+#if 0
+    if (window->children) {
+      GLUTwindow *child = window->children;
+
+      do {
+        XChangeDeviceDontPropagateList(__glutDisplay, child->win,
+          numEvents, eventList, AddToList);
+        child = child->siblings;
+      } while (child);
+    }
+#endif
+    XSelectExtensionEvent(__glutDisplay, window->win,
+      eventList, numEvents);
+    if (window->overlay) {
+      XSelectExtensionEvent(__glutDisplay, window->overlay->win,
+        eventList, numEvents);
+    }
+  } else {
+    /* X Input extension not supported; no chance for exotic
+       input devices. */
+  }
+#endif /* !_WIN32 */
+}
+
+#endif //POFIG
+
+/* CENTRY */
+int GLUTAPIENTRY
+glutDeviceGet(GLenum param)
+{
+#if POFIG
+  probeDevices();
+#endif
+  switch (param) {
+  case GLUT_HAS_KEYBOARD:
+  case GLUT_HAS_MOUSE:
+    /* Assume window system always has mouse and keyboard. */
+    return 1;
+#if POFIG
+  case GLUT_HAS_SPACEBALL:
+    return __glutSpaceball != NULL;
+  case GLUT_HAS_DIAL_AND_BUTTON_BOX:
+    return __glutDials != NULL;
+  case GLUT_HAS_TABLET:
+    return __glutTablet != NULL;
+  case GLUT_NUM_MOUSE_BUTTONS:
+    return __glutNumMouseButtons;
+  case GLUT_NUM_SPACEBALL_BUTTONS:
+    return __glutNumSpaceballButtons;
+  case GLUT_NUM_BUTTON_BOX_BUTTONS:
+    return __glutNumButtonBoxButtons;
+  case GLUT_NUM_DIALS:
+    return __glutNumDials;
+  case GLUT_NUM_TABLET_BUTTONS:
+    return __glutNumTabletButtons;
+  case GLUT_DEVICE_IGNORE_KEY_REPEAT:
+    return __glutCurrentWindow->ignoreKeyRepeat;
+#ifndef _WIN32
+  case GLUT_DEVICE_KEY_REPEAT:
+    {
+      XKeyboardState state;
+
+      XGetKeyboardControl(__glutDisplay, &state);
+      return state.global_auto_repeat;
+    }
+  case GLUT_JOYSTICK_POLL_RATE:
+    return 0;
+#else
+  case GLUT_DEVICE_KEY_REPEAT:
+    /* Win32 cannot globally disable key repeat. */
+    return GLUT_KEY_REPEAT_ON;
+  case GLUT_JOYSTICK_POLL_RATE:
+    return __glutCurrentWindow->joyPollInterval;
+#endif
+  case GLUT_HAS_JOYSTICK:
+    return __glutHasJoystick;
+  case GLUT_JOYSTICK_BUTTONS:
+    return __glutNumJoystickButtons;
+  case GLUT_JOYSTICK_AXES:
+    return __glutNumJoystickAxes;
+#endif //POFIG
+  default:
+    __glutWarning("invalid glutDeviceGet parameter: %d", param);
+    return -1;
+  }
+}
+/* ENDCENTRY */
index a1b9919abc47e9d027ed76c8dbeb9717c241b430..3e1f7e52c1b8bb20001f239d4146d625b7f7c8cf 100644 (file)
@@ -1,29 +1,29 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1997. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutKeyboardFunc(GLUTkeyboardCB keyboardFunc)\r
-{\r
-  __glutChangeWindowEventMask(KeyPressMask,\r
-    keyboardFunc != NULL || __glutCurrentWindow->special != NULL);\r
-  __glutCurrentWindow->keyboard = keyboardFunc;\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSpecialFunc(GLUTspecialCB specialFunc)\r
-{\r
-  __glutChangeWindowEventMask(KeyPressMask,\r
-    specialFunc != NULL || __glutCurrentWindow->keyboard != NULL);\r
-  __glutCurrentWindow->special = specialFunc;\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1997. */
+
+/* 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. */
+
+#include <stdlib.h>
+
+#include "glutint.h"
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutKeyboardFunc(GLUTkeyboardCB keyboardFunc)
+{
+  __glutChangeWindowEventMask(KeyPressMask,
+    keyboardFunc != NULL || __glutCurrentWindow->special != NULL);
+  __glutCurrentWindow->keyboard = keyboardFunc;
+}
+
+void GLUTAPIENTRY
+glutSpecialFunc(GLUTspecialCB specialFunc)
+{
+  __glutChangeWindowEventMask(KeyPressMask,
+    specialFunc != NULL || __glutCurrentWindow->keyboard != NULL);
+  __glutCurrentWindow->special = specialFunc;
+}
+
+/* ENDCENTRY */
index b0f3a28f7d820d7dc5af8510385d2d94d450a2ca..ddac630509a0f8c5ad50351662245440486562d0 100644 (file)
@@ -1,29 +1,29 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1996, 1997. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutIgnoreKeyRepeat(int ignore)\r
-{\r
-  __glutCurrentWindow->ignoreKeyRepeat = ignore;\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSetKeyRepeat(int repeatMode)\r
-{\r
-#if !defined(_WIN32) && !defined(__OS2PM__)\r
-  XKeyboardControl values;\r
-\r
-  /* GLUT's repeatMode #define's match the Xlib API values. */\r
-  values.auto_repeat_mode = repeatMode;\r
-  XChangeKeyboardControl(__glutDisplay, KBAutoRepeatMode, &values);\r
-#endif\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1996, 1997. */
+
+/* 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. */
+
+#include "glutint.h"
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutIgnoreKeyRepeat(int ignore)
+{
+  __glutCurrentWindow->ignoreKeyRepeat = ignore;
+}
+
+void GLUTAPIENTRY
+glutSetKeyRepeat(int repeatMode)
+{
+#if !defined(_WIN32) && !defined(__OS2PM__)
+  XKeyboardControl values;
+
+  /* GLUT's repeatMode #define's match the Xlib API values. */
+  values.auto_repeat_mode = repeatMode;
+  XChangeKeyboardControl(__glutDisplay, KBAutoRepeatMode, &values);
+#endif
+}
+
+/* ENDCENTRY */
index ada758e2774ad2cb16e66f5ff5c3a91e246cdb53..c33770f1be0ed911d54a2bdf4cc956dd8a2e6cf1 100644 (file)
@@ -1,29 +1,29 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1997. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutKeyboardUpFunc(GLUTkeyboardCB keyboardUpFunc)\r
-{\r
-  __glutChangeWindowEventMask(KeyReleaseMask,\r
-    keyboardUpFunc != NULL || __glutCurrentWindow->specialUp != NULL);\r
-  __glutCurrentWindow->keyboardUp = keyboardUpFunc;\r
-}\r
-\r
-void  GLUTAPIENTRY\r
-glutSpecialUpFunc(GLUTspecialCB specialUpFunc)\r
-{\r
-  __glutChangeWindowEventMask(KeyReleaseMask,\r
-    specialUpFunc != NULL || __glutCurrentWindow->keyboardUp != NULL);\r
-  __glutCurrentWindow->specialUp = specialUpFunc;\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1997. */
+
+/* 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. */
+
+#include <stdlib.h>
+
+#include "glutint.h"
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutKeyboardUpFunc(GLUTkeyboardCB keyboardUpFunc)
+{
+  __glutChangeWindowEventMask(KeyReleaseMask,
+    keyboardUpFunc != NULL || __glutCurrentWindow->specialUp != NULL);
+  __glutCurrentWindow->keyboardUp = keyboardUpFunc;
+}
+
+void  GLUTAPIENTRY
+glutSpecialUpFunc(GLUTspecialCB specialUpFunc)
+{
+  __glutChangeWindowEventMask(KeyReleaseMask,
+    specialUpFunc != NULL || __glutCurrentWindow->keyboardUp != NULL);
+  __glutCurrentWindow->specialUp = specialUpFunc;
+}
+
+/* ENDCENTRY */
index 73682a506728d9c478f089bafcd1033595bb4f05..7e202fa078684c4d5f1b8909a7da47ff753f2db9 100644 (file)
@@ -1,57 +1,57 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1996. */\r
-\r
-/* This program is freely distributable without licensing fees \r
-   and is provided without guarantee or warrantee expressed or \r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include "glutint.h"\r
-\r
-int __glutMesaSwapHackSupport = 0;  /* Not supported until\r
-                                       proven otherwise. */\r
-\r
-/* Use the "Mesa swap hack" if reasonable if and only if\r
-   MESA_SWAP_HACK is set to something whose first character is\r
-   not "N" or "n" AND "Brian Paul" is the vendor string AND\r
-   "Mesa X11"* (or "Mesa" for backward compatibility)  is the\r
-   renderer string.\r
-\r
-   Anyone who modifies Mesa so that glXSwapBuffers does not\r
-   simply blit the previously rendered back buffer should\r
-   change either their vendor or renderer string to avoid\r
-   confusing GLUT. */\r
-\r
-void\r
-__glutDetermineMesaSwapHackSupport(void)\r
-{\r
-  static int doneAlready = 0;\r
-  char *env, *vendor, *renderer;\r
-\r
-  if (doneAlready)\r
-    return;\r
-  env = getenv("MESA_SWAP_HACK");\r
-  if (env) {\r
-    if ((env[0] != 'n') && (env[0] != 'N')) {\r
-      vendor = (char *) glGetString(GL_VENDOR);\r
-      renderer = (char *) glGetString(GL_RENDERER);\r
-\r
-      /* Old versions of X11 Mesa uses the renderer string\r
-         "Mesa"; Brian plans to start using "Mesa X11" to\r
-         distinguish the X version of Mesa from other flavor\r
-         such as Windows or 3Dfx. */\r
-\r
-#define MESA_X11 "Mesa X11"\r
-\r
-      /* XXX At some point in the future, eliminate the\r
-         backward compatibility for the old "Mesa" renderer\r
-         string. */\r
-\r
-      if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") ||\r
-          !strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1)))\r
-        __glutMesaSwapHackSupport = 1;\r
-    }\r
-  }\r
-  doneAlready = 1;\r
-}\r
+
+/* Copyright (c) Mark J. Kilgard, 1996. */
+
+/* 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. */
+
+#include <stdlib.h>
+#include <string.h>
+#include "glutint.h"
+
+int __glutMesaSwapHackSupport = 0;  /* Not supported until
+                                       proven otherwise. */
+
+/* Use the "Mesa swap hack" if reasonable if and only if
+   MESA_SWAP_HACK is set to something whose first character is
+   not "N" or "n" AND "Brian Paul" is the vendor string AND
+   "Mesa X11"* (or "Mesa" for backward compatibility)  is the
+   renderer string.
+
+   Anyone who modifies Mesa so that glXSwapBuffers does not
+   simply blit the previously rendered back buffer should
+   change either their vendor or renderer string to avoid
+   confusing GLUT. */
+
+void
+__glutDetermineMesaSwapHackSupport(void)
+{
+  static int doneAlready = 0;
+  char *env, *vendor, *renderer;
+
+  if (doneAlready)
+    return;
+  env = getenv("MESA_SWAP_HACK");
+  if (env) {
+    if ((env[0] != 'n') && (env[0] != 'N')) {
+      vendor = (char *) glGetString(GL_VENDOR);
+      renderer = (char *) glGetString(GL_RENDERER);
+
+      /* Old versions of X11 Mesa uses the renderer string
+         "Mesa"; Brian plans to start using "Mesa X11" to
+         distinguish the X version of Mesa from other flavor
+         such as Windows or 3Dfx. */
+
+#define MESA_X11 "Mesa X11"
+
+      /* XXX At some point in the future, eliminate the
+         backward compatibility for the old "Mesa" renderer
+         string. */
+
+      if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") ||
+          !strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1)))
+        __glutMesaSwapHackSupport = 1;
+    }
+  }
+  doneAlready = 1;
+}
index 0ffa5a68010a7bc99e2e9c08caa2486fba22adb9..7e0e67a21f2c769f1a450a7868b8d79112fcc22f 100644 (file)
@@ -1,31 +1,31 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1994. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-int GLUTAPIENTRY\r
-glutGetModifiers(void)\r
-{\r
-  int modifiers;\r
-\r
-  if(__glutModifierMask == (unsigned int) ~0) {\r
-    __glutWarning(\r
-      "glutCurrentModifiers: do not call outside core input callback.");\r
-    return 0;\r
-  }\r
-  modifiers = 0;\r
-  if(__glutModifierMask & (ShiftMask|LockMask))\r
-    modifiers |= GLUT_ACTIVE_SHIFT;\r
-  if(__glutModifierMask & ControlMask)\r
-    modifiers |= GLUT_ACTIVE_CTRL;\r
-  if(__glutModifierMask & Mod1Mask)\r
-    modifiers |= GLUT_ACTIVE_ALT;\r
-  return modifiers;\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* 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. */
+
+#include "glutint.h"
+
+/* CENTRY */
+int GLUTAPIENTRY
+glutGetModifiers(void)
+{
+  int modifiers;
+
+  if(__glutModifierMask == (unsigned int) ~0) {
+    __glutWarning(
+      "glutCurrentModifiers: do not call outside core input callback.");
+    return 0;
+  }
+  modifiers = 0;
+  if(__glutModifierMask & (ShiftMask|LockMask))
+    modifiers |= GLUT_ACTIVE_SHIFT;
+  if(__glutModifierMask & ControlMask)
+    modifiers |= GLUT_ACTIVE_CTRL;
+  if(__glutModifierMask & Mod1Mask)
+    modifiers |= GLUT_ACTIVE_ALT;
+  return modifiers;
+}
+
+/* ENDCENTRY */
index 8e25de8ac1ad1e6f5be886c7e720c8c7a4ef9de2..af2b4ec956d2638c0f150b21c4087089f52366d3 100644 (file)
-\r
-/* GENERATED FILE -- DO NOT MODIFY */\r
-\r
-#include "glutstroke.h"\r
-\r
-/* char: 33 '!' */\r
-\r
-static const CoordRec char33_stroke0[] = {\r
-    { 13.3819, 100 },\r
-    { 13.3819, 33.3333 },\r
-};\r
-\r
-static const CoordRec char33_stroke1[] = {\r
-    { 13.3819, 9.5238 },\r
-    { 8.62, 4.7619 },\r
-    { 13.3819, 0 },\r
-    { 18.1438, 4.7619 },\r
-    { 13.3819, 9.5238 },\r
-};\r
-\r
-static const StrokeRec char33[] = {\r
-   { 2, char33_stroke0 },\r
-   { 5, char33_stroke1 },\r
-};\r
-\r
-/* char: 34 '"' */\r
-\r
-static const CoordRec char34_stroke0[] = {\r
-    { 4.02, 100 },\r
-    { 4.02, 66.6667 },\r
-};\r
-\r
-static const CoordRec char34_stroke1[] = {\r
-    { 42.1152, 100 },\r
-    { 42.1152, 66.6667 },\r
-};\r
-\r
-static const StrokeRec char34[] = {\r
-   { 2, char34_stroke0 },\r
-   { 2, char34_stroke1 },\r
-};\r
-\r
-/* char: 35 '#' */\r
-\r
-static const CoordRec char35_stroke0[] = {\r
-    { 41.2952, 119.048 },\r
-    { 7.9619, -33.3333 },\r
-};\r
-\r
-static const CoordRec char35_stroke1[] = {\r
-    { 69.8667, 119.048 },\r
-    { 36.5333, -33.3333 },\r
-};\r
-\r
-static const CoordRec char35_stroke2[] = {\r
-    { 7.9619, 57.1429 },\r
-    { 74.6286, 57.1429 },\r
-};\r
-\r
-static const CoordRec char35_stroke3[] = {\r
-    { 3.2, 28.5714 },\r
-    { 69.8667, 28.5714 },\r
-};\r
-\r
-static const StrokeRec char35[] = {\r
-   { 2, char35_stroke0 },\r
-   { 2, char35_stroke1 },\r
-   { 2, char35_stroke2 },\r
-   { 2, char35_stroke3 },\r
-};\r
-\r
-/* char: 36 '$' */\r
-\r
-static const CoordRec char36_stroke0[] = {\r
-    { 28.6295, 119.048 },\r
-    { 28.6295, -19.0476 },\r
-};\r
-\r
-static const CoordRec char36_stroke1[] = {\r
-    { 47.6771, 119.048 },\r
-    { 47.6771, -19.0476 },\r
-};\r
-\r
-static const CoordRec char36_stroke2[] = {\r
-    { 71.4867, 85.7143 },\r
-    { 61.9629, 95.2381 },\r
-    { 47.6771, 100 },\r
-    { 28.6295, 100 },\r
-    { 14.3438, 95.2381 },\r
-    { 4.82, 85.7143 },\r
-    { 4.82, 76.1905 },\r
-    { 9.5819, 66.6667 },\r
-    { 14.3438, 61.9048 },\r
-    { 23.8676, 57.1429 },\r
-    { 52.439, 47.619 },\r
-    { 61.9629, 42.8571 },\r
-    { 66.7248, 38.0952 },\r
-    { 71.4867, 28.5714 },\r
-    { 71.4867, 14.2857 },\r
-    { 61.9629, 4.7619 },\r
-    { 47.6771, 0 },\r
-    { 28.6295, 0 },\r
-    { 14.3438, 4.7619 },\r
-    { 4.82, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char36[] = {\r
-   { 2, char36_stroke0 },\r
-   { 2, char36_stroke1 },\r
-   { 20, char36_stroke2 },\r
-};\r
-\r
-/* char: 37 '%' */\r
-\r
-static const CoordRec char37_stroke0[] = {\r
-    { 92.0743, 100 },\r
-    { 6.36, 0 },\r
-};\r
-\r
-static const CoordRec char37_stroke1[] = {\r
-    { 30.1695, 100 },\r
-    { 39.6933, 90.4762 },\r
-    { 39.6933, 80.9524 },\r
-    { 34.9314, 71.4286 },\r
-    { 25.4076, 66.6667 },\r
-    { 15.8838, 66.6667 },\r
-    { 6.36, 76.1905 },\r
-    { 6.36, 85.7143 },\r
-    { 11.1219, 95.2381 },\r
-    { 20.6457, 100 },\r
-    { 30.1695, 100 },\r
-    { 39.6933, 95.2381 },\r
-    { 53.979, 90.4762 },\r
-    { 68.2648, 90.4762 },\r
-    { 82.5505, 95.2381 },\r
-    { 92.0743, 100 },\r
-};\r
-\r
-static const CoordRec char37_stroke2[] = {\r
-    { 73.0267, 33.3333 },\r
-    { 63.5029, 28.5714 },\r
-    { 58.741, 19.0476 },\r
-    { 58.741, 9.5238 },\r
-    { 68.2648, 0 },\r
-    { 77.7886, 0 },\r
-    { 87.3124, 4.7619 },\r
-    { 92.0743, 14.2857 },\r
-    { 92.0743, 23.8095 },\r
-    { 82.5505, 33.3333 },\r
-    { 73.0267, 33.3333 },\r
-};\r
-\r
-static const StrokeRec char37[] = {\r
-   { 2, char37_stroke0 },\r
-   { 16, char37_stroke1 },\r
-   { 11, char37_stroke2 },\r
-};\r
-\r
-/* char: 38 '&' */\r
-\r
-static const CoordRec char38_stroke0[] = {\r
-    { 101.218, 57.1429 },\r
-    { 101.218, 61.9048 },\r
-    { 96.4562, 66.6667 },\r
-    { 91.6943, 66.6667 },\r
-    { 86.9324, 61.9048 },\r
-    { 82.1705, 52.381 },\r
-    { 72.6467, 28.5714 },\r
-    { 63.1229, 14.2857 },\r
-    { 53.599, 4.7619 },\r
-    { 44.0752, 0 },\r
-    { 25.0276, 0 },\r
-    { 15.5038, 4.7619 },\r
-    { 10.7419, 9.5238 },\r
-    { 5.98, 19.0476 },\r
-    { 5.98, 28.5714 },\r
-    { 10.7419, 38.0952 },\r
-    { 15.5038, 42.8571 },\r
-    { 48.8371, 61.9048 },\r
-    { 53.599, 66.6667 },\r
-    { 58.361, 76.1905 },\r
-    { 58.361, 85.7143 },\r
-    { 53.599, 95.2381 },\r
-    { 44.0752, 100 },\r
-    { 34.5514, 95.2381 },\r
-    { 29.7895, 85.7143 },\r
-    { 29.7895, 76.1905 },\r
-    { 34.5514, 61.9048 },\r
-    { 44.0752, 47.619 },\r
-    { 67.8848, 14.2857 },\r
-    { 77.4086, 4.7619 },\r
-    { 86.9324, 0 },\r
-    { 96.4562, 0 },\r
-    { 101.218, 4.7619 },\r
-    { 101.218, 9.5238 },\r
-};\r
-\r
-static const StrokeRec char38[] = {\r
-   { 34, char38_stroke0 },\r
-};\r
-\r
-/* char: 39 ''' */\r
-\r
-static const CoordRec char39_stroke0[] = {\r
-    { 4.44, 100 },\r
-    { 4.44, 66.6667 },\r
-};\r
-\r
-static const StrokeRec char39[] = {\r
-   { 2, char39_stroke0 },\r
-};\r
-\r
-/* char: 40 '(' */\r
-\r
-static const CoordRec char40_stroke0[] = {\r
-    { 40.9133, 119.048 },\r
-    { 31.3895, 109.524 },\r
-    { 21.8657, 95.2381 },\r
-    { 12.3419, 76.1905 },\r
-    { 7.58, 52.381 },\r
-    { 7.58, 33.3333 },\r
-    { 12.3419, 9.5238 },\r
-    { 21.8657, -9.5238 },\r
-    { 31.3895, -23.8095 },\r
-    { 40.9133, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char40[] = {\r
-   { 10, char40_stroke0 },\r
-};\r
-\r
-/* char: 41 ')' */\r
-\r
-static const CoordRec char41_stroke0[] = {\r
-    { 5.28, 119.048 },\r
-    { 14.8038, 109.524 },\r
-    { 24.3276, 95.2381 },\r
-    { 33.8514, 76.1905 },\r
-    { 38.6133, 52.381 },\r
-    { 38.6133, 33.3333 },\r
-    { 33.8514, 9.5238 },\r
-    { 24.3276, -9.5238 },\r
-    { 14.8038, -23.8095 },\r
-    { 5.28, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char41[] = {\r
-   { 10, char41_stroke0 },\r
-};\r
-\r
-/* char: 42 '*' */\r
-\r
-static const CoordRec char42_stroke0[] = {\r
-    { 30.7695, 71.4286 },\r
-    { 30.7695, 14.2857 },\r
-};\r
-\r
-static const CoordRec char42_stroke1[] = {\r
-    { 6.96, 57.1429 },\r
-    { 54.579, 28.5714 },\r
-};\r
-\r
-static const CoordRec char42_stroke2[] = {\r
-    { 54.579, 57.1429 },\r
-    { 6.96, 28.5714 },\r
-};\r
-\r
-static const StrokeRec char42[] = {\r
-   { 2, char42_stroke0 },\r
-   { 2, char42_stroke1 },\r
-   { 2, char42_stroke2 },\r
-};\r
-\r
-/* char: 43 '+' */\r
-\r
-static const CoordRec char43_stroke0[] = {\r
-    { 48.8371, 85.7143 },\r
-    { 48.8371, 0 },\r
-};\r
-\r
-static const CoordRec char43_stroke1[] = {\r
-    { 5.98, 42.8571 },\r
-    { 91.6943, 42.8571 },\r
-};\r
-\r
-static const StrokeRec char43[] = {\r
-   { 2, char43_stroke0 },\r
-   { 2, char43_stroke1 },\r
-};\r
-\r
-/* char: 44 ',' */\r
-\r
-static const CoordRec char44_stroke0[] = {\r
-    { 18.2838, 4.7619 },\r
-    { 13.5219, 0 },\r
-    { 8.76, 4.7619 },\r
-    { 13.5219, 9.5238 },\r
-    { 18.2838, 4.7619 },\r
-    { 18.2838, -4.7619 },\r
-    { 13.5219, -14.2857 },\r
-    { 8.76, -19.0476 },\r
-};\r
-\r
-static const StrokeRec char44[] = {\r
-   { 8, char44_stroke0 },\r
-};\r
-\r
-/* char: 45 '-' */\r
-\r
-static const CoordRec char45_stroke0[] = {\r
-    { 7.38, 42.8571 },\r
-    { 93.0943, 42.8571 },\r
-};\r
-\r
-static const StrokeRec char45[] = {\r
-   { 2, char45_stroke0 },\r
-};\r
-\r
-/* char: 46 '.' */\r
-\r
-static const CoordRec char46_stroke0[] = {\r
-    { 13.1019, 9.5238 },\r
-    { 8.34, 4.7619 },\r
-    { 13.1019, 0 },\r
-    { 17.8638, 4.7619 },\r
-    { 13.1019, 9.5238 },\r
-};\r
-\r
-static const StrokeRec char46[] = {\r
-   { 5, char46_stroke0 },\r
-};\r
-\r
-/* char: 47 '/' */\r
-\r
-static const CoordRec char47_stroke0[] = {\r
-    { 7.24, -14.2857 },\r
-    { 73.9067, 100 },\r
-};\r
-\r
-static const StrokeRec char47[] = {\r
-   { 2, char47_stroke0 },\r
-};\r
-\r
-/* char: 48 '0' */\r
-\r
-static const CoordRec char48_stroke0[] = {\r
-    { 33.5514, 100 },\r
-    { 19.2657, 95.2381 },\r
-    { 9.7419, 80.9524 },\r
-    { 4.98, 57.1429 },\r
-    { 4.98, 42.8571 },\r
-    { 9.7419, 19.0476 },\r
-    { 19.2657, 4.7619 },\r
-    { 33.5514, 0 },\r
-    { 43.0752, 0 },\r
-    { 57.361, 4.7619 },\r
-    { 66.8848, 19.0476 },\r
-    { 71.6467, 42.8571 },\r
-    { 71.6467, 57.1429 },\r
-    { 66.8848, 80.9524 },\r
-    { 57.361, 95.2381 },\r
-    { 43.0752, 100 },\r
-    { 33.5514, 100 },\r
-};\r
-\r
-static const StrokeRec char48[] = {\r
-   { 17, char48_stroke0 },\r
-};\r
-\r
-/* char: 49 '1' */\r
-\r
-static const CoordRec char49_stroke0[] = {\r
-    { 11.82, 80.9524 },\r
-    { 21.3438, 85.7143 },\r
-    { 35.6295, 100 },\r
-    { 35.6295, 0 },\r
-};\r
-\r
-static const StrokeRec char49[] = {\r
-   { 4, char49_stroke0 },\r
-};\r
-\r
-/* char: 50 '2' */\r
-\r
-static const CoordRec char50_stroke0[] = {\r
-    { 10.1819, 76.1905 },\r
-    { 10.1819, 80.9524 },\r
-    { 14.9438, 90.4762 },\r
-    { 19.7057, 95.2381 },\r
-    { 29.2295, 100 },\r
-    { 48.2771, 100 },\r
-    { 57.801, 95.2381 },\r
-    { 62.5629, 90.4762 },\r
-    { 67.3248, 80.9524 },\r
-    { 67.3248, 71.4286 },\r
-    { 62.5629, 61.9048 },\r
-    { 53.039, 47.619 },\r
-    { 5.42, 0 },\r
-    { 72.0867, 0 },\r
-};\r
-\r
-static const StrokeRec char50[] = {\r
-   { 14, char50_stroke0 },\r
-};\r
-\r
-/* char: 51 '3' */\r
-\r
-static const CoordRec char51_stroke0[] = {\r
-    { 14.5238, 100 },\r
-    { 66.9048, 100 },\r
-    { 38.3333, 61.9048 },\r
-    { 52.619, 61.9048 },\r
-    { 62.1429, 57.1429 },\r
-    { 66.9048, 52.381 },\r
-    { 71.6667, 38.0952 },\r
-    { 71.6667, 28.5714 },\r
-    { 66.9048, 14.2857 },\r
-    { 57.381, 4.7619 },\r
-    { 43.0952, 0 },\r
-    { 28.8095, 0 },\r
-    { 14.5238, 4.7619 },\r
-    { 9.7619, 9.5238 },\r
-    { 5, 19.0476 },\r
-};\r
-\r
-static const StrokeRec char51[] = {\r
-   { 15, char51_stroke0 },\r
-};\r
-\r
-/* char: 52 '4' */\r
-\r
-static const CoordRec char52_stroke0[] = {\r
-    { 51.499, 100 },\r
-    { 3.88, 33.3333 },\r
-    { 75.3086, 33.3333 },\r
-};\r
-\r
-static const CoordRec char52_stroke1[] = {\r
-    { 51.499, 100 },\r
-    { 51.499, 0 },\r
-};\r
-\r
-static const StrokeRec char52[] = {\r
-   { 3, char52_stroke0 },\r
-   { 2, char52_stroke1 },\r
-};\r
-\r
-/* char: 53 '5' */\r
-\r
-static const CoordRec char53_stroke0[] = {\r
-    { 62.0029, 100 },\r
-    { 14.3838, 100 },\r
-    { 9.6219, 57.1429 },\r
-    { 14.3838, 61.9048 },\r
-    { 28.6695, 66.6667 },\r
-    { 42.9552, 66.6667 },\r
-    { 57.241, 61.9048 },\r
-    { 66.7648, 52.381 },\r
-    { 71.5267, 38.0952 },\r
-    { 71.5267, 28.5714 },\r
-    { 66.7648, 14.2857 },\r
-    { 57.241, 4.7619 },\r
-    { 42.9552, 0 },\r
-    { 28.6695, 0 },\r
-    { 14.3838, 4.7619 },\r
-    { 9.6219, 9.5238 },\r
-    { 4.86, 19.0476 },\r
-};\r
-\r
-static const StrokeRec char53[] = {\r
-   { 17, char53_stroke0 },\r
-};\r
-\r
-/* char: 54 '6' */\r
-\r
-static const CoordRec char54_stroke0[] = {\r
-    { 62.7229, 85.7143 },\r
-    { 57.961, 95.2381 },\r
-    { 43.6752, 100 },\r
-    { 34.1514, 100 },\r
-    { 19.8657, 95.2381 },\r
-    { 10.3419, 80.9524 },\r
-    { 5.58, 57.1429 },\r
-    { 5.58, 33.3333 },\r
-    { 10.3419, 14.2857 },\r
-    { 19.8657, 4.7619 },\r
-    { 34.1514, 0 },\r
-    { 38.9133, 0 },\r
-    { 53.199, 4.7619 },\r
-    { 62.7229, 14.2857 },\r
-    { 67.4848, 28.5714 },\r
-    { 67.4848, 33.3333 },\r
-    { 62.7229, 47.619 },\r
-    { 53.199, 57.1429 },\r
-    { 38.9133, 61.9048 },\r
-    { 34.1514, 61.9048 },\r
-    { 19.8657, 57.1429 },\r
-    { 10.3419, 47.619 },\r
-    { 5.58, 33.3333 },\r
-};\r
-\r
-static const StrokeRec char54[] = {\r
-   { 23, char54_stroke0 },\r
-};\r
-\r
-/* char: 55 '7' */\r
-\r
-static const CoordRec char55_stroke0[] = {\r
-    { 72.2267, 100 },\r
-    { 24.6076, 0 },\r
-};\r
-\r
-static const CoordRec char55_stroke1[] = {\r
-    { 5.56, 100 },\r
-    { 72.2267, 100 },\r
-};\r
-\r
-static const StrokeRec char55[] = {\r
-   { 2, char55_stroke0 },\r
-   { 2, char55_stroke1 },\r
-};\r
-\r
-/* char: 56 '8' */\r
-\r
-static const CoordRec char56_stroke0[] = {\r
-    { 29.4095, 100 },\r
-    { 15.1238, 95.2381 },\r
-    { 10.3619, 85.7143 },\r
-    { 10.3619, 76.1905 },\r
-    { 15.1238, 66.6667 },\r
-    { 24.6476, 61.9048 },\r
-    { 43.6952, 57.1429 },\r
-    { 57.981, 52.381 },\r
-    { 67.5048, 42.8571 },\r
-    { 72.2667, 33.3333 },\r
-    { 72.2667, 19.0476 },\r
-    { 67.5048, 9.5238 },\r
-    { 62.7429, 4.7619 },\r
-    { 48.4571, 0 },\r
-    { 29.4095, 0 },\r
-    { 15.1238, 4.7619 },\r
-    { 10.3619, 9.5238 },\r
-    { 5.6, 19.0476 },\r
-    { 5.6, 33.3333 },\r
-    { 10.3619, 42.8571 },\r
-    { 19.8857, 52.381 },\r
-    { 34.1714, 57.1429 },\r
-    { 53.219, 61.9048 },\r
-    { 62.7429, 66.6667 },\r
-    { 67.5048, 76.1905 },\r
-    { 67.5048, 85.7143 },\r
-    { 62.7429, 95.2381 },\r
-    { 48.4571, 100 },\r
-    { 29.4095, 100 },\r
-};\r
-\r
-static const StrokeRec char56[] = {\r
-   { 29, char56_stroke0 },\r
-};\r
-\r
-/* char: 57 '9' */\r
-\r
-static const CoordRec char57_stroke0[] = {\r
-    { 68.5048, 66.6667 },\r
-    { 63.7429, 52.381 },\r
-    { 54.219, 42.8571 },\r
-    { 39.9333, 38.0952 },\r
-    { 35.1714, 38.0952 },\r
-    { 20.8857, 42.8571 },\r
-    { 11.3619, 52.381 },\r
-    { 6.6, 66.6667 },\r
-    { 6.6, 71.4286 },\r
-    { 11.3619, 85.7143 },\r
-    { 20.8857, 95.2381 },\r
-    { 35.1714, 100 },\r
-    { 39.9333, 100 },\r
-    { 54.219, 95.2381 },\r
-    { 63.7429, 85.7143 },\r
-    { 68.5048, 66.6667 },\r
-    { 68.5048, 42.8571 },\r
-    { 63.7429, 19.0476 },\r
-    { 54.219, 4.7619 },\r
-    { 39.9333, 0 },\r
-    { 30.4095, 0 },\r
-    { 16.1238, 4.7619 },\r
-    { 11.3619, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char57[] = {\r
-   { 23, char57_stroke0 },\r
-};\r
-\r
-/* char: 58 ':' */\r
-\r
-static const CoordRec char58_stroke0[] = {\r
-    { 14.0819, 66.6667 },\r
-    { 9.32, 61.9048 },\r
-    { 14.0819, 57.1429 },\r
-    { 18.8438, 61.9048 },\r
-    { 14.0819, 66.6667 },\r
-};\r
-\r
-static const CoordRec char58_stroke1[] = {\r
-    { 14.0819, 9.5238 },\r
-    { 9.32, 4.7619 },\r
-    { 14.0819, 0 },\r
-    { 18.8438, 4.7619 },\r
-    { 14.0819, 9.5238 },\r
-};\r
-\r
-static const StrokeRec char58[] = {\r
-   { 5, char58_stroke0 },\r
-   { 5, char58_stroke1 },\r
-};\r
-\r
-/* char: 59 ';' */\r
-\r
-static const CoordRec char59_stroke0[] = {\r
-    { 12.9619, 66.6667 },\r
-    { 8.2, 61.9048 },\r
-    { 12.9619, 57.1429 },\r
-    { 17.7238, 61.9048 },\r
-    { 12.9619, 66.6667 },\r
-};\r
-\r
-static const CoordRec char59_stroke1[] = {\r
-    { 17.7238, 4.7619 },\r
-    { 12.9619, 0 },\r
-    { 8.2, 4.7619 },\r
-    { 12.9619, 9.5238 },\r
-    { 17.7238, 4.7619 },\r
-    { 17.7238, -4.7619 },\r
-    { 12.9619, -14.2857 },\r
-    { 8.2, -19.0476 },\r
-};\r
-\r
-static const StrokeRec char59[] = {\r
-   { 5, char59_stroke0 },\r
-   { 8, char59_stroke1 },\r
-};\r
-\r
-/* char: 60 '<' */\r
-\r
-static const CoordRec char60_stroke0[] = {\r
-    { 79.2505, 85.7143 },\r
-    { 3.06, 42.8571 },\r
-    { 79.2505, 0 },\r
-};\r
-\r
-static const StrokeRec char60[] = {\r
-   { 3, char60_stroke0 },\r
-};\r
-\r
-/* char: 61 '=' */\r
-\r
-static const CoordRec char61_stroke0[] = {\r
-    { 5.7, 57.1429 },\r
-    { 91.4143, 57.1429 },\r
-};\r
-\r
-static const CoordRec char61_stroke1[] = {\r
-    { 5.7, 28.5714 },\r
-    { 91.4143, 28.5714 },\r
-};\r
-\r
-static const StrokeRec char61[] = {\r
-   { 2, char61_stroke0 },\r
-   { 2, char61_stroke1 },\r
-};\r
-\r
-/* char: 62 '>' */\r
-\r
-static const CoordRec char62_stroke0[] = {\r
-    { 2.78, 85.7143 },\r
-    { 78.9705, 42.8571 },\r
-    { 2.78, 0 },\r
-};\r
-\r
-static const StrokeRec char62[] = {\r
-   { 3, char62_stroke0 },\r
-};\r
-\r
-/* char: 63 '?' */\r
-\r
-static const CoordRec char63_stroke0[] = {\r
-    { 8.42, 76.1905 },\r
-    { 8.42, 80.9524 },\r
-    { 13.1819, 90.4762 },\r
-    { 17.9438, 95.2381 },\r
-    { 27.4676, 100 },\r
-    { 46.5152, 100 },\r
-    { 56.039, 95.2381 },\r
-    { 60.801, 90.4762 },\r
-    { 65.5629, 80.9524 },\r
-    { 65.5629, 71.4286 },\r
-    { 60.801, 61.9048 },\r
-    { 56.039, 57.1429 },\r
-    { 36.9914, 47.619 },\r
-    { 36.9914, 33.3333 },\r
-};\r
-\r
-static const CoordRec char63_stroke1[] = {\r
-    { 36.9914, 9.5238 },\r
-    { 32.2295, 4.7619 },\r
-    { 36.9914, 0 },\r
-    { 41.7533, 4.7619 },\r
-    { 36.9914, 9.5238 },\r
-};\r
-\r
-static const StrokeRec char63[] = {\r
-   { 14, char63_stroke0 },\r
-   { 5, char63_stroke1 },\r
-};\r
-\r
-/* char: 64 '@' */\r
-\r
-static const CoordRec char64_stroke0[] = {\r
-    { 49.2171, 52.381 },\r
-    { 39.6933, 57.1429 },\r
-    { 30.1695, 57.1429 },\r
-    { 25.4076, 47.619 },\r
-    { 25.4076, 42.8571 },\r
-    { 30.1695, 33.3333 },\r
-    { 39.6933, 33.3333 },\r
-    { 49.2171, 38.0952 },\r
-};\r
-\r
-static const CoordRec char64_stroke1[] = {\r
-    { 49.2171, 57.1429 },\r
-    { 49.2171, 38.0952 },\r
-    { 53.979, 33.3333 },\r
-    { 63.5029, 33.3333 },\r
-    { 68.2648, 42.8571 },\r
-    { 68.2648, 47.619 },\r
-    { 63.5029, 61.9048 },\r
-    { 53.979, 71.4286 },\r
-    { 39.6933, 76.1905 },\r
-    { 34.9314, 76.1905 },\r
-    { 20.6457, 71.4286 },\r
-    { 11.1219, 61.9048 },\r
-    { 6.36, 47.619 },\r
-    { 6.36, 42.8571 },\r
-    { 11.1219, 28.5714 },\r
-    { 20.6457, 19.0476 },\r
-    { 34.9314, 14.2857 },\r
-    { 39.6933, 14.2857 },\r
-    { 53.979, 19.0476 },\r
-};\r
-\r
-static const StrokeRec char64[] = {\r
-   { 8, char64_stroke0 },\r
-   { 19, char64_stroke1 },\r
-};\r
-\r
-/* char: 65 'A' */\r
-\r
-static const CoordRec char65_stroke0[] = {\r
-    { 40.5952, 100 },\r
-    { 2.5, 0 },\r
-};\r
-\r
-static const CoordRec char65_stroke1[] = {\r
-    { 40.5952, 100 },\r
-    { 78.6905, 0 },\r
-};\r
-\r
-static const CoordRec char65_stroke2[] = {\r
-    { 16.7857, 33.3333 },\r
-    { 64.4048, 33.3333 },\r
-};\r
-\r
-static const StrokeRec char65[] = {\r
-   { 2, char65_stroke0 },\r
-   { 2, char65_stroke1 },\r
-   { 2, char65_stroke2 },\r
-};\r
-\r
-/* char: 66 'B' */\r
-\r
-static const CoordRec char66_stroke0[] = {\r
-    { 11.42, 100 },\r
-    { 11.42, 0 },\r
-};\r
-\r
-static const CoordRec char66_stroke1[] = {\r
-    { 11.42, 100 },\r
-    { 54.2771, 100 },\r
-    { 68.5629, 95.2381 },\r
-    { 73.3248, 90.4762 },\r
-    { 78.0867, 80.9524 },\r
-    { 78.0867, 71.4286 },\r
-    { 73.3248, 61.9048 },\r
-    { 68.5629, 57.1429 },\r
-    { 54.2771, 52.381 },\r
-};\r
-\r
-static const CoordRec char66_stroke2[] = {\r
-    { 11.42, 52.381 },\r
-    { 54.2771, 52.381 },\r
-    { 68.5629, 47.619 },\r
-    { 73.3248, 42.8571 },\r
-    { 78.0867, 33.3333 },\r
-    { 78.0867, 19.0476 },\r
-    { 73.3248, 9.5238 },\r
-    { 68.5629, 4.7619 },\r
-    { 54.2771, 0 },\r
-    { 11.42, 0 },\r
-};\r
-\r
-static const StrokeRec char66[] = {\r
-   { 2, char66_stroke0 },\r
-   { 9, char66_stroke1 },\r
-   { 10, char66_stroke2 },\r
-};\r
-\r
-/* char: 67 'C' */\r
-\r
-static const CoordRec char67_stroke0[] = {\r
-    { 78.0886, 76.1905 },\r
-    { 73.3267, 85.7143 },\r
-    { 63.8029, 95.2381 },\r
-    { 54.279, 100 },\r
-    { 35.2314, 100 },\r
-    { 25.7076, 95.2381 },\r
-    { 16.1838, 85.7143 },\r
-    { 11.4219, 76.1905 },\r
-    { 6.66, 61.9048 },\r
-    { 6.66, 38.0952 },\r
-    { 11.4219, 23.8095 },\r
-    { 16.1838, 14.2857 },\r
-    { 25.7076, 4.7619 },\r
-    { 35.2314, 0 },\r
-    { 54.279, 0 },\r
-    { 63.8029, 4.7619 },\r
-    { 73.3267, 14.2857 },\r
-    { 78.0886, 23.8095 },\r
-};\r
-\r
-static const StrokeRec char67[] = {\r
-   { 18, char67_stroke0 },\r
-};\r
-\r
-/* char: 68 'D' */\r
-\r
-static const CoordRec char68_stroke0[] = {\r
-    { 11.96, 100 },\r
-    { 11.96, 0 },\r
-};\r
-\r
-static const CoordRec char68_stroke1[] = {\r
-    { 11.96, 100 },\r
-    { 45.2933, 100 },\r
-    { 59.579, 95.2381 },\r
-    { 69.1029, 85.7143 },\r
-    { 73.8648, 76.1905 },\r
-    { 78.6267, 61.9048 },\r
-    { 78.6267, 38.0952 },\r
-    { 73.8648, 23.8095 },\r
-    { 69.1029, 14.2857 },\r
-    { 59.579, 4.7619 },\r
-    { 45.2933, 0 },\r
-    { 11.96, 0 },\r
-};\r
-\r
-static const StrokeRec char68[] = {\r
-   { 2, char68_stroke0 },\r
-   { 12, char68_stroke1 },\r
-};\r
-\r
-/* char: 69 'E' */\r
-\r
-static const CoordRec char69_stroke0[] = {\r
-    { 11.42, 100 },\r
-    { 11.42, 0 },\r
-};\r
-\r
-static const CoordRec char69_stroke1[] = {\r
-    { 11.42, 100 },\r
-    { 73.3248, 100 },\r
-};\r
-\r
-static const CoordRec char69_stroke2[] = {\r
-    { 11.42, 52.381 },\r
-    { 49.5152, 52.381 },\r
-};\r
-\r
-static const CoordRec char69_stroke3[] = {\r
-    { 11.42, 0 },\r
-    { 73.3248, 0 },\r
-};\r
-\r
-static const StrokeRec char69[] = {\r
-   { 2, char69_stroke0 },\r
-   { 2, char69_stroke1 },\r
-   { 2, char69_stroke2 },\r
-   { 2, char69_stroke3 },\r
-};\r
-\r
-/* char: 70 'F' */\r
-\r
-static const CoordRec char70_stroke0[] = {\r
-    { 11.42, 100 },\r
-    { 11.42, 0 },\r
-};\r
-\r
-static const CoordRec char70_stroke1[] = {\r
-    { 11.42, 100 },\r
-    { 73.3248, 100 },\r
-};\r
-\r
-static const CoordRec char70_stroke2[] = {\r
-    { 11.42, 52.381 },\r
-    { 49.5152, 52.381 },\r
-};\r
-\r
-static const StrokeRec char70[] = {\r
-   { 2, char70_stroke0 },\r
-   { 2, char70_stroke1 },\r
-   { 2, char70_stroke2 },\r
-};\r
-\r
-/* char: 71 'G' */\r
-\r
-static const CoordRec char71_stroke0[] = {\r
-    { 78.4886, 76.1905 },\r
-    { 73.7267, 85.7143 },\r
-    { 64.2029, 95.2381 },\r
-    { 54.679, 100 },\r
-    { 35.6314, 100 },\r
-    { 26.1076, 95.2381 },\r
-    { 16.5838, 85.7143 },\r
-    { 11.8219, 76.1905 },\r
-    { 7.06, 61.9048 },\r
-    { 7.06, 38.0952 },\r
-    { 11.8219, 23.8095 },\r
-    { 16.5838, 14.2857 },\r
-    { 26.1076, 4.7619 },\r
-    { 35.6314, 0 },\r
-    { 54.679, 0 },\r
-    { 64.2029, 4.7619 },\r
-    { 73.7267, 14.2857 },\r
-    { 78.4886, 23.8095 },\r
-    { 78.4886, 38.0952 },\r
-};\r
-\r
-static const CoordRec char71_stroke1[] = {\r
-    { 54.679, 38.0952 },\r
-    { 78.4886, 38.0952 },\r
-};\r
-\r
-static const StrokeRec char71[] = {\r
-   { 19, char71_stroke0 },\r
-   { 2, char71_stroke1 },\r
-};\r
-\r
-/* char: 72 'H' */\r
-\r
-static const CoordRec char72_stroke0[] = {\r
-    { 11.42, 100 },\r
-    { 11.42, 0 },\r
-};\r
-\r
-static const CoordRec char72_stroke1[] = {\r
-    { 78.0867, 100 },\r
-    { 78.0867, 0 },\r
-};\r
-\r
-static const CoordRec char72_stroke2[] = {\r
-    { 11.42, 52.381 },\r
-    { 78.0867, 52.381 },\r
-};\r
-\r
-static const StrokeRec char72[] = {\r
-   { 2, char72_stroke0 },\r
-   { 2, char72_stroke1 },\r
-   { 2, char72_stroke2 },\r
-};\r
-\r
-/* char: 73 'I' */\r
-\r
-static const CoordRec char73_stroke0[] = {\r
-    { 10.86, 100 },\r
-    { 10.86, 0 },\r
-};\r
-\r
-static const StrokeRec char73[] = {\r
-   { 2, char73_stroke0 },\r
-};\r
-\r
-/* char: 74 'J' */\r
-\r
-static const CoordRec char74_stroke0[] = {\r
-    { 50.119, 100 },\r
-    { 50.119, 23.8095 },\r
-    { 45.3571, 9.5238 },\r
-    { 40.5952, 4.7619 },\r
-    { 31.0714, 0 },\r
-    { 21.5476, 0 },\r
-    { 12.0238, 4.7619 },\r
-    { 7.2619, 9.5238 },\r
-    { 2.5, 23.8095 },\r
-    { 2.5, 33.3333 },\r
-};\r
-\r
-static const StrokeRec char74[] = {\r
-   { 10, char74_stroke0 },\r
-};\r
-\r
-/* char: 75 'K' */\r
-\r
-static const CoordRec char75_stroke0[] = {\r
-    { 11.28, 100 },\r
-    { 11.28, 0 },\r
-};\r
-\r
-static const CoordRec char75_stroke1[] = {\r
-    { 77.9467, 100 },\r
-    { 11.28, 33.3333 },\r
-};\r
-\r
-static const CoordRec char75_stroke2[] = {\r
-    { 35.0895, 57.1429 },\r
-    { 77.9467, 0 },\r
-};\r
-\r
-static const StrokeRec char75[] = {\r
-   { 2, char75_stroke0 },\r
-   { 2, char75_stroke1 },\r
-   { 2, char75_stroke2 },\r
-};\r
-\r
-/* char: 76 'L' */\r
-\r
-static const CoordRec char76_stroke0[] = {\r
-    { 11.68, 100 },\r
-    { 11.68, 0 },\r
-};\r
-\r
-static const CoordRec char76_stroke1[] = {\r
-    { 11.68, 0 },\r
-    { 68.8229, 0 },\r
-};\r
-\r
-static const StrokeRec char76[] = {\r
-   { 2, char76_stroke0 },\r
-   { 2, char76_stroke1 },\r
-};\r
-\r
-/* char: 77 'M' */\r
-\r
-static const CoordRec char77_stroke0[] = {\r
-    { 10.86, 100 },\r
-    { 10.86, 0 },\r
-};\r
-\r
-static const CoordRec char77_stroke1[] = {\r
-    { 10.86, 100 },\r
-    { 48.9552, 0 },\r
-};\r
-\r
-static const CoordRec char77_stroke2[] = {\r
-    { 87.0505, 100 },\r
-    { 48.9552, 0 },\r
-};\r
-\r
-static const CoordRec char77_stroke3[] = {\r
-    { 87.0505, 100 },\r
-    { 87.0505, 0 },\r
-};\r
-\r
-static const StrokeRec char77[] = {\r
-   { 2, char77_stroke0 },\r
-   { 2, char77_stroke1 },\r
-   { 2, char77_stroke2 },\r
-   { 2, char77_stroke3 },\r
-};\r
-\r
-/* char: 78 'N' */\r
-\r
-static const CoordRec char78_stroke0[] = {\r
-    { 11.14, 100 },\r
-    { 11.14, 0 },\r
-};\r
-\r
-static const CoordRec char78_stroke1[] = {\r
-    { 11.14, 100 },\r
-    { 77.8067, 0 },\r
-};\r
-\r
-static const CoordRec char78_stroke2[] = {\r
-    { 77.8067, 100 },\r
-    { 77.8067, 0 },\r
-};\r
-\r
-static const StrokeRec char78[] = {\r
-   { 2, char78_stroke0 },\r
-   { 2, char78_stroke1 },\r
-   { 2, char78_stroke2 },\r
-};\r
-\r
-/* char: 79 'O' */\r
-\r
-static const CoordRec char79_stroke0[] = {\r
-    { 34.8114, 100 },\r
-    { 25.2876, 95.2381 },\r
-    { 15.7638, 85.7143 },\r
-    { 11.0019, 76.1905 },\r
-    { 6.24, 61.9048 },\r
-    { 6.24, 38.0952 },\r
-    { 11.0019, 23.8095 },\r
-    { 15.7638, 14.2857 },\r
-    { 25.2876, 4.7619 },\r
-    { 34.8114, 0 },\r
-    { 53.859, 0 },\r
-    { 63.3829, 4.7619 },\r
-    { 72.9067, 14.2857 },\r
-    { 77.6686, 23.8095 },\r
-    { 82.4305, 38.0952 },\r
-    { 82.4305, 61.9048 },\r
-    { 77.6686, 76.1905 },\r
-    { 72.9067, 85.7143 },\r
-    { 63.3829, 95.2381 },\r
-    { 53.859, 100 },\r
-    { 34.8114, 100 },\r
-};\r
-\r
-static const StrokeRec char79[] = {\r
-   { 21, char79_stroke0 },\r
-};\r
-\r
-/* char: 80 'P' */\r
-\r
-static const CoordRec char80_stroke0[] = {\r
-    { 12.1, 100 },\r
-    { 12.1, 0 },\r
-};\r
-\r
-static const CoordRec char80_stroke1[] = {\r
-    { 12.1, 100 },\r
-    { 54.9571, 100 },\r
-    { 69.2429, 95.2381 },\r
-    { 74.0048, 90.4762 },\r
-    { 78.7667, 80.9524 },\r
-    { 78.7667, 66.6667 },\r
-    { 74.0048, 57.1429 },\r
-    { 69.2429, 52.381 },\r
-    { 54.9571, 47.619 },\r
-    { 12.1, 47.619 },\r
-};\r
-\r
-static const StrokeRec char80[] = {\r
-   { 2, char80_stroke0 },\r
-   { 10, char80_stroke1 },\r
-};\r
-\r
-/* char: 81 'Q' */\r
-\r
-static const CoordRec char81_stroke0[] = {\r
-    { 33.8714, 100 },\r
-    { 24.3476, 95.2381 },\r
-    { 14.8238, 85.7143 },\r
-    { 10.0619, 76.1905 },\r
-    { 5.3, 61.9048 },\r
-    { 5.3, 38.0952 },\r
-    { 10.0619, 23.8095 },\r
-    { 14.8238, 14.2857 },\r
-    { 24.3476, 4.7619 },\r
-    { 33.8714, 0 },\r
-    { 52.919, 0 },\r
-    { 62.4429, 4.7619 },\r
-    { 71.9667, 14.2857 },\r
-    { 76.7286, 23.8095 },\r
-    { 81.4905, 38.0952 },\r
-    { 81.4905, 61.9048 },\r
-    { 76.7286, 76.1905 },\r
-    { 71.9667, 85.7143 },\r
-    { 62.4429, 95.2381 },\r
-    { 52.919, 100 },\r
-    { 33.8714, 100 },\r
-};\r
-\r
-static const CoordRec char81_stroke1[] = {\r
-    { 48.1571, 19.0476 },\r
-    { 76.7286, -9.5238 },\r
-};\r
-\r
-static const StrokeRec char81[] = {\r
-   { 21, char81_stroke0 },\r
-   { 2, char81_stroke1 },\r
-};\r
-\r
-/* char: 82 'R' */\r
-\r
-static const CoordRec char82_stroke0[] = {\r
-    { 11.68, 100 },\r
-    { 11.68, 0 },\r
-};\r
-\r
-static const CoordRec char82_stroke1[] = {\r
-    { 11.68, 100 },\r
-    { 54.5371, 100 },\r
-    { 68.8229, 95.2381 },\r
-    { 73.5848, 90.4762 },\r
-    { 78.3467, 80.9524 },\r
-    { 78.3467, 71.4286 },\r
-    { 73.5848, 61.9048 },\r
-    { 68.8229, 57.1429 },\r
-    { 54.5371, 52.381 },\r
-    { 11.68, 52.381 },\r
-};\r
-\r
-static const CoordRec char82_stroke2[] = {\r
-    { 45.0133, 52.381 },\r
-    { 78.3467, 0 },\r
-};\r
-\r
-static const StrokeRec char82[] = {\r
-   { 2, char82_stroke0 },\r
-   { 10, char82_stroke1 },\r
-   { 2, char82_stroke2 },\r
-};\r
-\r
-/* char: 83 'S' */\r
-\r
-static const CoordRec char83_stroke0[] = {\r
-    { 74.6667, 85.7143 },\r
-    { 65.1429, 95.2381 },\r
-    { 50.8571, 100 },\r
-    { 31.8095, 100 },\r
-    { 17.5238, 95.2381 },\r
-    { 8, 85.7143 },\r
-    { 8, 76.1905 },\r
-    { 12.7619, 66.6667 },\r
-    { 17.5238, 61.9048 },\r
-    { 27.0476, 57.1429 },\r
-    { 55.619, 47.619 },\r
-    { 65.1429, 42.8571 },\r
-    { 69.9048, 38.0952 },\r
-    { 74.6667, 28.5714 },\r
-    { 74.6667, 14.2857 },\r
-    { 65.1429, 4.7619 },\r
-    { 50.8571, 0 },\r
-    { 31.8095, 0 },\r
-    { 17.5238, 4.7619 },\r
-    { 8, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char83[] = {\r
-   { 20, char83_stroke0 },\r
-};\r
-\r
-/* char: 84 'T' */\r
-\r
-static const CoordRec char84_stroke0[] = {\r
-    { 35.6933, 100 },\r
-    { 35.6933, 0 },\r
-};\r
-\r
-static const CoordRec char84_stroke1[] = {\r
-    { 2.36, 100 },\r
-    { 69.0267, 100 },\r
-};\r
-\r
-static const StrokeRec char84[] = {\r
-   { 2, char84_stroke0 },\r
-   { 2, char84_stroke1 },\r
-};\r
-\r
-/* char: 85 'U' */\r
-\r
-static const CoordRec char85_stroke0[] = {\r
-    { 11.54, 100 },\r
-    { 11.54, 28.5714 },\r
-    { 16.3019, 14.2857 },\r
-    { 25.8257, 4.7619 },\r
-    { 40.1114, 0 },\r
-    { 49.6352, 0 },\r
-    { 63.921, 4.7619 },\r
-    { 73.4448, 14.2857 },\r
-    { 78.2067, 28.5714 },\r
-    { 78.2067, 100 },\r
-};\r
-\r
-static const StrokeRec char85[] = {\r
-   { 10, char85_stroke0 },\r
-};\r
-\r
-/* char: 86 'V' */\r
-\r
-static const CoordRec char86_stroke0[] = {\r
-    { 2.36, 100 },\r
-    { 40.4552, 0 },\r
-};\r
-\r
-static const CoordRec char86_stroke1[] = {\r
-    { 78.5505, 100 },\r
-    { 40.4552, 0 },\r
-};\r
-\r
-static const StrokeRec char86[] = {\r
-   { 2, char86_stroke0 },\r
-   { 2, char86_stroke1 },\r
-};\r
-\r
-/* char: 87 'W' */\r
-\r
-static const CoordRec char87_stroke0[] = {\r
-    { 2.22, 100 },\r
-    { 26.0295, 0 },\r
-};\r
-\r
-static const CoordRec char87_stroke1[] = {\r
-    { 49.839, 100 },\r
-    { 26.0295, 0 },\r
-};\r
-\r
-static const CoordRec char87_stroke2[] = {\r
-    { 49.839, 100 },\r
-    { 73.6486, 0 },\r
-};\r
-\r
-static const CoordRec char87_stroke3[] = {\r
-    { 97.4581, 100 },\r
-    { 73.6486, 0 },\r
-};\r
-\r
-static const StrokeRec char87[] = {\r
-   { 2, char87_stroke0 },\r
-   { 2, char87_stroke1 },\r
-   { 2, char87_stroke2 },\r
-   { 2, char87_stroke3 },\r
-};\r
-\r
-/* char: 88 'X' */\r
-\r
-static const CoordRec char88_stroke0[] = {\r
-    { 2.5, 100 },\r
-    { 69.1667, 0 },\r
-};\r
-\r
-static const CoordRec char88_stroke1[] = {\r
-    { 69.1667, 100 },\r
-    { 2.5, 0 },\r
-};\r
-\r
-static const StrokeRec char88[] = {\r
-   { 2, char88_stroke0 },\r
-   { 2, char88_stroke1 },\r
-};\r
-\r
-/* char: 89 'Y' */\r
-\r
-static const CoordRec char89_stroke0[] = {\r
-    { 1.52, 100 },\r
-    { 39.6152, 52.381 },\r
-    { 39.6152, 0 },\r
-};\r
-\r
-static const CoordRec char89_stroke1[] = {\r
-    { 77.7105, 100 },\r
-    { 39.6152, 52.381 },\r
-};\r
-\r
-static const StrokeRec char89[] = {\r
-   { 3, char89_stroke0 },\r
-   { 2, char89_stroke1 },\r
-};\r
-\r
-/* char: 90 'Z' */\r
-\r
-static const CoordRec char90_stroke0[] = {\r
-    { 69.1667, 100 },\r
-    { 2.5, 0 },\r
-};\r
-\r
-static const CoordRec char90_stroke1[] = {\r
-    { 2.5, 100 },\r
-    { 69.1667, 100 },\r
-};\r
-\r
-static const CoordRec char90_stroke2[] = {\r
-    { 2.5, 0 },\r
-    { 69.1667, 0 },\r
-};\r
-\r
-static const StrokeRec char90[] = {\r
-   { 2, char90_stroke0 },\r
-   { 2, char90_stroke1 },\r
-   { 2, char90_stroke2 },\r
-};\r
-\r
-/* char: 91 '[' */\r
-\r
-static const CoordRec char91_stroke0[] = {\r
-    { 7.78, 119.048 },\r
-    { 7.78, -33.3333 },\r
-};\r
-\r
-static const CoordRec char91_stroke1[] = {\r
-    { 12.5419, 119.048 },\r
-    { 12.5419, -33.3333 },\r
-};\r
-\r
-static const CoordRec char91_stroke2[] = {\r
-    { 7.78, 119.048 },\r
-    { 41.1133, 119.048 },\r
-};\r
-\r
-static const CoordRec char91_stroke3[] = {\r
-    { 7.78, -33.3333 },\r
-    { 41.1133, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char91[] = {\r
-   { 2, char91_stroke0 },\r
-   { 2, char91_stroke1 },\r
-   { 2, char91_stroke2 },\r
-   { 2, char91_stroke3 },\r
-};\r
-\r
-/* char: 92 '\' */\r
-\r
-static const CoordRec char92_stroke0[] = {\r
-    { 5.84, 100 },\r
-    { 72.5067, -14.2857 },\r
-};\r
-\r
-static const StrokeRec char92[] = {\r
-   { 2, char92_stroke0 },\r
-};\r
-\r
-/* char: 93 ']' */\r
-\r
-static const CoordRec char93_stroke0[] = {\r
-    { 33.0114, 119.048 },\r
-    { 33.0114, -33.3333 },\r
-};\r
-\r
-static const CoordRec char93_stroke1[] = {\r
-    { 37.7733, 119.048 },\r
-    { 37.7733, -33.3333 },\r
-};\r
-\r
-static const CoordRec char93_stroke2[] = {\r
-    { 4.44, 119.048 },\r
-    { 37.7733, 119.048 },\r
-};\r
-\r
-static const CoordRec char93_stroke3[] = {\r
-    { 4.44, -33.3333 },\r
-    { 37.7733, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char93[] = {\r
-   { 2, char93_stroke0 },\r
-   { 2, char93_stroke1 },\r
-   { 2, char93_stroke2 },\r
-   { 2, char93_stroke3 },\r
-};\r
-\r
-/* char: 94 '^' */\r
-\r
-static const CoordRec char94_stroke0[] = {\r
-    { 44.0752, 109.524 },\r
-    { 5.98, 42.8571 },\r
-};\r
-\r
-static const CoordRec char94_stroke1[] = {\r
-    { 44.0752, 109.524 },\r
-    { 82.1705, 42.8571 },\r
-};\r
-\r
-static const StrokeRec char94[] = {\r
-   { 2, char94_stroke0 },\r
-   { 2, char94_stroke1 },\r
-};\r
-\r
-/* char: 95 '_' */\r
-\r
-static const CoordRec char95_stroke0[] = {\r
-    { -1.1, -33.3333 },\r
-    { 103.662, -33.3333 },\r
-    { 103.662, -28.5714 },\r
-    { -1.1, -28.5714 },\r
-    { -1.1, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char95[] = {\r
-   { 5, char95_stroke0 },\r
-};\r
-\r
-/* char: 96 '`' */\r
-\r
-static const CoordRec char96_stroke0[] = {\r
-    { 33.0219, 100 },\r
-    { 56.8314, 71.4286 },\r
-};\r
-\r
-static const CoordRec char96_stroke1[] = {\r
-    { 33.0219, 100 },\r
-    { 28.26, 95.2381 },\r
-    { 56.8314, 71.4286 },\r
-};\r
-\r
-static const StrokeRec char96[] = {\r
-   { 2, char96_stroke0 },\r
-   { 3, char96_stroke1 },\r
-};\r
-\r
-/* char: 97 'a' */\r
-\r
-static const CoordRec char97_stroke0[] = {\r
-    { 63.8229, 66.6667 },\r
-    { 63.8229, 0 },\r
-};\r
-\r
-static const CoordRec char97_stroke1[] = {\r
-    { 63.8229, 52.381 },\r
-    { 54.299, 61.9048 },\r
-    { 44.7752, 66.6667 },\r
-    { 30.4895, 66.6667 },\r
-    { 20.9657, 61.9048 },\r
-    { 11.4419, 52.381 },\r
-    { 6.68, 38.0952 },\r
-    { 6.68, 28.5714 },\r
-    { 11.4419, 14.2857 },\r
-    { 20.9657, 4.7619 },\r
-    { 30.4895, 0 },\r
-    { 44.7752, 0 },\r
-    { 54.299, 4.7619 },\r
-    { 63.8229, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char97[] = {\r
-   { 2, char97_stroke0 },\r
-   { 14, char97_stroke1 },\r
-};\r
-\r
-/* char: 98 'b' */\r
-\r
-static const CoordRec char98_stroke0[] = {\r
-    { 8.76, 100 },\r
-    { 8.76, 0 },\r
-};\r
-\r
-static const CoordRec char98_stroke1[] = {\r
-    { 8.76, 52.381 },\r
-    { 18.2838, 61.9048 },\r
-    { 27.8076, 66.6667 },\r
-    { 42.0933, 66.6667 },\r
-    { 51.6171, 61.9048 },\r
-    { 61.141, 52.381 },\r
-    { 65.9029, 38.0952 },\r
-    { 65.9029, 28.5714 },\r
-    { 61.141, 14.2857 },\r
-    { 51.6171, 4.7619 },\r
-    { 42.0933, 0 },\r
-    { 27.8076, 0 },\r
-    { 18.2838, 4.7619 },\r
-    { 8.76, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char98[] = {\r
-   { 2, char98_stroke0 },\r
-   { 14, char98_stroke1 },\r
-};\r
-\r
-/* char: 99 'c' */\r
-\r
-static const CoordRec char99_stroke0[] = {\r
-    { 62.6629, 52.381 },\r
-    { 53.139, 61.9048 },\r
-    { 43.6152, 66.6667 },\r
-    { 29.3295, 66.6667 },\r
-    { 19.8057, 61.9048 },\r
-    { 10.2819, 52.381 },\r
-    { 5.52, 38.0952 },\r
-    { 5.52, 28.5714 },\r
-    { 10.2819, 14.2857 },\r
-    { 19.8057, 4.7619 },\r
-    { 29.3295, 0 },\r
-    { 43.6152, 0 },\r
-    { 53.139, 4.7619 },\r
-    { 62.6629, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char99[] = {\r
-   { 14, char99_stroke0 },\r
-};\r
-\r
-/* char: 100 'd' */\r
-\r
-static const CoordRec char100_stroke0[] = {\r
-    { 61.7829, 100 },\r
-    { 61.7829, 0 },\r
-};\r
-\r
-static const CoordRec char100_stroke1[] = {\r
-    { 61.7829, 52.381 },\r
-    { 52.259, 61.9048 },\r
-    { 42.7352, 66.6667 },\r
-    { 28.4495, 66.6667 },\r
-    { 18.9257, 61.9048 },\r
-    { 9.4019, 52.381 },\r
-    { 4.64, 38.0952 },\r
-    { 4.64, 28.5714 },\r
-    { 9.4019, 14.2857 },\r
-    { 18.9257, 4.7619 },\r
-    { 28.4495, 0 },\r
-    { 42.7352, 0 },\r
-    { 52.259, 4.7619 },\r
-    { 61.7829, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char100[] = {\r
-   { 2, char100_stroke0 },\r
-   { 14, char100_stroke1 },\r
-};\r
-\r
-/* char: 101 'e' */\r
-\r
-static const CoordRec char101_stroke0[] = {\r
-    { 5.72, 38.0952 },\r
-    { 62.8629, 38.0952 },\r
-    { 62.8629, 47.619 },\r
-    { 58.101, 57.1429 },\r
-    { 53.339, 61.9048 },\r
-    { 43.8152, 66.6667 },\r
-    { 29.5295, 66.6667 },\r
-    { 20.0057, 61.9048 },\r
-    { 10.4819, 52.381 },\r
-    { 5.72, 38.0952 },\r
-    { 5.72, 28.5714 },\r
-    { 10.4819, 14.2857 },\r
-    { 20.0057, 4.7619 },\r
-    { 29.5295, 0 },\r
-    { 43.8152, 0 },\r
-    { 53.339, 4.7619 },\r
-    { 62.8629, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char101[] = {\r
-   { 17, char101_stroke0 },\r
-};\r
-\r
-/* char: 102 'f' */\r
-\r
-static const CoordRec char102_stroke0[] = {\r
-    { 38.7752, 100 },\r
-    { 29.2514, 100 },\r
-    { 19.7276, 95.2381 },\r
-    { 14.9657, 80.9524 },\r
-    { 14.9657, 0 },\r
-};\r
-\r
-static const CoordRec char102_stroke1[] = {\r
-    { 0.68, 66.6667 },\r
-    { 34.0133, 66.6667 },\r
-};\r
-\r
-static const StrokeRec char102[] = {\r
-   { 5, char102_stroke0 },\r
-   { 2, char102_stroke1 },\r
-};\r
-\r
-/* char: 103 'g' */\r
-\r
-static const CoordRec char103_stroke0[] = {\r
-    { 62.5029, 66.6667 },\r
-    { 62.5029, -9.5238 },\r
-    { 57.741, -23.8095 },\r
-    { 52.979, -28.5714 },\r
-    { 43.4552, -33.3333 },\r
-    { 29.1695, -33.3333 },\r
-    { 19.6457, -28.5714 },\r
-};\r
-\r
-static const CoordRec char103_stroke1[] = {\r
-    { 62.5029, 52.381 },\r
-    { 52.979, 61.9048 },\r
-    { 43.4552, 66.6667 },\r
-    { 29.1695, 66.6667 },\r
-    { 19.6457, 61.9048 },\r
-    { 10.1219, 52.381 },\r
-    { 5.36, 38.0952 },\r
-    { 5.36, 28.5714 },\r
-    { 10.1219, 14.2857 },\r
-    { 19.6457, 4.7619 },\r
-    { 29.1695, 0 },\r
-    { 43.4552, 0 },\r
-    { 52.979, 4.7619 },\r
-    { 62.5029, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char103[] = {\r
-   { 7, char103_stroke0 },\r
-   { 14, char103_stroke1 },\r
-};\r
-\r
-/* char: 104 'h' */\r
-\r
-static const CoordRec char104_stroke0[] = {\r
-    { 9.6, 100 },\r
-    { 9.6, 0 },\r
-};\r
-\r
-static const CoordRec char104_stroke1[] = {\r
-    { 9.6, 47.619 },\r
-    { 23.8857, 61.9048 },\r
-    { 33.4095, 66.6667 },\r
-    { 47.6952, 66.6667 },\r
-    { 57.219, 61.9048 },\r
-    { 61.981, 47.619 },\r
-    { 61.981, 0 },\r
-};\r
-\r
-static const StrokeRec char104[] = {\r
-   { 2, char104_stroke0 },\r
-   { 7, char104_stroke1 },\r
-};\r
-\r
-/* char: 105 'i' */\r
-\r
-static const CoordRec char105_stroke0[] = {\r
-    { 10.02, 100 },\r
-    { 14.7819, 95.2381 },\r
-    { 19.5438, 100 },\r
-    { 14.7819, 104.762 },\r
-    { 10.02, 100 },\r
-};\r
-\r
-static const CoordRec char105_stroke1[] = {\r
-    { 14.7819, 66.6667 },\r
-    { 14.7819, 0 },\r
-};\r
-\r
-static const StrokeRec char105[] = {\r
-   { 5, char105_stroke0 },\r
-   { 2, char105_stroke1 },\r
-};\r
-\r
-/* char: 106 'j' */\r
-\r
-static const CoordRec char106_stroke0[] = {\r
-    { 17.3876, 100 },\r
-    { 22.1495, 95.2381 },\r
-    { 26.9114, 100 },\r
-    { 22.1495, 104.762 },\r
-    { 17.3876, 100 },\r
-};\r
-\r
-static const CoordRec char106_stroke1[] = {\r
-    { 22.1495, 66.6667 },\r
-    { 22.1495, -14.2857 },\r
-    { 17.3876, -28.5714 },\r
-    { 7.8638, -33.3333 },\r
-    { -1.66, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char106[] = {\r
-   { 5, char106_stroke0 },\r
-   { 5, char106_stroke1 },\r
-};\r
-\r
-/* char: 107 'k' */\r
-\r
-static const CoordRec char107_stroke0[] = {\r
-    { 9.6, 100 },\r
-    { 9.6, 0 },\r
-};\r
-\r
-static const CoordRec char107_stroke1[] = {\r
-    { 57.219, 66.6667 },\r
-    { 9.6, 19.0476 },\r
-};\r
-\r
-static const CoordRec char107_stroke2[] = {\r
-    { 28.6476, 38.0952 },\r
-    { 61.981, 0 },\r
-};\r
-\r
-static const StrokeRec char107[] = {\r
-   { 2, char107_stroke0 },\r
-   { 2, char107_stroke1 },\r
-   { 2, char107_stroke2 },\r
-};\r
-\r
-/* char: 108 'l' */\r
-\r
-static const CoordRec char108_stroke0[] = {\r
-    { 10.02, 100 },\r
-    { 10.02, 0 },\r
-};\r
-\r
-static const StrokeRec char108[] = {\r
-   { 2, char108_stroke0 },\r
-};\r
-\r
-/* char: 109 'm' */\r
-\r
-static const CoordRec char109_stroke0[] = {\r
-    { 9.6, 66.6667 },\r
-    { 9.6, 0 },\r
-};\r
-\r
-static const CoordRec char109_stroke1[] = {\r
-    { 9.6, 47.619 },\r
-    { 23.8857, 61.9048 },\r
-    { 33.4095, 66.6667 },\r
-    { 47.6952, 66.6667 },\r
-    { 57.219, 61.9048 },\r
-    { 61.981, 47.619 },\r
-    { 61.981, 0 },\r
-};\r
-\r
-static const CoordRec char109_stroke2[] = {\r
-    { 61.981, 47.619 },\r
-    { 76.2667, 61.9048 },\r
-    { 85.7905, 66.6667 },\r
-    { 100.076, 66.6667 },\r
-    { 109.6, 61.9048 },\r
-    { 114.362, 47.619 },\r
-    { 114.362, 0 },\r
-};\r
-\r
-static const StrokeRec char109[] = {\r
-   { 2, char109_stroke0 },\r
-   { 7, char109_stroke1 },\r
-   { 7, char109_stroke2 },\r
-};\r
-\r
-/* char: 110 'n' */\r
-\r
-static const CoordRec char110_stroke0[] = {\r
-    { 9.18, 66.6667 },\r
-    { 9.18, 0 },\r
-};\r
-\r
-static const CoordRec char110_stroke1[] = {\r
-    { 9.18, 47.619 },\r
-    { 23.4657, 61.9048 },\r
-    { 32.9895, 66.6667 },\r
-    { 47.2752, 66.6667 },\r
-    { 56.799, 61.9048 },\r
-    { 61.561, 47.619 },\r
-    { 61.561, 0 },\r
-};\r
-\r
-static const StrokeRec char110[] = {\r
-   { 2, char110_stroke0 },\r
-   { 7, char110_stroke1 },\r
-};\r
-\r
-/* char: 111 'o' */\r
-\r
-static const CoordRec char111_stroke0[] = {\r
-    { 28.7895, 66.6667 },\r
-    { 19.2657, 61.9048 },\r
-    { 9.7419, 52.381 },\r
-    { 4.98, 38.0952 },\r
-    { 4.98, 28.5714 },\r
-    { 9.7419, 14.2857 },\r
-    { 19.2657, 4.7619 },\r
-    { 28.7895, 0 },\r
-    { 43.0752, 0 },\r
-    { 52.599, 4.7619 },\r
-    { 62.1229, 14.2857 },\r
-    { 66.8848, 28.5714 },\r
-    { 66.8848, 38.0952 },\r
-    { 62.1229, 52.381 },\r
-    { 52.599, 61.9048 },\r
-    { 43.0752, 66.6667 },\r
-    { 28.7895, 66.6667 },\r
-};\r
-\r
-static const StrokeRec char111[] = {\r
-   { 17, char111_stroke0 },\r
-};\r
-\r
-/* char: 112 'p' */\r
-\r
-static const CoordRec char112_stroke0[] = {\r
-    { 9.46, 66.6667 },\r
-    { 9.46, -33.3333 },\r
-};\r
-\r
-static const CoordRec char112_stroke1[] = {\r
-    { 9.46, 52.381 },\r
-    { 18.9838, 61.9048 },\r
-    { 28.5076, 66.6667 },\r
-    { 42.7933, 66.6667 },\r
-    { 52.3171, 61.9048 },\r
-    { 61.841, 52.381 },\r
-    { 66.6029, 38.0952 },\r
-    { 66.6029, 28.5714 },\r
-    { 61.841, 14.2857 },\r
-    { 52.3171, 4.7619 },\r
-    { 42.7933, 0 },\r
-    { 28.5076, 0 },\r
-    { 18.9838, 4.7619 },\r
-    { 9.46, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char112[] = {\r
-   { 2, char112_stroke0 },\r
-   { 14, char112_stroke1 },\r
-};\r
-\r
-/* char: 113 'q' */\r
-\r
-static const CoordRec char113_stroke0[] = {\r
-    { 61.9829, 66.6667 },\r
-    { 61.9829, -33.3333 },\r
-};\r
-\r
-static const CoordRec char113_stroke1[] = {\r
-    { 61.9829, 52.381 },\r
-    { 52.459, 61.9048 },\r
-    { 42.9352, 66.6667 },\r
-    { 28.6495, 66.6667 },\r
-    { 19.1257, 61.9048 },\r
-    { 9.6019, 52.381 },\r
-    { 4.84, 38.0952 },\r
-    { 4.84, 28.5714 },\r
-    { 9.6019, 14.2857 },\r
-    { 19.1257, 4.7619 },\r
-    { 28.6495, 0 },\r
-    { 42.9352, 0 },\r
-    { 52.459, 4.7619 },\r
-    { 61.9829, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char113[] = {\r
-   { 2, char113_stroke0 },\r
-   { 14, char113_stroke1 },\r
-};\r
-\r
-/* char: 114 'r' */\r
-\r
-static const CoordRec char114_stroke0[] = {\r
-    { 9.46, 66.6667 },\r
-    { 9.46, 0 },\r
-};\r
-\r
-static const CoordRec char114_stroke1[] = {\r
-    { 9.46, 38.0952 },\r
-    { 14.2219, 52.381 },\r
-    { 23.7457, 61.9048 },\r
-    { 33.2695, 66.6667 },\r
-    { 47.5552, 66.6667 },\r
-};\r
-\r
-static const StrokeRec char114[] = {\r
-   { 2, char114_stroke0 },\r
-   { 5, char114_stroke1 },\r
-};\r
-\r
-/* char: 115 's' */\r
-\r
-static const CoordRec char115_stroke0[] = {\r
-    { 57.081, 52.381 },\r
-    { 52.319, 61.9048 },\r
-    { 38.0333, 66.6667 },\r
-    { 23.7476, 66.6667 },\r
-    { 9.4619, 61.9048 },\r
-    { 4.7, 52.381 },\r
-    { 9.4619, 42.8571 },\r
-    { 18.9857, 38.0952 },\r
-    { 42.7952, 33.3333 },\r
-    { 52.319, 28.5714 },\r
-    { 57.081, 19.0476 },\r
-    { 57.081, 14.2857 },\r
-    { 52.319, 4.7619 },\r
-    { 38.0333, 0 },\r
-    { 23.7476, 0 },\r
-    { 9.4619, 4.7619 },\r
-    { 4.7, 14.2857 },\r
-};\r
-\r
-static const StrokeRec char115[] = {\r
-   { 17, char115_stroke0 },\r
-};\r
-\r
-/* char: 116 't' */\r
-\r
-static const CoordRec char116_stroke0[] = {\r
-    { 14.8257, 100 },\r
-    { 14.8257, 19.0476 },\r
-    { 19.5876, 4.7619 },\r
-    { 29.1114, 0 },\r
-    { 38.6352, 0 },\r
-};\r
-\r
-static const CoordRec char116_stroke1[] = {\r
-    { 0.54, 66.6667 },\r
-    { 33.8733, 66.6667 },\r
-};\r
-\r
-static const StrokeRec char116[] = {\r
-   { 5, char116_stroke0 },\r
-   { 2, char116_stroke1 },\r
-};\r
-\r
-/* char: 117 'u' */\r
-\r
-static const CoordRec char117_stroke0[] = {\r
-    { 9.46, 66.6667 },\r
-    { 9.46, 19.0476 },\r
-    { 14.2219, 4.7619 },\r
-    { 23.7457, 0 },\r
-    { 38.0314, 0 },\r
-    { 47.5552, 4.7619 },\r
-    { 61.841, 19.0476 },\r
-};\r
-\r
-static const CoordRec char117_stroke1[] = {\r
-    { 61.841, 66.6667 },\r
-    { 61.841, 0 },\r
-};\r
-\r
-static const StrokeRec char117[] = {\r
-   { 7, char117_stroke0 },\r
-   { 2, char117_stroke1 },\r
-};\r
-\r
-/* char: 118 'v' */\r
-\r
-static const CoordRec char118_stroke0[] = {\r
-    { 1.8, 66.6667 },\r
-    { 30.3714, 0 },\r
-};\r
-\r
-static const CoordRec char118_stroke1[] = {\r
-    { 58.9429, 66.6667 },\r
-    { 30.3714, 0 },\r
-};\r
-\r
-static const StrokeRec char118[] = {\r
-   { 2, char118_stroke0 },\r
-   { 2, char118_stroke1 },\r
-};\r
-\r
-/* char: 119 'w' */\r
-\r
-static const CoordRec char119_stroke0[] = {\r
-    { 2.5, 66.6667 },\r
-    { 21.5476, 0 },\r
-};\r
-\r
-static const CoordRec char119_stroke1[] = {\r
-    { 40.5952, 66.6667 },\r
-    { 21.5476, 0 },\r
-};\r
-\r
-static const CoordRec char119_stroke2[] = {\r
-    { 40.5952, 66.6667 },\r
-    { 59.6429, 0 },\r
-};\r
-\r
-static const CoordRec char119_stroke3[] = {\r
-    { 78.6905, 66.6667 },\r
-    { 59.6429, 0 },\r
-};\r
-\r
-static const StrokeRec char119[] = {\r
-   { 2, char119_stroke0 },\r
-   { 2, char119_stroke1 },\r
-   { 2, char119_stroke2 },\r
-   { 2, char119_stroke3 },\r
-};\r
-\r
-/* char: 120 'x' */\r
-\r
-static const CoordRec char120_stroke0[] = {\r
-    { 1.66, 66.6667 },\r
-    { 54.041, 0 },\r
-};\r
-\r
-static const CoordRec char120_stroke1[] = {\r
-    { 54.041, 66.6667 },\r
-    { 1.66, 0 },\r
-};\r
-\r
-static const StrokeRec char120[] = {\r
-   { 2, char120_stroke0 },\r
-   { 2, char120_stroke1 },\r
-};\r
-\r
-/* char: 121 'y' */\r
-\r
-static const CoordRec char121_stroke0[] = {\r
-    { 6.5619, 66.6667 },\r
-    { 35.1333, 0 },\r
-};\r
-\r
-static const CoordRec char121_stroke1[] = {\r
-    { 63.7048, 66.6667 },\r
-    { 35.1333, 0 },\r
-    { 25.6095, -19.0476 },\r
-    { 16.0857, -28.5714 },\r
-    { 6.5619, -33.3333 },\r
-    { 1.8, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char121[] = {\r
-   { 2, char121_stroke0 },\r
-   { 6, char121_stroke1 },\r
-};\r
-\r
-/* char: 122 'z' */\r
-\r
-static const CoordRec char122_stroke0[] = {\r
-    { 56.821, 66.6667 },\r
-    { 4.44, 0 },\r
-};\r
-\r
-static const CoordRec char122_stroke1[] = {\r
-    { 4.44, 66.6667 },\r
-    { 56.821, 66.6667 },\r
-};\r
-\r
-static const CoordRec char122_stroke2[] = {\r
-    { 4.44, 0 },\r
-    { 56.821, 0 },\r
-};\r
-\r
-static const StrokeRec char122[] = {\r
-   { 2, char122_stroke0 },\r
-   { 2, char122_stroke1 },\r
-   { 2, char122_stroke2 },\r
-};\r
-\r
-/* char: 123 '{' */\r
-\r
-static const CoordRec char123_stroke0[] = {\r
-    { 31.1895, 119.048 },\r
-    { 21.6657, 114.286 },\r
-    { 16.9038, 109.524 },\r
-    { 12.1419, 100 },\r
-    { 12.1419, 90.4762 },\r
-    { 16.9038, 80.9524 },\r
-    { 21.6657, 76.1905 },\r
-    { 26.4276, 66.6667 },\r
-    { 26.4276, 57.1429 },\r
-    { 16.9038, 47.619 },\r
-};\r
-\r
-static const CoordRec char123_stroke1[] = {\r
-    { 21.6657, 114.286 },\r
-    { 16.9038, 104.762 },\r
-    { 16.9038, 95.2381 },\r
-    { 21.6657, 85.7143 },\r
-    { 26.4276, 80.9524 },\r
-    { 31.1895, 71.4286 },\r
-    { 31.1895, 61.9048 },\r
-    { 26.4276, 52.381 },\r
-    { 7.38, 42.8571 },\r
-    { 26.4276, 33.3333 },\r
-    { 31.1895, 23.8095 },\r
-    { 31.1895, 14.2857 },\r
-    { 26.4276, 4.7619 },\r
-    { 21.6657, 0 },\r
-    { 16.9038, -9.5238 },\r
-    { 16.9038, -19.0476 },\r
-    { 21.6657, -28.5714 },\r
-};\r
-\r
-static const CoordRec char123_stroke2[] = {\r
-    { 16.9038, 38.0952 },\r
-    { 26.4276, 28.5714 },\r
-    { 26.4276, 19.0476 },\r
-    { 21.6657, 9.5238 },\r
-    { 16.9038, 4.7619 },\r
-    { 12.1419, -4.7619 },\r
-    { 12.1419, -14.2857 },\r
-    { 16.9038, -23.8095 },\r
-    { 21.6657, -28.5714 },\r
-    { 31.1895, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char123[] = {\r
-   { 10, char123_stroke0 },\r
-   { 17, char123_stroke1 },\r
-   { 10, char123_stroke2 },\r
-};\r
-\r
-/* char: 124 '|' */\r
-\r
-static const CoordRec char124_stroke0[] = {\r
-    { 11.54, 119.048 },\r
-    { 11.54, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char124[] = {\r
-   { 2, char124_stroke0 },\r
-};\r
-\r
-/* char: 125 '}' */\r
-\r
-static const CoordRec char125_stroke0[] = {\r
-    { 9.18, 119.048 },\r
-    { 18.7038, 114.286 },\r
-    { 23.4657, 109.524 },\r
-    { 28.2276, 100 },\r
-    { 28.2276, 90.4762 },\r
-    { 23.4657, 80.9524 },\r
-    { 18.7038, 76.1905 },\r
-    { 13.9419, 66.6667 },\r
-    { 13.9419, 57.1429 },\r
-    { 23.4657, 47.619 },\r
-};\r
-\r
-static const CoordRec char125_stroke1[] = {\r
-    { 18.7038, 114.286 },\r
-    { 23.4657, 104.762 },\r
-    { 23.4657, 95.2381 },\r
-    { 18.7038, 85.7143 },\r
-    { 13.9419, 80.9524 },\r
-    { 9.18, 71.4286 },\r
-    { 9.18, 61.9048 },\r
-    { 13.9419, 52.381 },\r
-    { 32.9895, 42.8571 },\r
-    { 13.9419, 33.3333 },\r
-    { 9.18, 23.8095 },\r
-    { 9.18, 14.2857 },\r
-    { 13.9419, 4.7619 },\r
-    { 18.7038, 0 },\r
-    { 23.4657, -9.5238 },\r
-    { 23.4657, -19.0476 },\r
-    { 18.7038, -28.5714 },\r
-};\r
-\r
-static const CoordRec char125_stroke2[] = {\r
-    { 23.4657, 38.0952 },\r
-    { 13.9419, 28.5714 },\r
-    { 13.9419, 19.0476 },\r
-    { 18.7038, 9.5238 },\r
-    { 23.4657, 4.7619 },\r
-    { 28.2276, -4.7619 },\r
-    { 28.2276, -14.2857 },\r
-    { 23.4657, -23.8095 },\r
-    { 18.7038, -28.5714 },\r
-    { 9.18, -33.3333 },\r
-};\r
-\r
-static const StrokeRec char125[] = {\r
-   { 10, char125_stroke0 },\r
-   { 17, char125_stroke1 },\r
-   { 10, char125_stroke2 },\r
-};\r
-\r
-/* char: 126 '~' */\r
-\r
-static const CoordRec char126_stroke0[] = {\r
-    { 2.92, 28.5714 },\r
-    { 2.92, 38.0952 },\r
-    { 7.6819, 52.381 },\r
-    { 17.2057, 57.1429 },\r
-    { 26.7295, 57.1429 },\r
-    { 36.2533, 52.381 },\r
-    { 55.301, 38.0952 },\r
-    { 64.8248, 33.3333 },\r
-    { 74.3486, 33.3333 },\r
-    { 83.8724, 38.0952 },\r
-    { 88.6343, 47.619 },\r
-};\r
-\r
-static const CoordRec char126_stroke1[] = {\r
-    { 2.92, 38.0952 },\r
-    { 7.6819, 47.619 },\r
-    { 17.2057, 52.381 },\r
-    { 26.7295, 52.381 },\r
-    { 36.2533, 47.619 },\r
-    { 55.301, 33.3333 },\r
-    { 64.8248, 28.5714 },\r
-    { 74.3486, 28.5714 },\r
-    { 83.8724, 33.3333 },\r
-    { 88.6343, 47.619 },\r
-    { 88.6343, 57.1429 },\r
-};\r
-\r
-static const StrokeRec char126[] = {\r
-   { 11, char126_stroke0 },\r
-   { 11, char126_stroke1 },\r
-};\r
-\r
-/* char: 127 */\r
-\r
-static const CoordRec char127_stroke0[] = {\r
-    { 52.381, 100 },\r
-    { 14.2857, -33.3333 },\r
-};\r
-\r
-static const CoordRec char127_stroke1[] = {\r
-    { 28.5714, 66.6667 },\r
-    { 14.2857, 61.9048 },\r
-    { 4.7619, 52.381 },\r
-    { 0, 38.0952 },\r
-    { 0, 23.8095 },\r
-    { 4.7619, 14.2857 },\r
-    { 14.2857, 4.7619 },\r
-    { 28.5714, 0 },\r
-    { 38.0952, 0 },\r
-    { 52.381, 4.7619 },\r
-    { 61.9048, 14.2857 },\r
-    { 66.6667, 28.5714 },\r
-    { 66.6667, 42.8571 },\r
-    { 61.9048, 52.381 },\r
-    { 52.381, 61.9048 },\r
-    { 38.0952, 66.6667 },\r
-    { 28.5714, 66.6667 },\r
-};\r
-\r
-static const StrokeRec char127[] = {\r
-   { 2, char127_stroke0 },\r
-   { 17, char127_stroke1 },\r
-};\r
-\r
-static const StrokeCharRec chars[] = {\r
-    { 0, /* char0 */ 0, 0, 0 },\r
-    { 0, /* char1 */ 0, 0, 0 },\r
-    { 0, /* char2 */ 0, 0, 0 },\r
-    { 0, /* char3 */ 0, 0, 0 },\r
-    { 0, /* char4 */ 0, 0, 0 },\r
-    { 0, /* char5 */ 0, 0, 0 },\r
-    { 0, /* char6 */ 0, 0, 0 },\r
-    { 0, /* char7 */ 0, 0, 0 },\r
-    { 0, /* char8 */ 0, 0, 0 },\r
-    { 0, /* char9 */ 0, 0, 0 },\r
-    { 0, /* char10 */ 0, 0, 0 },\r
-    { 0, /* char11 */ 0, 0, 0 },\r
-    { 0, /* char12 */ 0, 0, 0 },\r
-    { 0, /* char13 */ 0, 0, 0 },\r
-    { 0, /* char14 */ 0, 0, 0 },\r
-    { 0, /* char15 */ 0, 0, 0 },\r
-    { 0, /* char16 */ 0, 0, 0 },\r
-    { 0, /* char17 */ 0, 0, 0 },\r
-    { 0, /* char18 */ 0, 0, 0 },\r
-    { 0, /* char19 */ 0, 0, 0 },\r
-    { 0, /* char20 */ 0, 0, 0 },\r
-    { 0, /* char21 */ 0, 0, 0 },\r
-    { 0, /* char22 */ 0, 0, 0 },\r
-    { 0, /* char23 */ 0, 0, 0 },\r
-    { 0, /* char24 */ 0, 0, 0 },\r
-    { 0, /* char25 */ 0, 0, 0 },\r
-    { 0, /* char26 */ 0, 0, 0 },\r
-    { 0, /* char27 */ 0, 0, 0 },\r
-    { 0, /* char28 */ 0, 0, 0 },\r
-    { 0, /* char29 */ 0, 0, 0 },\r
-    { 0, /* char30 */ 0, 0, 0 },\r
-    { 0, /* char31 */ 0, 0, 0 },\r
-    { 0, /* char32 */ 0, 52.381, 104.762 },\r
-    { 2, char33, 13.3819, 26.6238 },\r
-    { 2, char34, 23.0676, 51.4352 },\r
-    { 4, char35, 36.5333, 79.4886 },\r
-    { 3, char36, 38.1533, 76.2067 },\r
-    { 3, char37, 49.2171, 96.5743 },\r
-    { 1, char38, 53.599, 101.758 },\r
-    { 1, char39, 4.44, 13.62 },\r
-    { 1, char40, 21.8657, 47.1733 },\r
-    { 1, char41, 24.3276, 47.5333 },\r
-    { 3, char42, 30.7695, 59.439 },\r
-    { 2, char43, 48.8371, 97.2543 },\r
-    { 1, char44, 13.5219, 26.0638 },\r
-    { 1, char45, 50.2371, 100.754 },\r
-    { 1, char46, 13.1019, 26.4838 },\r
-    { 1, char47, 40.5733, 82.1067 },\r
-    { 1, char48, 38.3133, 77.0667 },\r
-    { 1, char49, 30.8676, 66.5295 },\r
-    { 1, char50, 38.7533, 77.6467 },\r
-    { 1, char51, 38.3333, 77.0467 },\r
-    { 2, char52, 37.2133, 80.1686 },\r
-    { 1, char53, 38.1933, 77.6867 },\r
-    { 1, char54, 34.1514, 73.8048 },\r
-    { 2, char55, 38.8933, 77.2267 },\r
-    { 1, char56, 38.9333, 77.6667 },\r
-    { 1, char57, 39.9333, 74.0648 },\r
-    { 2, char58, 14.0819, 26.2238 },\r
-    { 2, char59, 12.9619, 26.3038 },\r
-    { 1, char60, 41.1552, 81.6105 },\r
-    { 2, char61, 48.5571, 97.2543 },\r
-    { 1, char62, 40.8752, 81.6105 },\r
-    { 2, char63, 36.9914, 73.9029 },\r
-    { 2, char64, 34.9314, 74.3648 },\r
-    { 3, char65, 40.5952, 80.4905 },\r
-    { 3, char66, 44.7533, 83.6267 },\r
-    { 1, char67, 39.9933, 84.4886 },\r
-    { 2, char68, 45.2933, 85.2867 },\r
-    { 4, char69, 39.9914, 78.1848 },\r
-    { 3, char70, 39.9914, 78.7448 },\r
-    { 2, char71, 40.3933, 89.7686 },\r
-    { 3, char72, 44.7533, 89.0867 },\r
-    { 1, char73, 10.86, 21.3 },\r
-    { 1, char74, 31.0714, 59.999 },\r
-    { 3, char75, 44.6133, 79.3267 },\r
-    { 2, char76, 40.2514, 71.3229 },\r
-    { 4, char77, 48.9552, 97.2105 },\r
-    { 3, char78, 44.4733, 88.8067 },\r
-    { 1, char79, 44.3352, 88.8305 },\r
-    { 2, char80, 45.4333, 85.6667 },\r
-    { 2, char81, 43.3952, 88.0905 },\r
-    { 3, char82, 45.0133, 82.3667 },\r
-    { 1, char83, 41.3333, 80.8267 },\r
-    { 2, char84, 35.6933, 71.9467 },\r
-    { 1, char85, 44.8733, 89.4867 },\r
-    { 2, char86, 40.4552, 81.6105 },\r
-    { 4, char87, 49.839, 100.518 },\r
-    { 2, char88, 35.8333, 72.3667 },\r
-    { 2, char89, 39.6152, 79.6505 },\r
-    { 3, char90, 35.8333, 73.7467 },\r
-    { 4, char91, 22.0657, 46.1133 },\r
-    { 1, char92, 39.1733, 78.2067 },\r
-    { 4, char93, 23.4876, 46.3933 },\r
-    { 2, char94, 44.0752, 90.2305 },\r
-    { 1, char95, 51.281, 104.062 },\r
-    { 2, char96, 42.5457, 83.5714 },\r
-    { 2, char97, 35.2514, 66.6029 },\r
-    { 2, char98, 37.3314, 70.4629 },\r
-    { 1, char99, 34.0914, 68.9229 },\r
-    { 2, char100, 33.2114, 70.2629 },\r
-    { 1, char101, 34.2914, 68.5229 },\r
-    { 2, char102, 14.9657, 38.6552 },\r
-    { 2, char103, 33.9314, 70.9829 },\r
-    { 2, char104, 33.4095, 71.021 },\r
-    { 2, char105, 14.7819, 28.8638 },\r
-    { 2, char106, 17.3876, 36.2314 },\r
-    { 3, char107, 33.4095, 62.521 },\r
-    { 1, char108, 10.02, 19.34 },\r
-    { 3, char109, 61.981, 123.962 },\r
-    { 2, char110, 32.9895, 70.881 },\r
-    { 1, char111, 33.5514, 71.7448 },\r
-    { 2, char112, 38.0314, 70.8029 },\r
-    { 2, char113, 33.4114, 70.7429 },\r
-    { 2, char114, 23.7457, 49.4952 },\r
-    { 1, char115, 28.5095, 62.321 },\r
-    { 2, char116, 14.8257, 39.3152 },\r
-    { 2, char117, 33.2695, 71.161 },\r
-    { 2, char118, 30.3714, 60.6029 },\r
-    { 4, char119, 40.5952, 80.4905 },\r
-    { 2, char120, 25.4695, 56.401 },\r
-    { 2, char121, 35.1333, 66.0648 },\r
-    { 3, char122, 28.2495, 61.821 },\r
-    { 3, char123, 21.6657, 41.6295 },\r
-    { 1, char124, 11.54, 23.78 },\r
-    { 3, char125, 18.7038, 41.4695 },\r
-    { 2, char126, 45.7771, 91.2743 },\r
-    { 2, char127, 33.3333, 66.6667 },\r
-};\r
-\r
-StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 };\r
-\r
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#include "glutstroke.h"
+
+/* char: 33 '!' */
+
+static const CoordRec char33_stroke0[] = {
+    { 13.3819, 100 },
+    { 13.3819, 33.3333 },
+};
+
+static const CoordRec char33_stroke1[] = {
+    { 13.3819, 9.5238 },
+    { 8.62, 4.7619 },
+    { 13.3819, 0 },
+    { 18.1438, 4.7619 },
+    { 13.3819, 9.5238 },
+};
+
+static const StrokeRec char33[] = {
+   { 2, char33_stroke0 },
+   { 5, char33_stroke1 },
+};
+
+/* char: 34 '"' */
+
+static const CoordRec char34_stroke0[] = {
+    { 4.02, 100 },
+    { 4.02, 66.6667 },
+};
+
+static const CoordRec char34_stroke1[] = {
+    { 42.1152, 100 },
+    { 42.1152, 66.6667 },
+};
+
+static const StrokeRec char34[] = {
+   { 2, char34_stroke0 },
+   { 2, char34_stroke1 },
+};
+
+/* char: 35 '#' */
+
+static const CoordRec char35_stroke0[] = {
+    { 41.2952, 119.048 },
+    { 7.9619, -33.3333 },
+};
+
+static const CoordRec char35_stroke1[] = {
+    { 69.8667, 119.048 },
+    { 36.5333, -33.3333 },
+};
+
+static const CoordRec char35_stroke2[] = {
+    { 7.9619, 57.1429 },
+    { 74.6286, 57.1429 },
+};
+
+static const CoordRec char35_stroke3[] = {
+    { 3.2, 28.5714 },
+    { 69.8667, 28.5714 },
+};
+
+static const StrokeRec char35[] = {
+   { 2, char35_stroke0 },
+   { 2, char35_stroke1 },
+   { 2, char35_stroke2 },
+   { 2, char35_stroke3 },
+};
+
+/* char: 36 '$' */
+
+static const CoordRec char36_stroke0[] = {
+    { 28.6295, 119.048 },
+    { 28.6295, -19.0476 },
+};
+
+static const CoordRec char36_stroke1[] = {
+    { 47.6771, 119.048 },
+    { 47.6771, -19.0476 },
+};
+
+static const CoordRec char36_stroke2[] = {
+    { 71.4867, 85.7143 },
+    { 61.9629, 95.2381 },
+    { 47.6771, 100 },
+    { 28.6295, 100 },
+    { 14.3438, 95.2381 },
+    { 4.82, 85.7143 },
+    { 4.82, 76.1905 },
+    { 9.5819, 66.6667 },
+    { 14.3438, 61.9048 },
+    { 23.8676, 57.1429 },
+    { 52.439, 47.619 },
+    { 61.9629, 42.8571 },
+    { 66.7248, 38.0952 },
+    { 71.4867, 28.5714 },
+    { 71.4867, 14.2857 },
+    { 61.9629, 4.7619 },
+    { 47.6771, 0 },
+    { 28.6295, 0 },
+    { 14.3438, 4.7619 },
+    { 4.82, 14.2857 },
+};
+
+static const StrokeRec char36[] = {
+   { 2, char36_stroke0 },
+   { 2, char36_stroke1 },
+   { 20, char36_stroke2 },
+};
+
+/* char: 37 '%' */
+
+static const CoordRec char37_stroke0[] = {
+    { 92.0743, 100 },
+    { 6.36, 0 },
+};
+
+static const CoordRec char37_stroke1[] = {
+    { 30.1695, 100 },
+    { 39.6933, 90.4762 },
+    { 39.6933, 80.9524 },
+    { 34.9314, 71.4286 },
+    { 25.4076, 66.6667 },
+    { 15.8838, 66.6667 },
+    { 6.36, 76.1905 },
+    { 6.36, 85.7143 },
+    { 11.1219, 95.2381 },
+    { 20.6457, 100 },
+    { 30.1695, 100 },
+    { 39.6933, 95.2381 },
+    { 53.979, 90.4762 },
+    { 68.2648, 90.4762 },
+    { 82.5505, 95.2381 },
+    { 92.0743, 100 },
+};
+
+static const CoordRec char37_stroke2[] = {
+    { 73.0267, 33.3333 },
+    { 63.5029, 28.5714 },
+    { 58.741, 19.0476 },
+    { 58.741, 9.5238 },
+    { 68.2648, 0 },
+    { 77.7886, 0 },
+    { 87.3124, 4.7619 },
+    { 92.0743, 14.2857 },
+    { 92.0743, 23.8095 },
+    { 82.5505, 33.3333 },
+    { 73.0267, 33.3333 },
+};
+
+static const StrokeRec char37[] = {
+   { 2, char37_stroke0 },
+   { 16, char37_stroke1 },
+   { 11, char37_stroke2 },
+};
+
+/* char: 38 '&' */
+
+static const CoordRec char38_stroke0[] = {
+    { 101.218, 57.1429 },
+    { 101.218, 61.9048 },
+    { 96.4562, 66.6667 },
+    { 91.6943, 66.6667 },
+    { 86.9324, 61.9048 },
+    { 82.1705, 52.381 },
+    { 72.6467, 28.5714 },
+    { 63.1229, 14.2857 },
+    { 53.599, 4.7619 },
+    { 44.0752, 0 },
+    { 25.0276, 0 },
+    { 15.5038, 4.7619 },
+    { 10.7419, 9.5238 },
+    { 5.98, 19.0476 },
+    { 5.98, 28.5714 },
+    { 10.7419, 38.0952 },
+    { 15.5038, 42.8571 },
+    { 48.8371, 61.9048 },
+    { 53.599, 66.6667 },
+    { 58.361, 76.1905 },
+    { 58.361, 85.7143 },
+    { 53.599, 95.2381 },
+    { 44.0752, 100 },
+    { 34.5514, 95.2381 },
+    { 29.7895, 85.7143 },
+    { 29.7895, 76.1905 },
+    { 34.5514, 61.9048 },
+    { 44.0752, 47.619 },
+    { 67.8848, 14.2857 },
+    { 77.4086, 4.7619 },
+    { 86.9324, 0 },
+    { 96.4562, 0 },
+    { 101.218, 4.7619 },
+    { 101.218, 9.5238 },
+};
+
+static const StrokeRec char38[] = {
+   { 34, char38_stroke0 },
+};
+
+/* char: 39 ''' */
+
+static const CoordRec char39_stroke0[] = {
+    { 4.44, 100 },
+    { 4.44, 66.6667 },
+};
+
+static const StrokeRec char39[] = {
+   { 2, char39_stroke0 },
+};
+
+/* char: 40 '(' */
+
+static const CoordRec char40_stroke0[] = {
+    { 40.9133, 119.048 },
+    { 31.3895, 109.524 },
+    { 21.8657, 95.2381 },
+    { 12.3419, 76.1905 },
+    { 7.58, 52.381 },
+    { 7.58, 33.3333 },
+    { 12.3419, 9.5238 },
+    { 21.8657, -9.5238 },
+    { 31.3895, -23.8095 },
+    { 40.9133, -33.3333 },
+};
+
+static const StrokeRec char40[] = {
+   { 10, char40_stroke0 },
+};
+
+/* char: 41 ')' */
+
+static const CoordRec char41_stroke0[] = {
+    { 5.28, 119.048 },
+    { 14.8038, 109.524 },
+    { 24.3276, 95.2381 },
+    { 33.8514, 76.1905 },
+    { 38.6133, 52.381 },
+    { 38.6133, 33.3333 },
+    { 33.8514, 9.5238 },
+    { 24.3276, -9.5238 },
+    { 14.8038, -23.8095 },
+    { 5.28, -33.3333 },
+};
+
+static const StrokeRec char41[] = {
+   { 10, char41_stroke0 },
+};
+
+/* char: 42 '*' */
+
+static const CoordRec char42_stroke0[] = {
+    { 30.7695, 71.4286 },
+    { 30.7695, 14.2857 },
+};
+
+static const CoordRec char42_stroke1[] = {
+    { 6.96, 57.1429 },
+    { 54.579, 28.5714 },
+};
+
+static const CoordRec char42_stroke2[] = {
+    { 54.579, 57.1429 },
+    { 6.96, 28.5714 },
+};
+
+static const StrokeRec char42[] = {
+   { 2, char42_stroke0 },
+   { 2, char42_stroke1 },
+   { 2, char42_stroke2 },
+};
+
+/* char: 43 '+' */
+
+static const CoordRec char43_stroke0[] = {
+    { 48.8371, 85.7143 },
+    { 48.8371, 0 },
+};
+
+static const CoordRec char43_stroke1[] = {
+    { 5.98, 42.8571 },
+    { 91.6943, 42.8571 },
+};
+
+static const StrokeRec char43[] = {
+   { 2, char43_stroke0 },
+   { 2, char43_stroke1 },
+};
+
+/* char: 44 ',' */
+
+static const CoordRec char44_stroke0[] = {
+    { 18.2838, 4.7619 },
+    { 13.5219, 0 },
+    { 8.76, 4.7619 },
+    { 13.5219, 9.5238 },
+    { 18.2838, 4.7619 },
+    { 18.2838, -4.7619 },
+    { 13.5219, -14.2857 },
+    { 8.76, -19.0476 },
+};
+
+static const StrokeRec char44[] = {
+   { 8, char44_stroke0 },
+};
+
+/* char: 45 '-' */
+
+static const CoordRec char45_stroke0[] = {
+    { 7.38, 42.8571 },
+    { 93.0943, 42.8571 },
+};
+
+static const StrokeRec char45[] = {
+   { 2, char45_stroke0 },
+};
+
+/* char: 46 '.' */
+
+static const CoordRec char46_stroke0[] = {
+    { 13.1019, 9.5238 },
+    { 8.34, 4.7619 },
+    { 13.1019, 0 },
+    { 17.8638, 4.7619 },
+    { 13.1019, 9.5238 },
+};
+
+static const StrokeRec char46[] = {
+   { 5, char46_stroke0 },
+};
+
+/* char: 47 '/' */
+
+static const CoordRec char47_stroke0[] = {
+    { 7.24, -14.2857 },
+    { 73.9067, 100 },
+};
+
+static const StrokeRec char47[] = {
+   { 2, char47_stroke0 },
+};
+
+/* char: 48 '0' */
+
+static const CoordRec char48_stroke0[] = {
+    { 33.5514, 100 },
+    { 19.2657, 95.2381 },
+    { 9.7419, 80.9524 },
+    { 4.98, 57.1429 },
+    { 4.98, 42.8571 },
+    { 9.7419, 19.0476 },
+    { 19.2657, 4.7619 },
+    { 33.5514, 0 },
+    { 43.0752, 0 },
+    { 57.361, 4.7619 },
+    { 66.8848, 19.0476 },
+    { 71.6467, 42.8571 },
+    { 71.6467, 57.1429 },
+    { 66.8848, 80.9524 },
+    { 57.361, 95.2381 },
+    { 43.0752, 100 },
+    { 33.5514, 100 },
+};
+
+static const StrokeRec char48[] = {
+   { 17, char48_stroke0 },
+};
+
+/* char: 49 '1' */
+
+static const CoordRec char49_stroke0[] = {
+    { 11.82, 80.9524 },
+    { 21.3438, 85.7143 },
+    { 35.6295, 100 },
+    { 35.6295, 0 },
+};
+
+static const StrokeRec char49[] = {
+   { 4, char49_stroke0 },
+};
+
+/* char: 50 '2' */
+
+static const CoordRec char50_stroke0[] = {
+    { 10.1819, 76.1905 },
+    { 10.1819, 80.9524 },
+    { 14.9438, 90.4762 },
+    { 19.7057, 95.2381 },
+    { 29.2295, 100 },
+    { 48.2771, 100 },
+    { 57.801, 95.2381 },
+    { 62.5629, 90.4762 },
+    { 67.3248, 80.9524 },
+    { 67.3248, 71.4286 },
+    { 62.5629, 61.9048 },
+    { 53.039, 47.619 },
+    { 5.42, 0 },
+    { 72.0867, 0 },
+};
+
+static const StrokeRec char50[] = {
+   { 14, char50_stroke0 },
+};
+
+/* char: 51 '3' */
+
+static const CoordRec char51_stroke0[] = {
+    { 14.5238, 100 },
+    { 66.9048, 100 },
+    { 38.3333, 61.9048 },
+    { 52.619, 61.9048 },
+    { 62.1429, 57.1429 },
+    { 66.9048, 52.381 },
+    { 71.6667, 38.0952 },
+    { 71.6667, 28.5714 },
+    { 66.9048, 14.2857 },
+    { 57.381, 4.7619 },
+    { 43.0952, 0 },
+    { 28.8095, 0 },
+    { 14.5238, 4.7619 },
+    { 9.7619, 9.5238 },
+    { 5, 19.0476 },
+};
+
+static const StrokeRec char51[] = {
+   { 15, char51_stroke0 },
+};
+
+/* char: 52 '4' */
+
+static const CoordRec char52_stroke0[] = {
+    { 51.499, 100 },
+    { 3.88, 33.3333 },
+    { 75.3086, 33.3333 },
+};
+
+static const CoordRec char52_stroke1[] = {
+    { 51.499, 100 },
+    { 51.499, 0 },
+};
+
+static const StrokeRec char52[] = {
+   { 3, char52_stroke0 },
+   { 2, char52_stroke1 },
+};
+
+/* char: 53 '5' */
+
+static const CoordRec char53_stroke0[] = {
+    { 62.0029, 100 },
+    { 14.3838, 100 },
+    { 9.6219, 57.1429 },
+    { 14.3838, 61.9048 },
+    { 28.6695, 66.6667 },
+    { 42.9552, 66.6667 },
+    { 57.241, 61.9048 },
+    { 66.7648, 52.381 },
+    { 71.5267, 38.0952 },
+    { 71.5267, 28.5714 },
+    { 66.7648, 14.2857 },
+    { 57.241, 4.7619 },
+    { 42.9552, 0 },
+    { 28.6695, 0 },
+    { 14.3838, 4.7619 },
+    { 9.6219, 9.5238 },
+    { 4.86, 19.0476 },
+};
+
+static const StrokeRec char53[] = {
+   { 17, char53_stroke0 },
+};
+
+/* char: 54 '6' */
+
+static const CoordRec char54_stroke0[] = {
+    { 62.7229, 85.7143 },
+    { 57.961, 95.2381 },
+    { 43.6752, 100 },
+    { 34.1514, 100 },
+    { 19.8657, 95.2381 },
+    { 10.3419, 80.9524 },
+    { 5.58, 57.1429 },
+    { 5.58, 33.3333 },
+    { 10.3419, 14.2857 },
+    { 19.8657, 4.7619 },
+    { 34.1514, 0 },
+    { 38.9133, 0 },
+    { 53.199, 4.7619 },
+    { 62.7229, 14.2857 },
+    { 67.4848, 28.5714 },
+    { 67.4848, 33.3333 },
+    { 62.7229, 47.619 },
+    { 53.199, 57.1429 },
+    { 38.9133, 61.9048 },
+    { 34.1514, 61.9048 },
+    { 19.8657, 57.1429 },
+    { 10.3419, 47.619 },
+    { 5.58, 33.3333 },
+};
+
+static const StrokeRec char54[] = {
+   { 23, char54_stroke0 },
+};
+
+/* char: 55 '7' */
+
+static const CoordRec char55_stroke0[] = {
+    { 72.2267, 100 },
+    { 24.6076, 0 },
+};
+
+static const CoordRec char55_stroke1[] = {
+    { 5.56, 100 },
+    { 72.2267, 100 },
+};
+
+static const StrokeRec char55[] = {
+   { 2, char55_stroke0 },
+   { 2, char55_stroke1 },
+};
+
+/* char: 56 '8' */
+
+static const CoordRec char56_stroke0[] = {
+    { 29.4095, 100 },
+    { 15.1238, 95.2381 },
+    { 10.3619, 85.7143 },
+    { 10.3619, 76.1905 },
+    { 15.1238, 66.6667 },
+    { 24.6476, 61.9048 },
+    { 43.6952, 57.1429 },
+    { 57.981, 52.381 },
+    { 67.5048, 42.8571 },
+    { 72.2667, 33.3333 },
+    { 72.2667, 19.0476 },
+    { 67.5048, 9.5238 },
+    { 62.7429, 4.7619 },
+    { 48.4571, 0 },
+    { 29.4095, 0 },
+    { 15.1238, 4.7619 },
+    { 10.3619, 9.5238 },
+    { 5.6, 19.0476 },
+    { 5.6, 33.3333 },
+    { 10.3619, 42.8571 },
+    { 19.8857, 52.381 },
+    { 34.1714, 57.1429 },
+    { 53.219, 61.9048 },
+    { 62.7429, 66.6667 },
+    { 67.5048, 76.1905 },
+    { 67.5048, 85.7143 },
+    { 62.7429, 95.2381 },
+    { 48.4571, 100 },
+    { 29.4095, 100 },
+};
+
+static const StrokeRec char56[] = {
+   { 29, char56_stroke0 },
+};
+
+/* char: 57 '9' */
+
+static const CoordRec char57_stroke0[] = {
+    { 68.5048, 66.6667 },
+    { 63.7429, 52.381 },
+    { 54.219, 42.8571 },
+    { 39.9333, 38.0952 },
+    { 35.1714, 38.0952 },
+    { 20.8857, 42.8571 },
+    { 11.3619, 52.381 },
+    { 6.6, 66.6667 },
+    { 6.6, 71.4286 },
+    { 11.3619, 85.7143 },
+    { 20.8857, 95.2381 },
+    { 35.1714, 100 },
+    { 39.9333, 100 },
+    { 54.219, 95.2381 },
+    { 63.7429, 85.7143 },
+    { 68.5048, 66.6667 },
+    { 68.5048, 42.8571 },
+    { 63.7429, 19.0476 },
+    { 54.219, 4.7619 },
+    { 39.9333, 0 },
+    { 30.4095, 0 },
+    { 16.1238, 4.7619 },
+    { 11.3619, 14.2857 },
+};
+
+static const StrokeRec char57[] = {
+   { 23, char57_stroke0 },
+};
+
+/* char: 58 ':' */
+
+static const CoordRec char58_stroke0[] = {
+    { 14.0819, 66.6667 },
+    { 9.32, 61.9048 },
+    { 14.0819, 57.1429 },
+    { 18.8438, 61.9048 },
+    { 14.0819, 66.6667 },
+};
+
+static const CoordRec char58_stroke1[] = {
+    { 14.0819, 9.5238 },
+    { 9.32, 4.7619 },
+    { 14.0819, 0 },
+    { 18.8438, 4.7619 },
+    { 14.0819, 9.5238 },
+};
+
+static const StrokeRec char58[] = {
+   { 5, char58_stroke0 },
+   { 5, char58_stroke1 },
+};
+
+/* char: 59 ';' */
+
+static const CoordRec char59_stroke0[] = {
+    { 12.9619, 66.6667 },
+    { 8.2, 61.9048 },
+    { 12.9619, 57.1429 },
+    { 17.7238, 61.9048 },
+    { 12.9619, 66.6667 },
+};
+
+static const CoordRec char59_stroke1[] = {
+    { 17.7238, 4.7619 },
+    { 12.9619, 0 },
+    { 8.2, 4.7619 },
+    { 12.9619, 9.5238 },
+    { 17.7238, 4.7619 },
+    { 17.7238, -4.7619 },
+    { 12.9619, -14.2857 },
+    { 8.2, -19.0476 },
+};
+
+static const StrokeRec char59[] = {
+   { 5, char59_stroke0 },
+   { 8, char59_stroke1 },
+};
+
+/* char: 60 '<' */
+
+static const CoordRec char60_stroke0[] = {
+    { 79.2505, 85.7143 },
+    { 3.06, 42.8571 },
+    { 79.2505, 0 },
+};
+
+static const StrokeRec char60[] = {
+   { 3, char60_stroke0 },
+};
+
+/* char: 61 '=' */
+
+static const CoordRec char61_stroke0[] = {
+    { 5.7, 57.1429 },
+    { 91.4143, 57.1429 },
+};
+
+static const CoordRec char61_stroke1[] = {
+    { 5.7, 28.5714 },
+    { 91.4143, 28.5714 },
+};
+
+static const StrokeRec char61[] = {
+   { 2, char61_stroke0 },
+   { 2, char61_stroke1 },
+};
+
+/* char: 62 '>' */
+
+static const CoordRec char62_stroke0[] = {
+    { 2.78, 85.7143 },
+    { 78.9705, 42.8571 },
+    { 2.78, 0 },
+};
+
+static const StrokeRec char62[] = {
+   { 3, char62_stroke0 },
+};
+
+/* char: 63 '?' */
+
+static const CoordRec char63_stroke0[] = {
+    { 8.42, 76.1905 },
+    { 8.42, 80.9524 },
+    { 13.1819, 90.4762 },
+    { 17.9438, 95.2381 },
+    { 27.4676, 100 },
+    { 46.5152, 100 },
+    { 56.039, 95.2381 },
+    { 60.801, 90.4762 },
+    { 65.5629, 80.9524 },
+    { 65.5629, 71.4286 },
+    { 60.801, 61.9048 },
+    { 56.039, 57.1429 },
+    { 36.9914, 47.619 },
+    { 36.9914, 33.3333 },
+};
+
+static const CoordRec char63_stroke1[] = {
+    { 36.9914, 9.5238 },
+    { 32.2295, 4.7619 },
+    { 36.9914, 0 },
+    { 41.7533, 4.7619 },
+    { 36.9914, 9.5238 },
+};
+
+static const StrokeRec char63[] = {
+   { 14, char63_stroke0 },
+   { 5, char63_stroke1 },
+};
+
+/* char: 64 '@' */
+
+static const CoordRec char64_stroke0[] = {
+    { 49.2171, 52.381 },
+    { 39.6933, 57.1429 },
+    { 30.1695, 57.1429 },
+    { 25.4076, 47.619 },
+    { 25.4076, 42.8571 },
+    { 30.1695, 33.3333 },
+    { 39.6933, 33.3333 },
+    { 49.2171, 38.0952 },
+};
+
+static const CoordRec char64_stroke1[] = {
+    { 49.2171, 57.1429 },
+    { 49.2171, 38.0952 },
+    { 53.979, 33.3333 },
+    { 63.5029, 33.3333 },
+    { 68.2648, 42.8571 },
+    { 68.2648, 47.619 },
+    { 63.5029, 61.9048 },
+    { 53.979, 71.4286 },
+    { 39.6933, 76.1905 },
+    { 34.9314, 76.1905 },
+    { 20.6457, 71.4286 },
+    { 11.1219, 61.9048 },
+    { 6.36, 47.619 },
+    { 6.36, 42.8571 },
+    { 11.1219, 28.5714 },
+    { 20.6457, 19.0476 },
+    { 34.9314, 14.2857 },
+    { 39.6933, 14.2857 },
+    { 53.979, 19.0476 },
+};
+
+static const StrokeRec char64[] = {
+   { 8, char64_stroke0 },
+   { 19, char64_stroke1 },
+};
+
+/* char: 65 'A' */
+
+static const CoordRec char65_stroke0[] = {
+    { 40.5952, 100 },
+    { 2.5, 0 },
+};
+
+static const CoordRec char65_stroke1[] = {
+    { 40.5952, 100 },
+    { 78.6905, 0 },
+};
+
+static const CoordRec char65_stroke2[] = {
+    { 16.7857, 33.3333 },
+    { 64.4048, 33.3333 },
+};
+
+static const StrokeRec char65[] = {
+   { 2, char65_stroke0 },
+   { 2, char65_stroke1 },
+   { 2, char65_stroke2 },
+};
+
+/* char: 66 'B' */
+
+static const CoordRec char66_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char66_stroke1[] = {
+    { 11.42, 100 },
+    { 54.2771, 100 },
+    { 68.5629, 95.2381 },
+    { 73.3248, 90.4762 },
+    { 78.0867, 80.9524 },
+    { 78.0867, 71.4286 },
+    { 73.3248, 61.9048 },
+    { 68.5629, 57.1429 },
+    { 54.2771, 52.381 },
+};
+
+static const CoordRec char66_stroke2[] = {
+    { 11.42, 52.381 },
+    { 54.2771, 52.381 },
+    { 68.5629, 47.619 },
+    { 73.3248, 42.8571 },
+    { 78.0867, 33.3333 },
+    { 78.0867, 19.0476 },
+    { 73.3248, 9.5238 },
+    { 68.5629, 4.7619 },
+    { 54.2771, 0 },
+    { 11.42, 0 },
+};
+
+static const StrokeRec char66[] = {
+   { 2, char66_stroke0 },
+   { 9, char66_stroke1 },
+   { 10, char66_stroke2 },
+};
+
+/* char: 67 'C' */
+
+static const CoordRec char67_stroke0[] = {
+    { 78.0886, 76.1905 },
+    { 73.3267, 85.7143 },
+    { 63.8029, 95.2381 },
+    { 54.279, 100 },
+    { 35.2314, 100 },
+    { 25.7076, 95.2381 },
+    { 16.1838, 85.7143 },
+    { 11.4219, 76.1905 },
+    { 6.66, 61.9048 },
+    { 6.66, 38.0952 },
+    { 11.4219, 23.8095 },
+    { 16.1838, 14.2857 },
+    { 25.7076, 4.7619 },
+    { 35.2314, 0 },
+    { 54.279, 0 },
+    { 63.8029, 4.7619 },
+    { 73.3267, 14.2857 },
+    { 78.0886, 23.8095 },
+};
+
+static const StrokeRec char67[] = {
+   { 18, char67_stroke0 },
+};
+
+/* char: 68 'D' */
+
+static const CoordRec char68_stroke0[] = {
+    { 11.96, 100 },
+    { 11.96, 0 },
+};
+
+static const CoordRec char68_stroke1[] = {
+    { 11.96, 100 },
+    { 45.2933, 100 },
+    { 59.579, 95.2381 },
+    { 69.1029, 85.7143 },
+    { 73.8648, 76.1905 },
+    { 78.6267, 61.9048 },
+    { 78.6267, 38.0952 },
+    { 73.8648, 23.8095 },
+    { 69.1029, 14.2857 },
+    { 59.579, 4.7619 },
+    { 45.2933, 0 },
+    { 11.96, 0 },
+};
+
+static const StrokeRec char68[] = {
+   { 2, char68_stroke0 },
+   { 12, char68_stroke1 },
+};
+
+/* char: 69 'E' */
+
+static const CoordRec char69_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char69_stroke1[] = {
+    { 11.42, 100 },
+    { 73.3248, 100 },
+};
+
+static const CoordRec char69_stroke2[] = {
+    { 11.42, 52.381 },
+    { 49.5152, 52.381 },
+};
+
+static const CoordRec char69_stroke3[] = {
+    { 11.42, 0 },
+    { 73.3248, 0 },
+};
+
+static const StrokeRec char69[] = {
+   { 2, char69_stroke0 },
+   { 2, char69_stroke1 },
+   { 2, char69_stroke2 },
+   { 2, char69_stroke3 },
+};
+
+/* char: 70 'F' */
+
+static const CoordRec char70_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char70_stroke1[] = {
+    { 11.42, 100 },
+    { 73.3248, 100 },
+};
+
+static const CoordRec char70_stroke2[] = {
+    { 11.42, 52.381 },
+    { 49.5152, 52.381 },
+};
+
+static const StrokeRec char70[] = {
+   { 2, char70_stroke0 },
+   { 2, char70_stroke1 },
+   { 2, char70_stroke2 },
+};
+
+/* char: 71 'G' */
+
+static const CoordRec char71_stroke0[] = {
+    { 78.4886, 76.1905 },
+    { 73.7267, 85.7143 },
+    { 64.2029, 95.2381 },
+    { 54.679, 100 },
+    { 35.6314, 100 },
+    { 26.1076, 95.2381 },
+    { 16.5838, 85.7143 },
+    { 11.8219, 76.1905 },
+    { 7.06, 61.9048 },
+    { 7.06, 38.0952 },
+    { 11.8219, 23.8095 },
+    { 16.5838, 14.2857 },
+    { 26.1076, 4.7619 },
+    { 35.6314, 0 },
+    { 54.679, 0 },
+    { 64.2029, 4.7619 },
+    { 73.7267, 14.2857 },
+    { 78.4886, 23.8095 },
+    { 78.4886, 38.0952 },
+};
+
+static const CoordRec char71_stroke1[] = {
+    { 54.679, 38.0952 },
+    { 78.4886, 38.0952 },
+};
+
+static const StrokeRec char71[] = {
+   { 19, char71_stroke0 },
+   { 2, char71_stroke1 },
+};
+
+/* char: 72 'H' */
+
+static const CoordRec char72_stroke0[] = {
+    { 11.42, 100 },
+    { 11.42, 0 },
+};
+
+static const CoordRec char72_stroke1[] = {
+    { 78.0867, 100 },
+    { 78.0867, 0 },
+};
+
+static const CoordRec char72_stroke2[] = {
+    { 11.42, 52.381 },
+    { 78.0867, 52.381 },
+};
+
+static const StrokeRec char72[] = {
+   { 2, char72_stroke0 },
+   { 2, char72_stroke1 },
+   { 2, char72_stroke2 },
+};
+
+/* char: 73 'I' */
+
+static const CoordRec char73_stroke0[] = {
+    { 10.86, 100 },
+    { 10.86, 0 },
+};
+
+static const StrokeRec char73[] = {
+   { 2, char73_stroke0 },
+};
+
+/* char: 74 'J' */
+
+static const CoordRec char74_stroke0[] = {
+    { 50.119, 100 },
+    { 50.119, 23.8095 },
+    { 45.3571, 9.5238 },
+    { 40.5952, 4.7619 },
+    { 31.0714, 0 },
+    { 21.5476, 0 },
+    { 12.0238, 4.7619 },
+    { 7.2619, 9.5238 },
+    { 2.5, 23.8095 },
+    { 2.5, 33.3333 },
+};
+
+static const StrokeRec char74[] = {
+   { 10, char74_stroke0 },
+};
+
+/* char: 75 'K' */
+
+static const CoordRec char75_stroke0[] = {
+    { 11.28, 100 },
+    { 11.28, 0 },
+};
+
+static const CoordRec char75_stroke1[] = {
+    { 77.9467, 100 },
+    { 11.28, 33.3333 },
+};
+
+static const CoordRec char75_stroke2[] = {
+    { 35.0895, 57.1429 },
+    { 77.9467, 0 },
+};
+
+static const StrokeRec char75[] = {
+   { 2, char75_stroke0 },
+   { 2, char75_stroke1 },
+   { 2, char75_stroke2 },
+};
+
+/* char: 76 'L' */
+
+static const CoordRec char76_stroke0[] = {
+    { 11.68, 100 },
+    { 11.68, 0 },
+};
+
+static const CoordRec char76_stroke1[] = {
+    { 11.68, 0 },
+    { 68.8229, 0 },
+};
+
+static const StrokeRec char76[] = {
+   { 2, char76_stroke0 },
+   { 2, char76_stroke1 },
+};
+
+/* char: 77 'M' */
+
+static const CoordRec char77_stroke0[] = {
+    { 10.86, 100 },
+    { 10.86, 0 },
+};
+
+static const CoordRec char77_stroke1[] = {
+    { 10.86, 100 },
+    { 48.9552, 0 },
+};
+
+static const CoordRec char77_stroke2[] = {
+    { 87.0505, 100 },
+    { 48.9552, 0 },
+};
+
+static const CoordRec char77_stroke3[] = {
+    { 87.0505, 100 },
+    { 87.0505, 0 },
+};
+
+static const StrokeRec char77[] = {
+   { 2, char77_stroke0 },
+   { 2, char77_stroke1 },
+   { 2, char77_stroke2 },
+   { 2, char77_stroke3 },
+};
+
+/* char: 78 'N' */
+
+static const CoordRec char78_stroke0[] = {
+    { 11.14, 100 },
+    { 11.14, 0 },
+};
+
+static const CoordRec char78_stroke1[] = {
+    { 11.14, 100 },
+    { 77.8067, 0 },
+};
+
+static const CoordRec char78_stroke2[] = {
+    { 77.8067, 100 },
+    { 77.8067, 0 },
+};
+
+static const StrokeRec char78[] = {
+   { 2, char78_stroke0 },
+   { 2, char78_stroke1 },
+   { 2, char78_stroke2 },
+};
+
+/* char: 79 'O' */
+
+static const CoordRec char79_stroke0[] = {
+    { 34.8114, 100 },
+    { 25.2876, 95.2381 },
+    { 15.7638, 85.7143 },
+    { 11.0019, 76.1905 },
+    { 6.24, 61.9048 },
+    { 6.24, 38.0952 },
+    { 11.0019, 23.8095 },
+    { 15.7638, 14.2857 },
+    { 25.2876, 4.7619 },
+    { 34.8114, 0 },
+    { 53.859, 0 },
+    { 63.3829, 4.7619 },
+    { 72.9067, 14.2857 },
+    { 77.6686, 23.8095 },
+    { 82.4305, 38.0952 },
+    { 82.4305, 61.9048 },
+    { 77.6686, 76.1905 },
+    { 72.9067, 85.7143 },
+    { 63.3829, 95.2381 },
+    { 53.859, 100 },
+    { 34.8114, 100 },
+};
+
+static const StrokeRec char79[] = {
+   { 21, char79_stroke0 },
+};
+
+/* char: 80 'P' */
+
+static const CoordRec char80_stroke0[] = {
+    { 12.1, 100 },
+    { 12.1, 0 },
+};
+
+static const CoordRec char80_stroke1[] = {
+    { 12.1, 100 },
+    { 54.9571, 100 },
+    { 69.2429, 95.2381 },
+    { 74.0048, 90.4762 },
+    { 78.7667, 80.9524 },
+    { 78.7667, 66.6667 },
+    { 74.0048, 57.1429 },
+    { 69.2429, 52.381 },
+    { 54.9571, 47.619 },
+    { 12.1, 47.619 },
+};
+
+static const StrokeRec char80[] = {
+   { 2, char80_stroke0 },
+   { 10, char80_stroke1 },
+};
+
+/* char: 81 'Q' */
+
+static const CoordRec char81_stroke0[] = {
+    { 33.8714, 100 },
+    { 24.3476, 95.2381 },
+    { 14.8238, 85.7143 },
+    { 10.0619, 76.1905 },
+    { 5.3, 61.9048 },
+    { 5.3, 38.0952 },
+    { 10.0619, 23.8095 },
+    { 14.8238, 14.2857 },
+    { 24.3476, 4.7619 },
+    { 33.8714, 0 },
+    { 52.919, 0 },
+    { 62.4429, 4.7619 },
+    { 71.9667, 14.2857 },
+    { 76.7286, 23.8095 },
+    { 81.4905, 38.0952 },
+    { 81.4905, 61.9048 },
+    { 76.7286, 76.1905 },
+    { 71.9667, 85.7143 },
+    { 62.4429, 95.2381 },
+    { 52.919, 100 },
+    { 33.8714, 100 },
+};
+
+static const CoordRec char81_stroke1[] = {
+    { 48.1571, 19.0476 },
+    { 76.7286, -9.5238 },
+};
+
+static const StrokeRec char81[] = {
+   { 21, char81_stroke0 },
+   { 2, char81_stroke1 },
+};
+
+/* char: 82 'R' */
+
+static const CoordRec char82_stroke0[] = {
+    { 11.68, 100 },
+    { 11.68, 0 },
+};
+
+static const CoordRec char82_stroke1[] = {
+    { 11.68, 100 },
+    { 54.5371, 100 },
+    { 68.8229, 95.2381 },
+    { 73.5848, 90.4762 },
+    { 78.3467, 80.9524 },
+    { 78.3467, 71.4286 },
+    { 73.5848, 61.9048 },
+    { 68.8229, 57.1429 },
+    { 54.5371, 52.381 },
+    { 11.68, 52.381 },
+};
+
+static const CoordRec char82_stroke2[] = {
+    { 45.0133, 52.381 },
+    { 78.3467, 0 },
+};
+
+static const StrokeRec char82[] = {
+   { 2, char82_stroke0 },
+   { 10, char82_stroke1 },
+   { 2, char82_stroke2 },
+};
+
+/* char: 83 'S' */
+
+static const CoordRec char83_stroke0[] = {
+    { 74.6667, 85.7143 },
+    { 65.1429, 95.2381 },
+    { 50.8571, 100 },
+    { 31.8095, 100 },
+    { 17.5238, 95.2381 },
+    { 8, 85.7143 },
+    { 8, 76.1905 },
+    { 12.7619, 66.6667 },
+    { 17.5238, 61.9048 },
+    { 27.0476, 57.1429 },
+    { 55.619, 47.619 },
+    { 65.1429, 42.8571 },
+    { 69.9048, 38.0952 },
+    { 74.6667, 28.5714 },
+    { 74.6667, 14.2857 },
+    { 65.1429, 4.7619 },
+    { 50.8571, 0 },
+    { 31.8095, 0 },
+    { 17.5238, 4.7619 },
+    { 8, 14.2857 },
+};
+
+static const StrokeRec char83[] = {
+   { 20, char83_stroke0 },
+};
+
+/* char: 84 'T' */
+
+static const CoordRec char84_stroke0[] = {
+    { 35.6933, 100 },
+    { 35.6933, 0 },
+};
+
+static const CoordRec char84_stroke1[] = {
+    { 2.36, 100 },
+    { 69.0267, 100 },
+};
+
+static const StrokeRec char84[] = {
+   { 2, char84_stroke0 },
+   { 2, char84_stroke1 },
+};
+
+/* char: 85 'U' */
+
+static const CoordRec char85_stroke0[] = {
+    { 11.54, 100 },
+    { 11.54, 28.5714 },
+    { 16.3019, 14.2857 },
+    { 25.8257, 4.7619 },
+    { 40.1114, 0 },
+    { 49.6352, 0 },
+    { 63.921, 4.7619 },
+    { 73.4448, 14.2857 },
+    { 78.2067, 28.5714 },
+    { 78.2067, 100 },
+};
+
+static const StrokeRec char85[] = {
+   { 10, char85_stroke0 },
+};
+
+/* char: 86 'V' */
+
+static const CoordRec char86_stroke0[] = {
+    { 2.36, 100 },
+    { 40.4552, 0 },
+};
+
+static const CoordRec char86_stroke1[] = {
+    { 78.5505, 100 },
+    { 40.4552, 0 },
+};
+
+static const StrokeRec char86[] = {
+   { 2, char86_stroke0 },
+   { 2, char86_stroke1 },
+};
+
+/* char: 87 'W' */
+
+static const CoordRec char87_stroke0[] = {
+    { 2.22, 100 },
+    { 26.0295, 0 },
+};
+
+static const CoordRec char87_stroke1[] = {
+    { 49.839, 100 },
+    { 26.0295, 0 },
+};
+
+static const CoordRec char87_stroke2[] = {
+    { 49.839, 100 },
+    { 73.6486, 0 },
+};
+
+static const CoordRec char87_stroke3[] = {
+    { 97.4581, 100 },
+    { 73.6486, 0 },
+};
+
+static const StrokeRec char87[] = {
+   { 2, char87_stroke0 },
+   { 2, char87_stroke1 },
+   { 2, char87_stroke2 },
+   { 2, char87_stroke3 },
+};
+
+/* char: 88 'X' */
+
+static const CoordRec char88_stroke0[] = {
+    { 2.5, 100 },
+    { 69.1667, 0 },
+};
+
+static const CoordRec char88_stroke1[] = {
+    { 69.1667, 100 },
+    { 2.5, 0 },
+};
+
+static const StrokeRec char88[] = {
+   { 2, char88_stroke0 },
+   { 2, char88_stroke1 },
+};
+
+/* char: 89 'Y' */
+
+static const CoordRec char89_stroke0[] = {
+    { 1.52, 100 },
+    { 39.6152, 52.381 },
+    { 39.6152, 0 },
+};
+
+static const CoordRec char89_stroke1[] = {
+    { 77.7105, 100 },
+    { 39.6152, 52.381 },
+};
+
+static const StrokeRec char89[] = {
+   { 3, char89_stroke0 },
+   { 2, char89_stroke1 },
+};
+
+/* char: 90 'Z' */
+
+static const CoordRec char90_stroke0[] = {
+    { 69.1667, 100 },
+    { 2.5, 0 },
+};
+
+static const CoordRec char90_stroke1[] = {
+    { 2.5, 100 },
+    { 69.1667, 100 },
+};
+
+static const CoordRec char90_stroke2[] = {
+    { 2.5, 0 },
+    { 69.1667, 0 },
+};
+
+static const StrokeRec char90[] = {
+   { 2, char90_stroke0 },
+   { 2, char90_stroke1 },
+   { 2, char90_stroke2 },
+};
+
+/* char: 91 '[' */
+
+static const CoordRec char91_stroke0[] = {
+    { 7.78, 119.048 },
+    { 7.78, -33.3333 },
+};
+
+static const CoordRec char91_stroke1[] = {
+    { 12.5419, 119.048 },
+    { 12.5419, -33.3333 },
+};
+
+static const CoordRec char91_stroke2[] = {
+    { 7.78, 119.048 },
+    { 41.1133, 119.048 },
+};
+
+static const CoordRec char91_stroke3[] = {
+    { 7.78, -33.3333 },
+    { 41.1133, -33.3333 },
+};
+
+static const StrokeRec char91[] = {
+   { 2, char91_stroke0 },
+   { 2, char91_stroke1 },
+   { 2, char91_stroke2 },
+   { 2, char91_stroke3 },
+};
+
+/* char: 92 '\' */
+
+static const CoordRec char92_stroke0[] = {
+    { 5.84, 100 },
+    { 72.5067, -14.2857 },
+};
+
+static const StrokeRec char92[] = {
+   { 2, char92_stroke0 },
+};
+
+/* char: 93 ']' */
+
+static const CoordRec char93_stroke0[] = {
+    { 33.0114, 119.048 },
+    { 33.0114, -33.3333 },
+};
+
+static const CoordRec char93_stroke1[] = {
+    { 37.7733, 119.048 },
+    { 37.7733, -33.3333 },
+};
+
+static const CoordRec char93_stroke2[] = {
+    { 4.44, 119.048 },
+    { 37.7733, 119.048 },
+};
+
+static const CoordRec char93_stroke3[] = {
+    { 4.44, -33.3333 },
+    { 37.7733, -33.3333 },
+};
+
+static const StrokeRec char93[] = {
+   { 2, char93_stroke0 },
+   { 2, char93_stroke1 },
+   { 2, char93_stroke2 },
+   { 2, char93_stroke3 },
+};
+
+/* char: 94 '^' */
+
+static const CoordRec char94_stroke0[] = {
+    { 44.0752, 109.524 },
+    { 5.98, 42.8571 },
+};
+
+static const CoordRec char94_stroke1[] = {
+    { 44.0752, 109.524 },
+    { 82.1705, 42.8571 },
+};
+
+static const StrokeRec char94[] = {
+   { 2, char94_stroke0 },
+   { 2, char94_stroke1 },
+};
+
+/* char: 95 '_' */
+
+static const CoordRec char95_stroke0[] = {
+    { -1.1, -33.3333 },
+    { 103.662, -33.3333 },
+    { 103.662, -28.5714 },
+    { -1.1, -28.5714 },
+    { -1.1, -33.3333 },
+};
+
+static const StrokeRec char95[] = {
+   { 5, char95_stroke0 },
+};
+
+/* char: 96 '`' */
+
+static const CoordRec char96_stroke0[] = {
+    { 33.0219, 100 },
+    { 56.8314, 71.4286 },
+};
+
+static const CoordRec char96_stroke1[] = {
+    { 33.0219, 100 },
+    { 28.26, 95.2381 },
+    { 56.8314, 71.4286 },
+};
+
+static const StrokeRec char96[] = {
+   { 2, char96_stroke0 },
+   { 3, char96_stroke1 },
+};
+
+/* char: 97 'a' */
+
+static const CoordRec char97_stroke0[] = {
+    { 63.8229, 66.6667 },
+    { 63.8229, 0 },
+};
+
+static const CoordRec char97_stroke1[] = {
+    { 63.8229, 52.381 },
+    { 54.299, 61.9048 },
+    { 44.7752, 66.6667 },
+    { 30.4895, 66.6667 },
+    { 20.9657, 61.9048 },
+    { 11.4419, 52.381 },
+    { 6.68, 38.0952 },
+    { 6.68, 28.5714 },
+    { 11.4419, 14.2857 },
+    { 20.9657, 4.7619 },
+    { 30.4895, 0 },
+    { 44.7752, 0 },
+    { 54.299, 4.7619 },
+    { 63.8229, 14.2857 },
+};
+
+static const StrokeRec char97[] = {
+   { 2, char97_stroke0 },
+   { 14, char97_stroke1 },
+};
+
+/* char: 98 'b' */
+
+static const CoordRec char98_stroke0[] = {
+    { 8.76, 100 },
+    { 8.76, 0 },
+};
+
+static const CoordRec char98_stroke1[] = {
+    { 8.76, 52.381 },
+    { 18.2838, 61.9048 },
+    { 27.8076, 66.6667 },
+    { 42.0933, 66.6667 },
+    { 51.6171, 61.9048 },
+    { 61.141, 52.381 },
+    { 65.9029, 38.0952 },
+    { 65.9029, 28.5714 },
+    { 61.141, 14.2857 },
+    { 51.6171, 4.7619 },
+    { 42.0933, 0 },
+    { 27.8076, 0 },
+    { 18.2838, 4.7619 },
+    { 8.76, 14.2857 },
+};
+
+static const StrokeRec char98[] = {
+   { 2, char98_stroke0 },
+   { 14, char98_stroke1 },
+};
+
+/* char: 99 'c' */
+
+static const CoordRec char99_stroke0[] = {
+    { 62.6629, 52.381 },
+    { 53.139, 61.9048 },
+    { 43.6152, 66.6667 },
+    { 29.3295, 66.6667 },
+    { 19.8057, 61.9048 },
+    { 10.2819, 52.381 },
+    { 5.52, 38.0952 },
+    { 5.52, 28.5714 },
+    { 10.2819, 14.2857 },
+    { 19.8057, 4.7619 },
+    { 29.3295, 0 },
+    { 43.6152, 0 },
+    { 53.139, 4.7619 },
+    { 62.6629, 14.2857 },
+};
+
+static const StrokeRec char99[] = {
+   { 14, char99_stroke0 },
+};
+
+/* char: 100 'd' */
+
+static const CoordRec char100_stroke0[] = {
+    { 61.7829, 100 },
+    { 61.7829, 0 },
+};
+
+static const CoordRec char100_stroke1[] = {
+    { 61.7829, 52.381 },
+    { 52.259, 61.9048 },
+    { 42.7352, 66.6667 },
+    { 28.4495, 66.6667 },
+    { 18.9257, 61.9048 },
+    { 9.4019, 52.381 },
+    { 4.64, 38.0952 },
+    { 4.64, 28.5714 },
+    { 9.4019, 14.2857 },
+    { 18.9257, 4.7619 },
+    { 28.4495, 0 },
+    { 42.7352, 0 },
+    { 52.259, 4.7619 },
+    { 61.7829, 14.2857 },
+};
+
+static const StrokeRec char100[] = {
+   { 2, char100_stroke0 },
+   { 14, char100_stroke1 },
+};
+
+/* char: 101 'e' */
+
+static const CoordRec char101_stroke0[] = {
+    { 5.72, 38.0952 },
+    { 62.8629, 38.0952 },
+    { 62.8629, 47.619 },
+    { 58.101, 57.1429 },
+    { 53.339, 61.9048 },
+    { 43.8152, 66.6667 },
+    { 29.5295, 66.6667 },
+    { 20.0057, 61.9048 },
+    { 10.4819, 52.381 },
+    { 5.72, 38.0952 },
+    { 5.72, 28.5714 },
+    { 10.4819, 14.2857 },
+    { 20.0057, 4.7619 },
+    { 29.5295, 0 },
+    { 43.8152, 0 },
+    { 53.339, 4.7619 },
+    { 62.8629, 14.2857 },
+};
+
+static const StrokeRec char101[] = {
+   { 17, char101_stroke0 },
+};
+
+/* char: 102 'f' */
+
+static const CoordRec char102_stroke0[] = {
+    { 38.7752, 100 },
+    { 29.2514, 100 },
+    { 19.7276, 95.2381 },
+    { 14.9657, 80.9524 },
+    { 14.9657, 0 },
+};
+
+static const CoordRec char102_stroke1[] = {
+    { 0.68, 66.6667 },
+    { 34.0133, 66.6667 },
+};
+
+static const StrokeRec char102[] = {
+   { 5, char102_stroke0 },
+   { 2, char102_stroke1 },
+};
+
+/* char: 103 'g' */
+
+static const CoordRec char103_stroke0[] = {
+    { 62.5029, 66.6667 },
+    { 62.5029, -9.5238 },
+    { 57.741, -23.8095 },
+    { 52.979, -28.5714 },
+    { 43.4552, -33.3333 },
+    { 29.1695, -33.3333 },
+    { 19.6457, -28.5714 },
+};
+
+static const CoordRec char103_stroke1[] = {
+    { 62.5029, 52.381 },
+    { 52.979, 61.9048 },
+    { 43.4552, 66.6667 },
+    { 29.1695, 66.6667 },
+    { 19.6457, 61.9048 },
+    { 10.1219, 52.381 },
+    { 5.36, 38.0952 },
+    { 5.36, 28.5714 },
+    { 10.1219, 14.2857 },
+    { 19.6457, 4.7619 },
+    { 29.1695, 0 },
+    { 43.4552, 0 },
+    { 52.979, 4.7619 },
+    { 62.5029, 14.2857 },
+};
+
+static const StrokeRec char103[] = {
+   { 7, char103_stroke0 },
+   { 14, char103_stroke1 },
+};
+
+/* char: 104 'h' */
+
+static const CoordRec char104_stroke0[] = {
+    { 9.6, 100 },
+    { 9.6, 0 },
+};
+
+static const CoordRec char104_stroke1[] = {
+    { 9.6, 47.619 },
+    { 23.8857, 61.9048 },
+    { 33.4095, 66.6667 },
+    { 47.6952, 66.6667 },
+    { 57.219, 61.9048 },
+    { 61.981, 47.619 },
+    { 61.981, 0 },
+};
+
+static const StrokeRec char104[] = {
+   { 2, char104_stroke0 },
+   { 7, char104_stroke1 },
+};
+
+/* char: 105 'i' */
+
+static const CoordRec char105_stroke0[] = {
+    { 10.02, 100 },
+    { 14.7819, 95.2381 },
+    { 19.5438, 100 },
+    { 14.7819, 104.762 },
+    { 10.02, 100 },
+};
+
+static const CoordRec char105_stroke1[] = {
+    { 14.7819, 66.6667 },
+    { 14.7819, 0 },
+};
+
+static const StrokeRec char105[] = {
+   { 5, char105_stroke0 },
+   { 2, char105_stroke1 },
+};
+
+/* char: 106 'j' */
+
+static const CoordRec char106_stroke0[] = {
+    { 17.3876, 100 },
+    { 22.1495, 95.2381 },
+    { 26.9114, 100 },
+    { 22.1495, 104.762 },
+    { 17.3876, 100 },
+};
+
+static const CoordRec char106_stroke1[] = {
+    { 22.1495, 66.6667 },
+    { 22.1495, -14.2857 },
+    { 17.3876, -28.5714 },
+    { 7.8638, -33.3333 },
+    { -1.66, -33.3333 },
+};
+
+static const StrokeRec char106[] = {
+   { 5, char106_stroke0 },
+   { 5, char106_stroke1 },
+};
+
+/* char: 107 'k' */
+
+static const CoordRec char107_stroke0[] = {
+    { 9.6, 100 },
+    { 9.6, 0 },
+};
+
+static const CoordRec char107_stroke1[] = {
+    { 57.219, 66.6667 },
+    { 9.6, 19.0476 },
+};
+
+static const CoordRec char107_stroke2[] = {
+    { 28.6476, 38.0952 },
+    { 61.981, 0 },
+};
+
+static const StrokeRec char107[] = {
+   { 2, char107_stroke0 },
+   { 2, char107_stroke1 },
+   { 2, char107_stroke2 },
+};
+
+/* char: 108 'l' */
+
+static const CoordRec char108_stroke0[] = {
+    { 10.02, 100 },
+    { 10.02, 0 },
+};
+
+static const StrokeRec char108[] = {
+   { 2, char108_stroke0 },
+};
+
+/* char: 109 'm' */
+
+static const CoordRec char109_stroke0[] = {
+    { 9.6, 66.6667 },
+    { 9.6, 0 },
+};
+
+static const CoordRec char109_stroke1[] = {
+    { 9.6, 47.619 },
+    { 23.8857, 61.9048 },
+    { 33.4095, 66.6667 },
+    { 47.6952, 66.6667 },
+    { 57.219, 61.9048 },
+    { 61.981, 47.619 },
+    { 61.981, 0 },
+};
+
+static const CoordRec char109_stroke2[] = {
+    { 61.981, 47.619 },
+    { 76.2667, 61.9048 },
+    { 85.7905, 66.6667 },
+    { 100.076, 66.6667 },
+    { 109.6, 61.9048 },
+    { 114.362, 47.619 },
+    { 114.362, 0 },
+};
+
+static const StrokeRec char109[] = {
+   { 2, char109_stroke0 },
+   { 7, char109_stroke1 },
+   { 7, char109_stroke2 },
+};
+
+/* char: 110 'n' */
+
+static const CoordRec char110_stroke0[] = {
+    { 9.18, 66.6667 },
+    { 9.18, 0 },
+};
+
+static const CoordRec char110_stroke1[] = {
+    { 9.18, 47.619 },
+    { 23.4657, 61.9048 },
+    { 32.9895, 66.6667 },
+    { 47.2752, 66.6667 },
+    { 56.799, 61.9048 },
+    { 61.561, 47.619 },
+    { 61.561, 0 },
+};
+
+static const StrokeRec char110[] = {
+   { 2, char110_stroke0 },
+   { 7, char110_stroke1 },
+};
+
+/* char: 111 'o' */
+
+static const CoordRec char111_stroke0[] = {
+    { 28.7895, 66.6667 },
+    { 19.2657, 61.9048 },
+    { 9.7419, 52.381 },
+    { 4.98, 38.0952 },
+    { 4.98, 28.5714 },
+    { 9.7419, 14.2857 },
+    { 19.2657, 4.7619 },
+    { 28.7895, 0 },
+    { 43.0752, 0 },
+    { 52.599, 4.7619 },
+    { 62.1229, 14.2857 },
+    { 66.8848, 28.5714 },
+    { 66.8848, 38.0952 },
+    { 62.1229, 52.381 },
+    { 52.599, 61.9048 },
+    { 43.0752, 66.6667 },
+    { 28.7895, 66.6667 },
+};
+
+static const StrokeRec char111[] = {
+   { 17, char111_stroke0 },
+};
+
+/* char: 112 'p' */
+
+static const CoordRec char112_stroke0[] = {
+    { 9.46, 66.6667 },
+    { 9.46, -33.3333 },
+};
+
+static const CoordRec char112_stroke1[] = {
+    { 9.46, 52.381 },
+    { 18.9838, 61.9048 },
+    { 28.5076, 66.6667 },
+    { 42.7933, 66.6667 },
+    { 52.3171, 61.9048 },
+    { 61.841, 52.381 },
+    { 66.6029, 38.0952 },
+    { 66.6029, 28.5714 },
+    { 61.841, 14.2857 },
+    { 52.3171, 4.7619 },
+    { 42.7933, 0 },
+    { 28.5076, 0 },
+    { 18.9838, 4.7619 },
+    { 9.46, 14.2857 },
+};
+
+static const StrokeRec char112[] = {
+   { 2, char112_stroke0 },
+   { 14, char112_stroke1 },
+};
+
+/* char: 113 'q' */
+
+static const CoordRec char113_stroke0[] = {
+    { 61.9829, 66.6667 },
+    { 61.9829, -33.3333 },
+};
+
+static const CoordRec char113_stroke1[] = {
+    { 61.9829, 52.381 },
+    { 52.459, 61.9048 },
+    { 42.9352, 66.6667 },
+    { 28.6495, 66.6667 },
+    { 19.1257, 61.9048 },
+    { 9.6019, 52.381 },
+    { 4.84, 38.0952 },
+    { 4.84, 28.5714 },
+    { 9.6019, 14.2857 },
+    { 19.1257, 4.7619 },
+    { 28.6495, 0 },
+    { 42.9352, 0 },
+    { 52.459, 4.7619 },
+    { 61.9829, 14.2857 },
+};
+
+static const StrokeRec char113[] = {
+   { 2, char113_stroke0 },
+   { 14, char113_stroke1 },
+};
+
+/* char: 114 'r' */
+
+static const CoordRec char114_stroke0[] = {
+    { 9.46, 66.6667 },
+    { 9.46, 0 },
+};
+
+static const CoordRec char114_stroke1[] = {
+    { 9.46, 38.0952 },
+    { 14.2219, 52.381 },
+    { 23.7457, 61.9048 },
+    { 33.2695, 66.6667 },
+    { 47.5552, 66.6667 },
+};
+
+static const StrokeRec char114[] = {
+   { 2, char114_stroke0 },
+   { 5, char114_stroke1 },
+};
+
+/* char: 115 's' */
+
+static const CoordRec char115_stroke0[] = {
+    { 57.081, 52.381 },
+    { 52.319, 61.9048 },
+    { 38.0333, 66.6667 },
+    { 23.7476, 66.6667 },
+    { 9.4619, 61.9048 },
+    { 4.7, 52.381 },
+    { 9.4619, 42.8571 },
+    { 18.9857, 38.0952 },
+    { 42.7952, 33.3333 },
+    { 52.319, 28.5714 },
+    { 57.081, 19.0476 },
+    { 57.081, 14.2857 },
+    { 52.319, 4.7619 },
+    { 38.0333, 0 },
+    { 23.7476, 0 },
+    { 9.4619, 4.7619 },
+    { 4.7, 14.2857 },
+};
+
+static const StrokeRec char115[] = {
+   { 17, char115_stroke0 },
+};
+
+/* char: 116 't' */
+
+static const CoordRec char116_stroke0[] = {
+    { 14.8257, 100 },
+    { 14.8257, 19.0476 },
+    { 19.5876, 4.7619 },
+    { 29.1114, 0 },
+    { 38.6352, 0 },
+};
+
+static const CoordRec char116_stroke1[] = {
+    { 0.54, 66.6667 },
+    { 33.8733, 66.6667 },
+};
+
+static const StrokeRec char116[] = {
+   { 5, char116_stroke0 },
+   { 2, char116_stroke1 },
+};
+
+/* char: 117 'u' */
+
+static const CoordRec char117_stroke0[] = {
+    { 9.46, 66.6667 },
+    { 9.46, 19.0476 },
+    { 14.2219, 4.7619 },
+    { 23.7457, 0 },
+    { 38.0314, 0 },
+    { 47.5552, 4.7619 },
+    { 61.841, 19.0476 },
+};
+
+static const CoordRec char117_stroke1[] = {
+    { 61.841, 66.6667 },
+    { 61.841, 0 },
+};
+
+static const StrokeRec char117[] = {
+   { 7, char117_stroke0 },
+   { 2, char117_stroke1 },
+};
+
+/* char: 118 'v' */
+
+static const CoordRec char118_stroke0[] = {
+    { 1.8, 66.6667 },
+    { 30.3714, 0 },
+};
+
+static const CoordRec char118_stroke1[] = {
+    { 58.9429, 66.6667 },
+    { 30.3714, 0 },
+};
+
+static const StrokeRec char118[] = {
+   { 2, char118_stroke0 },
+   { 2, char118_stroke1 },
+};
+
+/* char: 119 'w' */
+
+static const CoordRec char119_stroke0[] = {
+    { 2.5, 66.6667 },
+    { 21.5476, 0 },
+};
+
+static const CoordRec char119_stroke1[] = {
+    { 40.5952, 66.6667 },
+    { 21.5476, 0 },
+};
+
+static const CoordRec char119_stroke2[] = {
+    { 40.5952, 66.6667 },
+    { 59.6429, 0 },
+};
+
+static const CoordRec char119_stroke3[] = {
+    { 78.6905, 66.6667 },
+    { 59.6429, 0 },
+};
+
+static const StrokeRec char119[] = {
+   { 2, char119_stroke0 },
+   { 2, char119_stroke1 },
+   { 2, char119_stroke2 },
+   { 2, char119_stroke3 },
+};
+
+/* char: 120 'x' */
+
+static const CoordRec char120_stroke0[] = {
+    { 1.66, 66.6667 },
+    { 54.041, 0 },
+};
+
+static const CoordRec char120_stroke1[] = {
+    { 54.041, 66.6667 },
+    { 1.66, 0 },
+};
+
+static const StrokeRec char120[] = {
+   { 2, char120_stroke0 },
+   { 2, char120_stroke1 },
+};
+
+/* char: 121 'y' */
+
+static const CoordRec char121_stroke0[] = {
+    { 6.5619, 66.6667 },
+    { 35.1333, 0 },
+};
+
+static const CoordRec char121_stroke1[] = {
+    { 63.7048, 66.6667 },
+    { 35.1333, 0 },
+    { 25.6095, -19.0476 },
+    { 16.0857, -28.5714 },
+    { 6.5619, -33.3333 },
+    { 1.8, -33.3333 },
+};
+
+static const StrokeRec char121[] = {
+   { 2, char121_stroke0 },
+   { 6, char121_stroke1 },
+};
+
+/* char: 122 'z' */
+
+static const CoordRec char122_stroke0[] = {
+    { 56.821, 66.6667 },
+    { 4.44, 0 },
+};
+
+static const CoordRec char122_stroke1[] = {
+    { 4.44, 66.6667 },
+    { 56.821, 66.6667 },
+};
+
+static const CoordRec char122_stroke2[] = {
+    { 4.44, 0 },
+    { 56.821, 0 },
+};
+
+static const StrokeRec char122[] = {
+   { 2, char122_stroke0 },
+   { 2, char122_stroke1 },
+   { 2, char122_stroke2 },
+};
+
+/* char: 123 '{' */
+
+static const CoordRec char123_stroke0[] = {
+    { 31.1895, 119.048 },
+    { 21.6657, 114.286 },
+    { 16.9038, 109.524 },
+    { 12.1419, 100 },
+    { 12.1419, 90.4762 },
+    { 16.9038, 80.9524 },
+    { 21.6657, 76.1905 },
+    { 26.4276, 66.6667 },
+    { 26.4276, 57.1429 },
+    { 16.9038, 47.619 },
+};
+
+static const CoordRec char123_stroke1[] = {
+    { 21.6657, 114.286 },
+    { 16.9038, 104.762 },
+    { 16.9038, 95.2381 },
+    { 21.6657, 85.7143 },
+    { 26.4276, 80.9524 },
+    { 31.1895, 71.4286 },
+    { 31.1895, 61.9048 },
+    { 26.4276, 52.381 },
+    { 7.38, 42.8571 },
+    { 26.4276, 33.3333 },
+    { 31.1895, 23.8095 },
+    { 31.1895, 14.2857 },
+    { 26.4276, 4.7619 },
+    { 21.6657, 0 },
+    { 16.9038, -9.5238 },
+    { 16.9038, -19.0476 },
+    { 21.6657, -28.5714 },
+};
+
+static const CoordRec char123_stroke2[] = {
+    { 16.9038, 38.0952 },
+    { 26.4276, 28.5714 },
+    { 26.4276, 19.0476 },
+    { 21.6657, 9.5238 },
+    { 16.9038, 4.7619 },
+    { 12.1419, -4.7619 },
+    { 12.1419, -14.2857 },
+    { 16.9038, -23.8095 },
+    { 21.6657, -28.5714 },
+    { 31.1895, -33.3333 },
+};
+
+static const StrokeRec char123[] = {
+   { 10, char123_stroke0 },
+   { 17, char123_stroke1 },
+   { 10, char123_stroke2 },
+};
+
+/* char: 124 '|' */
+
+static const CoordRec char124_stroke0[] = {
+    { 11.54, 119.048 },
+    { 11.54, -33.3333 },
+};
+
+static const StrokeRec char124[] = {
+   { 2, char124_stroke0 },
+};
+
+/* char: 125 '}' */
+
+static const CoordRec char125_stroke0[] = {
+    { 9.18, 119.048 },
+    { 18.7038, 114.286 },
+    { 23.4657, 109.524 },
+    { 28.2276, 100 },
+    { 28.2276, 90.4762 },
+    { 23.4657, 80.9524 },
+    { 18.7038, 76.1905 },
+    { 13.9419, 66.6667 },
+    { 13.9419, 57.1429 },
+    { 23.4657, 47.619 },
+};
+
+static const CoordRec char125_stroke1[] = {
+    { 18.7038, 114.286 },
+    { 23.4657, 104.762 },
+    { 23.4657, 95.2381 },
+    { 18.7038, 85.7143 },
+    { 13.9419, 80.9524 },
+    { 9.18, 71.4286 },
+    { 9.18, 61.9048 },
+    { 13.9419, 52.381 },
+    { 32.9895, 42.8571 },
+    { 13.9419, 33.3333 },
+    { 9.18, 23.8095 },
+    { 9.18, 14.2857 },
+    { 13.9419, 4.7619 },
+    { 18.7038, 0 },
+    { 23.4657, -9.5238 },
+    { 23.4657, -19.0476 },
+    { 18.7038, -28.5714 },
+};
+
+static const CoordRec char125_stroke2[] = {
+    { 23.4657, 38.0952 },
+    { 13.9419, 28.5714 },
+    { 13.9419, 19.0476 },
+    { 18.7038, 9.5238 },
+    { 23.4657, 4.7619 },
+    { 28.2276, -4.7619 },
+    { 28.2276, -14.2857 },
+    { 23.4657, -23.8095 },
+    { 18.7038, -28.5714 },
+    { 9.18, -33.3333 },
+};
+
+static const StrokeRec char125[] = {
+   { 10, char125_stroke0 },
+   { 17, char125_stroke1 },
+   { 10, char125_stroke2 },
+};
+
+/* char: 126 '~' */
+
+static const CoordRec char126_stroke0[] = {
+    { 2.92, 28.5714 },
+    { 2.92, 38.0952 },
+    { 7.6819, 52.381 },
+    { 17.2057, 57.1429 },
+    { 26.7295, 57.1429 },
+    { 36.2533, 52.381 },
+    { 55.301, 38.0952 },
+    { 64.8248, 33.3333 },
+    { 74.3486, 33.3333 },
+    { 83.8724, 38.0952 },
+    { 88.6343, 47.619 },
+};
+
+static const CoordRec char126_stroke1[] = {
+    { 2.92, 38.0952 },
+    { 7.6819, 47.619 },
+    { 17.2057, 52.381 },
+    { 26.7295, 52.381 },
+    { 36.2533, 47.619 },
+    { 55.301, 33.3333 },
+    { 64.8248, 28.5714 },
+    { 74.3486, 28.5714 },
+    { 83.8724, 33.3333 },
+    { 88.6343, 47.619 },
+    { 88.6343, 57.1429 },
+};
+
+static const StrokeRec char126[] = {
+   { 11, char126_stroke0 },
+   { 11, char126_stroke1 },
+};
+
+/* char: 127 */
+
+static const CoordRec char127_stroke0[] = {
+    { 52.381, 100 },
+    { 14.2857, -33.3333 },
+};
+
+static const CoordRec char127_stroke1[] = {
+    { 28.5714, 66.6667 },
+    { 14.2857, 61.9048 },
+    { 4.7619, 52.381 },
+    { 0, 38.0952 },
+    { 0, 23.8095 },
+    { 4.7619, 14.2857 },
+    { 14.2857, 4.7619 },
+    { 28.5714, 0 },
+    { 38.0952, 0 },
+    { 52.381, 4.7619 },
+    { 61.9048, 14.2857 },
+    { 66.6667, 28.5714 },
+    { 66.6667, 42.8571 },
+    { 61.9048, 52.381 },
+    { 52.381, 61.9048 },
+    { 38.0952, 66.6667 },
+    { 28.5714, 66.6667 },
+};
+
+static const StrokeRec char127[] = {
+   { 2, char127_stroke0 },
+   { 17, char127_stroke1 },
+};
+
+static const StrokeCharRec chars[] = {
+    { 0, /* char0 */ 0, 0, 0 },
+    { 0, /* char1 */ 0, 0, 0 },
+    { 0, /* char2 */ 0, 0, 0 },
+    { 0, /* char3 */ 0, 0, 0 },
+    { 0, /* char4 */ 0, 0, 0 },
+    { 0, /* char5 */ 0, 0, 0 },
+    { 0, /* char6 */ 0, 0, 0 },
+    { 0, /* char7 */ 0, 0, 0 },
+    { 0, /* char8 */ 0, 0, 0 },
+    { 0, /* char9 */ 0, 0, 0 },
+    { 0, /* char10 */ 0, 0, 0 },
+    { 0, /* char11 */ 0, 0, 0 },
+    { 0, /* char12 */ 0, 0, 0 },
+    { 0, /* char13 */ 0, 0, 0 },
+    { 0, /* char14 */ 0, 0, 0 },
+    { 0, /* char15 */ 0, 0, 0 },
+    { 0, /* char16 */ 0, 0, 0 },
+    { 0, /* char17 */ 0, 0, 0 },
+    { 0, /* char18 */ 0, 0, 0 },
+    { 0, /* char19 */ 0, 0, 0 },
+    { 0, /* char20 */ 0, 0, 0 },
+    { 0, /* char21 */ 0, 0, 0 },
+    { 0, /* char22 */ 0, 0, 0 },
+    { 0, /* char23 */ 0, 0, 0 },
+    { 0, /* char24 */ 0, 0, 0 },
+    { 0, /* char25 */ 0, 0, 0 },
+    { 0, /* char26 */ 0, 0, 0 },
+    { 0, /* char27 */ 0, 0, 0 },
+    { 0, /* char28 */ 0, 0, 0 },
+    { 0, /* char29 */ 0, 0, 0 },
+    { 0, /* char30 */ 0, 0, 0 },
+    { 0, /* char31 */ 0, 0, 0 },
+    { 0, /* char32 */ 0, 52.381, 104.762 },
+    { 2, char33, 13.3819, 26.6238 },
+    { 2, char34, 23.0676, 51.4352 },
+    { 4, char35, 36.5333, 79.4886 },
+    { 3, char36, 38.1533, 76.2067 },
+    { 3, char37, 49.2171, 96.5743 },
+    { 1, char38, 53.599, 101.758 },
+    { 1, char39, 4.44, 13.62 },
+    { 1, char40, 21.8657, 47.1733 },
+    { 1, char41, 24.3276, 47.5333 },
+    { 3, char42, 30.7695, 59.439 },
+    { 2, char43, 48.8371, 97.2543 },
+    { 1, char44, 13.5219, 26.0638 },
+    { 1, char45, 50.2371, 100.754 },
+    { 1, char46, 13.1019, 26.4838 },
+    { 1, char47, 40.5733, 82.1067 },
+    { 1, char48, 38.3133, 77.0667 },
+    { 1, char49, 30.8676, 66.5295 },
+    { 1, char50, 38.7533, 77.6467 },
+    { 1, char51, 38.3333, 77.0467 },
+    { 2, char52, 37.2133, 80.1686 },
+    { 1, char53, 38.1933, 77.6867 },
+    { 1, char54, 34.1514, 73.8048 },
+    { 2, char55, 38.8933, 77.2267 },
+    { 1, char56, 38.9333, 77.6667 },
+    { 1, char57, 39.9333, 74.0648 },
+    { 2, char58, 14.0819, 26.2238 },
+    { 2, char59, 12.9619, 26.3038 },
+    { 1, char60, 41.1552, 81.6105 },
+    { 2, char61, 48.5571, 97.2543 },
+    { 1, char62, 40.8752, 81.6105 },
+    { 2, char63, 36.9914, 73.9029 },
+    { 2, char64, 34.9314, 74.3648 },
+    { 3, char65, 40.5952, 80.4905 },
+    { 3, char66, 44.7533, 83.6267 },
+    { 1, char67, 39.9933, 84.4886 },
+    { 2, char68, 45.2933, 85.2867 },
+    { 4, char69, 39.9914, 78.1848 },
+    { 3, char70, 39.9914, 78.7448 },
+    { 2, char71, 40.3933, 89.7686 },
+    { 3, char72, 44.7533, 89.0867 },
+    { 1, char73, 10.86, 21.3 },
+    { 1, char74, 31.0714, 59.999 },
+    { 3, char75, 44.6133, 79.3267 },
+    { 2, char76, 40.2514, 71.3229 },
+    { 4, char77, 48.9552, 97.2105 },
+    { 3, char78, 44.4733, 88.8067 },
+    { 1, char79, 44.3352, 88.8305 },
+    { 2, char80, 45.4333, 85.6667 },
+    { 2, char81, 43.3952, 88.0905 },
+    { 3, char82, 45.0133, 82.3667 },
+    { 1, char83, 41.3333, 80.8267 },
+    { 2, char84, 35.6933, 71.9467 },
+    { 1, char85, 44.8733, 89.4867 },
+    { 2, char86, 40.4552, 81.6105 },
+    { 4, char87, 49.839, 100.518 },
+    { 2, char88, 35.8333, 72.3667 },
+    { 2, char89, 39.6152, 79.6505 },
+    { 3, char90, 35.8333, 73.7467 },
+    { 4, char91, 22.0657, 46.1133 },
+    { 1, char92, 39.1733, 78.2067 },
+    { 4, char93, 23.4876, 46.3933 },
+    { 2, char94, 44.0752, 90.2305 },
+    { 1, char95, 51.281, 104.062 },
+    { 2, char96, 42.5457, 83.5714 },
+    { 2, char97, 35.2514, 66.6029 },
+    { 2, char98, 37.3314, 70.4629 },
+    { 1, char99, 34.0914, 68.9229 },
+    { 2, char100, 33.2114, 70.2629 },
+    { 1, char101, 34.2914, 68.5229 },
+    { 2, char102, 14.9657, 38.6552 },
+    { 2, char103, 33.9314, 70.9829 },
+    { 2, char104, 33.4095, 71.021 },
+    { 2, char105, 14.7819, 28.8638 },
+    { 2, char106, 17.3876, 36.2314 },
+    { 3, char107, 33.4095, 62.521 },
+    { 1, char108, 10.02, 19.34 },
+    { 3, char109, 61.981, 123.962 },
+    { 2, char110, 32.9895, 70.881 },
+    { 1, char111, 33.5514, 71.7448 },
+    { 2, char112, 38.0314, 70.8029 },
+    { 2, char113, 33.4114, 70.7429 },
+    { 2, char114, 23.7457, 49.4952 },
+    { 1, char115, 28.5095, 62.321 },
+    { 2, char116, 14.8257, 39.3152 },
+    { 2, char117, 33.2695, 71.161 },
+    { 2, char118, 30.3714, 60.6029 },
+    { 4, char119, 40.5952, 80.4905 },
+    { 2, char120, 25.4695, 56.401 },
+    { 2, char121, 35.1333, 66.0648 },
+    { 3, char122, 28.2495, 61.821 },
+    { 3, char123, 21.6657, 41.6295 },
+    { 1, char124, 11.54, 23.78 },
+    { 3, char125, 18.7038, 41.4695 },
+    { 2, char126, 45.7771, 91.2743 },
+    { 2, char127, 33.3333, 66.6667 },
+};
+
+StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 };
+
index 76b08095114ca89c0c2418bd47838a9a623c69e1..111e2d48e9c9edec5e384f867796a1e1527d1281 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1997. */\r
-\r
-/**\r
-(c) Copyright 1993, Silicon Graphics, Inc.\r
-\r
-ALL RIGHTS RESERVED\r
-\r
-Permission to use, copy, modify, and distribute this software\r
-for any purpose and without fee is hereby granted, provided\r
-that the above copyright notice appear in all copies and that\r
-both the copyright notice and this permission notice appear in\r
-supporting documentation, and that the name of Silicon\r
-Graphics, Inc. not be used in advertising or publicity\r
-pertaining to distribution of the software without specific,\r
-written prior permission.\r
-\r
-THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU\r
-"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR\r
-OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF\r
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  IN NO\r
-EVENT SHALL SILICON GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE\r
-ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR\r
-CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,\r
-INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,\r
-SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR\r
-NOT SILICON GRAPHICS, INC.  HAS BEEN ADVISED OF THE POSSIBILITY\r
-OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
-ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR\r
-PERFORMANCE OF THIS SOFTWARE.\r
-\r
-US Government Users Restricted Rights\r
-\r
-Use, duplication, or disclosure by the Government is subject to\r
-restrictions set forth in FAR 52.227.19(c)(2) or subparagraph\r
-(c)(1)(ii) of the Rights in Technical Data and Computer\r
-Software clause at DFARS 252.227-7013 and/or in similar or\r
-successor clauses in the FAR or the DOD or NASA FAR\r
-Supplement.  Unpublished-- rights reserved under the copyright\r
-laws of the United States.  Contractor/manufacturer is Silicon\r
-Graphics, Inc., 2011 N.  Shoreline Blvd., Mountain View, CA\r
-94039-7311.\r
-\r
-OpenGL(TM) is a trademark of Silicon Graphics, Inc.\r
-*/\r
-\r
-#include <math.h>\r
-#include "glutint.h"\r
-\r
-/* Some <math.h> files do not define M_PI... */\r
-#ifndef M_PI\r
-#define M_PI 3.14159265358979323846\r
-#endif\r
-\r
-static GLUquadricObj *quadObj;\r
-\r
-#define QUAD_OBJ_INIT() { if(!quadObj) initQuadObj(); }\r
-\r
-static void\r
-initQuadObj(void)\r
-{\r
-  quadObj = gluNewQuadric();\r
-  if (!quadObj)\r
-    __glutFatalError("out of memory.");\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutWireSphere(GLdouble radius, GLint slices, GLint stacks)\r
-{\r
-  QUAD_OBJ_INIT();\r
-  gluQuadricDrawStyle(quadObj, GLU_LINE);\r
-  gluQuadricNormals(quadObj, GLU_SMOOTH);\r
-  /* If we ever changed/used the texture or orientation state\r
-     of quadObj, we'd need to change it to the defaults here\r
-     with gluQuadricTexture and/or gluQuadricOrientation. */\r
-  gluSphere(quadObj, radius, slices, stacks);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidSphere(GLdouble radius, GLint slices, GLint stacks)\r
-{\r
-  QUAD_OBJ_INIT();\r
-  gluQuadricDrawStyle(quadObj, GLU_FILL);\r
-  gluQuadricNormals(quadObj, GLU_SMOOTH);\r
-  /* If we ever changed/used the texture or orientation state\r
-     of quadObj, we'd need to change it to the defaults here\r
-     with gluQuadricTexture and/or gluQuadricOrientation. */\r
-  gluSphere(quadObj, radius, slices, stacks);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutWireCone(GLdouble base, GLdouble height,\r
-  GLint slices, GLint stacks)\r
-{\r
-  QUAD_OBJ_INIT();\r
-  gluQuadricDrawStyle(quadObj, GLU_LINE);\r
-  gluQuadricNormals(quadObj, GLU_SMOOTH);\r
-  /* If we ever changed/used the texture or orientation state\r
-     of quadObj, we'd need to change it to the defaults here\r
-     with gluQuadricTexture and/or gluQuadricOrientation. */\r
-  gluCylinder(quadObj, base, 0.0, height, slices, stacks);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidCone(GLdouble base, GLdouble height,\r
-  GLint slices, GLint stacks)\r
-{\r
-  QUAD_OBJ_INIT();\r
-  gluQuadricDrawStyle(quadObj, GLU_FILL);\r
-  gluQuadricNormals(quadObj, GLU_SMOOTH);\r
-  /* If we ever changed/used the texture or orientation state\r
-     of quadObj, we'd need to change it to the defaults here\r
-     with gluQuadricTexture and/or gluQuadricOrientation. */\r
-  gluCylinder(quadObj, base, 0.0, height, slices, stacks);\r
-}\r
-\r
-/* ENDCENTRY */\r
-\r
-static void\r
-drawBox(GLfloat size, GLenum type)\r
-{\r
-  static GLfloat n[6][3] =\r
-  {\r
-    {-1.0, 0.0, 0.0},\r
-    {0.0, 1.0, 0.0},\r
-    {1.0, 0.0, 0.0},\r
-    {0.0, -1.0, 0.0},\r
-    {0.0, 0.0, 1.0},\r
-    {0.0, 0.0, -1.0}\r
-  };\r
-  static GLint faces[6][4] =\r
-  {\r
-    {0, 1, 2, 3},\r
-    {3, 2, 6, 7},\r
-    {7, 6, 5, 4},\r
-    {4, 5, 1, 0},\r
-    {5, 6, 2, 1},\r
-    {7, 4, 0, 3}\r
-  };\r
-  GLfloat v[8][3];\r
-  GLint i;\r
-\r
-  v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2;\r
-  v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2;\r
-  v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2;\r
-  v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2;\r
-  v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2;\r
-  v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2;\r
-\r
-  for (i = 5; i >= 0; i--) {\r
-    glBegin(type);\r
-    glNormal3fv(&n[i][0]);\r
-    glVertex3fv(&v[faces[i][0]][0]);\r
-    glVertex3fv(&v[faces[i][1]][0]);\r
-    glVertex3fv(&v[faces[i][2]][0]);\r
-    glVertex3fv(&v[faces[i][3]][0]);\r
-    glEnd();\r
-  }\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutWireCube(GLdouble size)\r
-{\r
-  drawBox(size, GL_LINE_LOOP);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidCube(GLdouble size)\r
-{\r
-  drawBox(size, GL_QUADS);\r
-}\r
-\r
-/* ENDCENTRY */\r
-\r
-static void\r
-doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings)\r
-{\r
-  int i, j;\r
-  GLfloat theta, phi, theta1;\r
-  GLfloat cosTheta, sinTheta;\r
-  GLfloat cosTheta1, sinTheta1;\r
-  GLfloat ringDelta, sideDelta;\r
-\r
-  ringDelta = 2.0 * M_PI / rings;\r
-  sideDelta = 2.0 * M_PI / nsides;\r
-\r
-  theta = 0.0;\r
-  cosTheta = 1.0;\r
-  sinTheta = 0.0;\r
-  for (i = rings - 1; i >= 0; i--) {\r
-    theta1 = theta + ringDelta;\r
-    cosTheta1 = cos(theta1);\r
-    sinTheta1 = sin(theta1);\r
-    glBegin(GL_QUAD_STRIP);\r
-    phi = 0.0;\r
-    for (j = nsides; j >= 0; j--) {\r
-      GLfloat cosPhi, sinPhi, dist;\r
-\r
-      phi += sideDelta;\r
-      cosPhi = cos(phi);\r
-      sinPhi = sin(phi);\r
-      dist = R + r * cosPhi;\r
-\r
-      glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);\r
-      glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi);\r
-      glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);\r
-      glVertex3f(cosTheta * dist, -sinTheta * dist,  r * sinPhi);\r
-    }\r
-    glEnd();\r
-    theta = theta1;\r
-    cosTheta = cosTheta1;\r
-    sinTheta = sinTheta1;\r
-  }\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutWireTorus(GLdouble innerRadius, GLdouble outerRadius,\r
-  GLint nsides, GLint rings)\r
-{\r
-  glPushAttrib(GL_POLYGON_BIT);\r
-  glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);\r
-  doughnut(innerRadius, outerRadius, nsides, rings);\r
-  glPopAttrib();\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius,\r
-  GLint nsides, GLint rings)\r
-{\r
-  doughnut(innerRadius, outerRadius, nsides, rings);\r
-}\r
-\r
-/* ENDCENTRY */\r
-\r
-static GLfloat dodec[20][3];\r
-\r
-static void\r
-initDodecahedron(void)\r
-{\r
-  GLfloat alpha, beta;\r
-\r
-  alpha = sqrt(2.0 / (3.0 + sqrt(5.0)));\r
-  beta = 1.0 + sqrt(6.0 / (3.0 + sqrt(5.0)) -\r
-    2.0 + 2.0 * sqrt(2.0 / (3.0 + sqrt(5.0))));\r
-  /* *INDENT-OFF* */\r
-  dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta;\r
-  dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta;\r
-  dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1;\r
-  dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1;\r
-  dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1;\r
-  dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1;\r
-  dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1;\r
-  dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1;\r
-  dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1;\r
-  dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1;\r
-  dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0;\r
-  dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0;\r
-  dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0;\r
-  dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0;\r
-  dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta;\r
-  dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta;\r
-  dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha;\r
-  dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha;\r
-  dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha;\r
-  dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha;\r
-  /* *INDENT-ON* */\r
-\r
-}\r
-\r
-#define DIFF3(_a,_b,_c) { \\r
-    (_c)[0] = (_a)[0] - (_b)[0]; \\r
-    (_c)[1] = (_a)[1] - (_b)[1]; \\r
-    (_c)[2] = (_a)[2] - (_b)[2]; \\r
-}\r
-\r
-static void\r
-crossprod(GLfloat v1[3], GLfloat v2[3], GLfloat prod[3])\r
-{\r
-  GLfloat p[3];         /* in case prod == v1 or v2 */\r
-\r
-  p[0] = v1[1] * v2[2] - v2[1] * v1[2];\r
-  p[1] = v1[2] * v2[0] - v2[2] * v1[0];\r
-  p[2] = v1[0] * v2[1] - v2[0] * v1[1];\r
-  prod[0] = p[0];\r
-  prod[1] = p[1];\r
-  prod[2] = p[2];\r
-}\r
-\r
-static void\r
-normalize(GLfloat v[3])\r
-{\r
-  GLfloat d;\r
-\r
-  d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);\r
-  if (d == 0.0) {\r
-    __glutWarning("normalize: zero length vector");\r
-    v[0] = d = 1.0;\r
-  }\r
-  d = 1 / d;\r
-  v[0] *= d;\r
-  v[1] *= d;\r
-  v[2] *= d;\r
-}\r
-\r
-static void\r
-pentagon(int a, int b, int c, int d, int e, GLenum shadeType)\r
-{\r
-  GLfloat n0[3], d1[3], d2[3];\r
-\r
-  DIFF3(dodec[a], dodec[b], d1);\r
-  DIFF3(dodec[b], dodec[c], d2);\r
-  crossprod(d1, d2, n0);\r
-  normalize(n0);\r
-\r
-  glBegin(shadeType);\r
-  glNormal3fv(n0);\r
-  glVertex3fv(&dodec[a][0]);\r
-  glVertex3fv(&dodec[b][0]);\r
-  glVertex3fv(&dodec[c][0]);\r
-  glVertex3fv(&dodec[d][0]);\r
-  glVertex3fv(&dodec[e][0]);\r
-  glEnd();\r
-}\r
-\r
-static void\r
-dodecahedron(GLenum type)\r
-{\r
-  static int inited = 0;\r
-\r
-  if (inited == 0) {\r
-    inited = 1;\r
-    initDodecahedron();\r
-  }\r
-  pentagon(0, 1, 9, 16, 5, type);\r
-  pentagon(1, 0, 3, 18, 7, type);\r
-  pentagon(1, 7, 11, 10, 9, type);\r
-  pentagon(11, 7, 18, 19, 6, type);\r
-  pentagon(8, 17, 16, 9, 10, type);\r
-  pentagon(2, 14, 15, 6, 19, type);\r
-  pentagon(2, 13, 12, 4, 14, type);\r
-  pentagon(2, 19, 18, 3, 13, type);\r
-  pentagon(3, 0, 5, 12, 13, type);\r
-  pentagon(6, 15, 8, 10, 11, type);\r
-  pentagon(4, 17, 8, 15, 14, type);\r
-  pentagon(4, 12, 5, 16, 17, type);\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY glutWireDodecahedron(void)\r
-{\r
-  dodecahedron(GL_LINE_LOOP);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidDodecahedron(void)\r
-{\r
-  dodecahedron(GL_TRIANGLE_FAN);\r
-}\r
-\r
-/* ENDCENTRY */\r
-\r
-static void\r
-recorditem(GLfloat * n1, GLfloat * n2, GLfloat * n3,\r
-  GLenum shadeType)\r
-{\r
-  GLfloat q0[3], q1[3];\r
-\r
-  DIFF3(n1, n2, q0);\r
-  DIFF3(n2, n3, q1);\r
-  crossprod(q0, q1, q1);\r
-  normalize(q1);\r
-\r
-  glBegin(shadeType);\r
-  glNormal3fv(q1);\r
-  glVertex3fv(n1);\r
-  glVertex3fv(n2);\r
-  glVertex3fv(n3);\r
-  glEnd();\r
-}\r
-\r
-static void\r
-subdivide(GLfloat * v0, GLfloat * v1, GLfloat * v2,\r
-  GLenum shadeType)\r
-{\r
-  int depth;\r
-  GLfloat w0[3], w1[3], w2[3];\r
-  GLfloat l;\r
-  int i, j, k, n;\r
-\r
-  depth = 1;\r
-  for (i = 0; i < depth; i++) {\r
-    for (j = 0; i + j < depth; j++) {\r
-      k = depth - i - j;\r
-      for (n = 0; n < 3; n++) {\r
-        w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth;\r
-        w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n])\r
-          / depth;\r
-        w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n])\r
-          / depth;\r
-      }\r
-      l = sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]);\r
-      w0[0] /= l;\r
-      w0[1] /= l;\r
-      w0[2] /= l;\r
-      l = sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]);\r
-      w1[0] /= l;\r
-      w1[1] /= l;\r
-      w1[2] /= l;\r
-      l = sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]);\r
-      w2[0] /= l;\r
-      w2[1] /= l;\r
-      w2[2] /= l;\r
-      recorditem(w1, w0, w2, shadeType);\r
-    }\r
-  }\r
-}\r
-\r
-static void\r
-drawtriangle(int i, GLfloat data[][3], int ndx[][3],\r
-  GLenum shadeType)\r
-{\r
-  GLfloat *x0, *x1, *x2;\r
-\r
-  x0 = data[ndx[i][0]];\r
-  x1 = data[ndx[i][1]];\r
-  x2 = data[ndx[i][2]];\r
-  subdivide(x0, x1, x2, shadeType);\r
-}\r
-\r
-/* octahedron data: The octahedron produced is centered at the\r
-   origin and has radius 1.0 */\r
-static GLfloat odata[6][3] =\r
-{\r
-  {1.0, 0.0, 0.0},\r
-  {-1.0, 0.0, 0.0},\r
-  {0.0, 1.0, 0.0},\r
-  {0.0, -1.0, 0.0},\r
-  {0.0, 0.0, 1.0},\r
-  {0.0, 0.0, -1.0}\r
-};\r
-\r
-static int ondex[8][3] =\r
-{\r
-  {0, 4, 2},\r
-  {1, 2, 4},\r
-  {0, 3, 4},\r
-  {1, 4, 3},\r
-  {0, 2, 5},\r
-  {1, 5, 2},\r
-  {0, 5, 3},\r
-  {1, 3, 5}\r
-};\r
-\r
-static void\r
-octahedron(GLenum shadeType)\r
-{\r
-  int i;\r
-\r
-  for (i = 7; i >= 0; i--) {\r
-    drawtriangle(i, odata, ondex, shadeType);\r
-  }\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutWireOctahedron(void)\r
-{\r
-  octahedron(GL_LINE_LOOP);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidOctahedron(void)\r
-{\r
-  octahedron(GL_TRIANGLES);\r
-}\r
-\r
-/* ENDCENTRY */\r
-\r
-/* icosahedron data: These numbers are rigged to make an\r
-   icosahedron of radius 1.0 */\r
-\r
-#define X .525731112119133606\r
-#define Z .850650808352039932\r
-\r
-static GLfloat idata[12][3] =\r
-{\r
-  {-X, 0, Z},\r
-  {X, 0, Z},\r
-  {-X, 0, -Z},\r
-  {X, 0, -Z},\r
-  {0, Z, X},\r
-  {0, Z, -X},\r
-  {0, -Z, X},\r
-  {0, -Z, -X},\r
-  {Z, X, 0},\r
-  {-Z, X, 0},\r
-  {Z, -X, 0},\r
-  {-Z, -X, 0}\r
-};\r
-\r
-static int index[20][3] =\r
-{\r
-  {0, 4, 1},\r
-  {0, 9, 4},\r
-  {9, 5, 4},\r
-  {4, 5, 8},\r
-  {4, 8, 1},\r
-  {8, 10, 1},\r
-  {8, 3, 10},\r
-  {5, 3, 8},\r
-  {5, 2, 3},\r
-  {2, 7, 3},\r
-  {7, 10, 3},\r
-  {7, 6, 10},\r
-  {7, 11, 6},\r
-  {11, 0, 6},\r
-  {0, 1, 6},\r
-  {6, 1, 10},\r
-  {9, 0, 11},\r
-  {9, 11, 2},\r
-  {9, 2, 5},\r
-  {7, 2, 11},\r
-};\r
-\r
-static void\r
-icosahedron(GLenum shadeType)\r
-{\r
-  int i;\r
-\r
-  for (i = 19; i >= 0; i--) {\r
-    drawtriangle(i, idata, index, shadeType);\r
-  }\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutWireIcosahedron(void)\r
-{\r
-  icosahedron(GL_LINE_LOOP);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidIcosahedron(void)\r
-{\r
-  icosahedron(GL_TRIANGLES);\r
-}\r
-\r
-/* ENDCENTRY */\r
-\r
-/* tetrahedron data: */\r
-\r
-#define T       1.73205080756887729\r
-\r
-static GLfloat tdata[4][3] =\r
-{\r
-  {T, T, T},\r
-  {T, -T, -T},\r
-  {-T, T, -T},\r
-  {-T, -T, T}\r
-};\r
-\r
-static int tndex[4][3] =\r
-{\r
-  {0, 1, 3},\r
-  {2, 1, 0},\r
-  {3, 2, 0},\r
-  {1, 2, 3}\r
-};\r
-\r
-static void\r
-tetrahedron(GLenum shadeType)\r
-{\r
-  int i;\r
-\r
-  for (i = 3; i >= 0; i--)\r
-    drawtriangle(i, tdata, tndex, shadeType);\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutWireTetrahedron(void)\r
-{\r
-  tetrahedron(GL_LINE_LOOP);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSolidTetrahedron(void)\r
-{\r
-  tetrahedron(GL_TRIANGLES);\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
+
+/**
+(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.
+*/
+
+#include <math.h>
+#include "glutint.h"
+
+/* Some <math.h> files do not define M_PI... */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+static GLUquadricObj *quadObj;
+
+#define QUAD_OBJ_INIT() { if(!quadObj) initQuadObj(); }
+
+static void
+initQuadObj(void)
+{
+  quadObj = gluNewQuadric();
+  if (!quadObj)
+    __glutFatalError("out of memory.");
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutWireSphere(GLdouble radius, GLint slices, GLint stacks)
+{
+  QUAD_OBJ_INIT();
+  gluQuadricDrawStyle(quadObj, GLU_LINE);
+  gluQuadricNormals(quadObj, GLU_SMOOTH);
+  /* If we ever changed/used the texture or orientation state
+     of quadObj, we'd need to change it to the defaults here
+     with gluQuadricTexture and/or gluQuadricOrientation. */
+  gluSphere(quadObj, radius, slices, stacks);
+}
+
+void GLUTAPIENTRY
+glutSolidSphere(GLdouble radius, GLint slices, GLint stacks)
+{
+  QUAD_OBJ_INIT();
+  gluQuadricDrawStyle(quadObj, GLU_FILL);
+  gluQuadricNormals(quadObj, GLU_SMOOTH);
+  /* If we ever changed/used the texture or orientation state
+     of quadObj, we'd need to change it to the defaults here
+     with gluQuadricTexture and/or gluQuadricOrientation. */
+  gluSphere(quadObj, radius, slices, stacks);
+}
+
+void GLUTAPIENTRY
+glutWireCone(GLdouble base, GLdouble height,
+  GLint slices, GLint stacks)
+{
+  QUAD_OBJ_INIT();
+  gluQuadricDrawStyle(quadObj, GLU_LINE);
+  gluQuadricNormals(quadObj, GLU_SMOOTH);
+  /* If we ever changed/used the texture or orientation state
+     of quadObj, we'd need to change it to the defaults here
+     with gluQuadricTexture and/or gluQuadricOrientation. */
+  gluCylinder(quadObj, base, 0.0, height, slices, stacks);
+}
+
+void GLUTAPIENTRY
+glutSolidCone(GLdouble base, GLdouble height,
+  GLint slices, GLint stacks)
+{
+  QUAD_OBJ_INIT();
+  gluQuadricDrawStyle(quadObj, GLU_FILL);
+  gluQuadricNormals(quadObj, GLU_SMOOTH);
+  /* If we ever changed/used the texture or orientation state
+     of quadObj, we'd need to change it to the defaults here
+     with gluQuadricTexture and/or gluQuadricOrientation. */
+  gluCylinder(quadObj, base, 0.0, height, slices, stacks);
+}
+
+/* ENDCENTRY */
+
+static void
+drawBox(GLfloat size, GLenum type)
+{
+  static GLfloat n[6][3] =
+  {
+    {-1.0, 0.0, 0.0},
+    {0.0, 1.0, 0.0},
+    {1.0, 0.0, 0.0},
+    {0.0, -1.0, 0.0},
+    {0.0, 0.0, 1.0},
+    {0.0, 0.0, -1.0}
+  };
+  static GLint faces[6][4] =
+  {
+    {0, 1, 2, 3},
+    {3, 2, 6, 7},
+    {7, 6, 5, 4},
+    {4, 5, 1, 0},
+    {5, 6, 2, 1},
+    {7, 4, 0, 3}
+  };
+  GLfloat v[8][3];
+  GLint i;
+
+  v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2;
+  v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2;
+  v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2;
+  v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2;
+  v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2;
+  v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2;
+
+  for (i = 5; i >= 0; i--) {
+    glBegin(type);
+    glNormal3fv(&n[i][0]);
+    glVertex3fv(&v[faces[i][0]][0]);
+    glVertex3fv(&v[faces[i][1]][0]);
+    glVertex3fv(&v[faces[i][2]][0]);
+    glVertex3fv(&v[faces[i][3]][0]);
+    glEnd();
+  }
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutWireCube(GLdouble size)
+{
+  drawBox(size, GL_LINE_LOOP);
+}
+
+void GLUTAPIENTRY
+glutSolidCube(GLdouble size)
+{
+  drawBox(size, GL_QUADS);
+}
+
+/* ENDCENTRY */
+
+static void
+doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings)
+{
+  int i, j;
+  GLfloat theta, phi, theta1;
+  GLfloat cosTheta, sinTheta;
+  GLfloat cosTheta1, sinTheta1;
+  GLfloat ringDelta, sideDelta;
+
+  ringDelta = 2.0 * M_PI / rings;
+  sideDelta = 2.0 * M_PI / nsides;
+
+  theta = 0.0;
+  cosTheta = 1.0;
+  sinTheta = 0.0;
+  for (i = rings - 1; i >= 0; i--) {
+    theta1 = theta + ringDelta;
+    cosTheta1 = cos(theta1);
+    sinTheta1 = sin(theta1);
+    glBegin(GL_QUAD_STRIP);
+    phi = 0.0;
+    for (j = nsides; j >= 0; j--) {
+      GLfloat cosPhi, sinPhi, dist;
+
+      phi += sideDelta;
+      cosPhi = cos(phi);
+      sinPhi = sin(phi);
+      dist = R + r * cosPhi;
+
+      glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
+      glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi);
+      glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
+      glVertex3f(cosTheta * dist, -sinTheta * dist,  r * sinPhi);
+    }
+    glEnd();
+    theta = theta1;
+    cosTheta = cosTheta1;
+    sinTheta = sinTheta1;
+  }
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutWireTorus(GLdouble innerRadius, GLdouble outerRadius,
+  GLint nsides, GLint rings)
+{
+  glPushAttrib(GL_POLYGON_BIT);
+  glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+  doughnut(innerRadius, outerRadius, nsides, rings);
+  glPopAttrib();
+}
+
+void GLUTAPIENTRY
+glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius,
+  GLint nsides, GLint rings)
+{
+  doughnut(innerRadius, outerRadius, nsides, rings);
+}
+
+/* ENDCENTRY */
+
+static GLfloat dodec[20][3];
+
+static void
+initDodecahedron(void)
+{
+  GLfloat alpha, beta;
+
+  alpha = sqrt(2.0 / (3.0 + sqrt(5.0)));
+  beta = 1.0 + sqrt(6.0 / (3.0 + sqrt(5.0)) -
+    2.0 + 2.0 * sqrt(2.0 / (3.0 + sqrt(5.0))));
+  /* *INDENT-OFF* */
+  dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta;
+  dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta;
+  dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1;
+  dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1;
+  dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1;
+  dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1;
+  dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1;
+  dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1;
+  dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1;
+  dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1;
+  dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0;
+  dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0;
+  dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0;
+  dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0;
+  dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta;
+  dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta;
+  dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha;
+  dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha;
+  dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha;
+  dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha;
+  /* *INDENT-ON* */
+
+}
+
+#define DIFF3(_a,_b,_c) { \
+    (_c)[0] = (_a)[0] - (_b)[0]; \
+    (_c)[1] = (_a)[1] - (_b)[1]; \
+    (_c)[2] = (_a)[2] - (_b)[2]; \
+}
+
+static void
+crossprod(GLfloat v1[3], GLfloat v2[3], GLfloat prod[3])
+{
+  GLfloat p[3];         /* in case prod == v1 or v2 */
+
+  p[0] = v1[1] * v2[2] - v2[1] * v1[2];
+  p[1] = v1[2] * v2[0] - v2[2] * v1[0];
+  p[2] = v1[0] * v2[1] - v2[0] * v1[1];
+  prod[0] = p[0];
+  prod[1] = p[1];
+  prod[2] = p[2];
+}
+
+static void
+normalize(GLfloat v[3])
+{
+  GLfloat d;
+
+  d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+  if (d == 0.0) {
+    __glutWarning("normalize: zero length vector");
+    v[0] = d = 1.0;
+  }
+  d = 1 / d;
+  v[0] *= d;
+  v[1] *= d;
+  v[2] *= d;
+}
+
+static void
+pentagon(int a, int b, int c, int d, int e, GLenum shadeType)
+{
+  GLfloat n0[3], d1[3], d2[3];
+
+  DIFF3(dodec[a], dodec[b], d1);
+  DIFF3(dodec[b], dodec[c], d2);
+  crossprod(d1, d2, n0);
+  normalize(n0);
+
+  glBegin(shadeType);
+  glNormal3fv(n0);
+  glVertex3fv(&dodec[a][0]);
+  glVertex3fv(&dodec[b][0]);
+  glVertex3fv(&dodec[c][0]);
+  glVertex3fv(&dodec[d][0]);
+  glVertex3fv(&dodec[e][0]);
+  glEnd();
+}
+
+static void
+dodecahedron(GLenum type)
+{
+  static int inited = 0;
+
+  if (inited == 0) {
+    inited = 1;
+    initDodecahedron();
+  }
+  pentagon(0, 1, 9, 16, 5, type);
+  pentagon(1, 0, 3, 18, 7, type);
+  pentagon(1, 7, 11, 10, 9, type);
+  pentagon(11, 7, 18, 19, 6, type);
+  pentagon(8, 17, 16, 9, 10, type);
+  pentagon(2, 14, 15, 6, 19, type);
+  pentagon(2, 13, 12, 4, 14, type);
+  pentagon(2, 19, 18, 3, 13, type);
+  pentagon(3, 0, 5, 12, 13, type);
+  pentagon(6, 15, 8, 10, 11, type);
+  pentagon(4, 17, 8, 15, 14, type);
+  pentagon(4, 12, 5, 16, 17, type);
+}
+
+/* CENTRY */
+void GLUTAPIENTRY glutWireDodecahedron(void)
+{
+  dodecahedron(GL_LINE_LOOP);
+}
+
+void GLUTAPIENTRY
+glutSolidDodecahedron(void)
+{
+  dodecahedron(GL_TRIANGLE_FAN);
+}
+
+/* ENDCENTRY */
+
+static void
+recorditem(GLfloat * n1, GLfloat * n2, GLfloat * n3,
+  GLenum shadeType)
+{
+  GLfloat q0[3], q1[3];
+
+  DIFF3(n1, n2, q0);
+  DIFF3(n2, n3, q1);
+  crossprod(q0, q1, q1);
+  normalize(q1);
+
+  glBegin(shadeType);
+  glNormal3fv(q1);
+  glVertex3fv(n1);
+  glVertex3fv(n2);
+  glVertex3fv(n3);
+  glEnd();
+}
+
+static void
+subdivide(GLfloat * v0, GLfloat * v1, GLfloat * v2,
+  GLenum shadeType)
+{
+  int depth;
+  GLfloat w0[3], w1[3], w2[3];
+  GLfloat l;
+  int i, j, k, n;
+
+  depth = 1;
+  for (i = 0; i < depth; i++) {
+    for (j = 0; i + j < depth; j++) {
+      k = depth - i - j;
+      for (n = 0; n < 3; n++) {
+        w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth;
+        w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n])
+          / depth;
+        w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n])
+          / depth;
+      }
+      l = sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]);
+      w0[0] /= l;
+      w0[1] /= l;
+      w0[2] /= l;
+      l = sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]);
+      w1[0] /= l;
+      w1[1] /= l;
+      w1[2] /= l;
+      l = sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]);
+      w2[0] /= l;
+      w2[1] /= l;
+      w2[2] /= l;
+      recorditem(w1, w0, w2, shadeType);
+    }
+  }
+}
+
+static void
+drawtriangle(int i, GLfloat data[][3], int ndx[][3],
+  GLenum shadeType)
+{
+  GLfloat *x0, *x1, *x2;
+
+  x0 = data[ndx[i][0]];
+  x1 = data[ndx[i][1]];
+  x2 = data[ndx[i][2]];
+  subdivide(x0, x1, x2, shadeType);
+}
+
+/* octahedron data: The octahedron produced is centered at the
+   origin and has radius 1.0 */
+static GLfloat odata[6][3] =
+{
+  {1.0, 0.0, 0.0},
+  {-1.0, 0.0, 0.0},
+  {0.0, 1.0, 0.0},
+  {0.0, -1.0, 0.0},
+  {0.0, 0.0, 1.0},
+  {0.0, 0.0, -1.0}
+};
+
+static int ondex[8][3] =
+{
+  {0, 4, 2},
+  {1, 2, 4},
+  {0, 3, 4},
+  {1, 4, 3},
+  {0, 2, 5},
+  {1, 5, 2},
+  {0, 5, 3},
+  {1, 3, 5}
+};
+
+static void
+octahedron(GLenum shadeType)
+{
+  int i;
+
+  for (i = 7; i >= 0; i--) {
+    drawtriangle(i, odata, ondex, shadeType);
+  }
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutWireOctahedron(void)
+{
+  octahedron(GL_LINE_LOOP);
+}
+
+void GLUTAPIENTRY
+glutSolidOctahedron(void)
+{
+  octahedron(GL_TRIANGLES);
+}
+
+/* ENDCENTRY */
+
+/* icosahedron data: These numbers are rigged to make an
+   icosahedron of radius 1.0 */
+
+#define X .525731112119133606
+#define Z .850650808352039932
+
+static GLfloat idata[12][3] =
+{
+  {-X, 0, Z},
+  {X, 0, Z},
+  {-X, 0, -Z},
+  {X, 0, -Z},
+  {0, Z, X},
+  {0, Z, -X},
+  {0, -Z, X},
+  {0, -Z, -X},
+  {Z, X, 0},
+  {-Z, X, 0},
+  {Z, -X, 0},
+  {-Z, -X, 0}
+};
+
+static int index[20][3] =
+{
+  {0, 4, 1},
+  {0, 9, 4},
+  {9, 5, 4},
+  {4, 5, 8},
+  {4, 8, 1},
+  {8, 10, 1},
+  {8, 3, 10},
+  {5, 3, 8},
+  {5, 2, 3},
+  {2, 7, 3},
+  {7, 10, 3},
+  {7, 6, 10},
+  {7, 11, 6},
+  {11, 0, 6},
+  {0, 1, 6},
+  {6, 1, 10},
+  {9, 0, 11},
+  {9, 11, 2},
+  {9, 2, 5},
+  {7, 2, 11},
+};
+
+static void
+icosahedron(GLenum shadeType)
+{
+  int i;
+
+  for (i = 19; i >= 0; i--) {
+    drawtriangle(i, idata, index, shadeType);
+  }
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutWireIcosahedron(void)
+{
+  icosahedron(GL_LINE_LOOP);
+}
+
+void GLUTAPIENTRY
+glutSolidIcosahedron(void)
+{
+  icosahedron(GL_TRIANGLES);
+}
+
+/* ENDCENTRY */
+
+/* tetrahedron data: */
+
+#define T       1.73205080756887729
+
+static GLfloat tdata[4][3] =
+{
+  {T, T, T},
+  {T, -T, -T},
+  {-T, T, -T},
+  {-T, -T, T}
+};
+
+static int tndex[4][3] =
+{
+  {0, 1, 3},
+  {2, 1, 0},
+  {3, 2, 0},
+  {1, 2, 3}
+};
+
+static void
+tetrahedron(GLenum shadeType)
+{
+  int i;
+
+  for (i = 3; i >= 0; i--)
+    drawtriangle(i, tdata, tndex, shadeType);
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutWireTetrahedron(void)
+{
+  tetrahedron(GL_LINE_LOOP);
+}
+
+void GLUTAPIENTRY
+glutSolidTetrahedron(void)
+{
+  tetrahedron(GL_TRIANGLES);
+}
+
+/* ENDCENTRY */
index 4823283c8c4132454dfcb3c0f92cf1bcd6cf0c07..ac231e4973193e1c3dc7e91cfcd048e7da6116ee 100644 (file)
@@ -1,42 +1,42 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1994. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include "glutint.h"\r
-#include "glutstroke.h"\r
-\r
-void GLUTAPIENTRY\r
-glutStrokeCharacter(GLUTstrokeFont font, int c)\r
-{\r
-  const StrokeCharRec *ch;\r
-  const StrokeRec *stroke;\r
-  const CoordRec *coord;\r
-  StrokeFontPtr fontinfo;\r
-  int i, j;\r
-\r
-\r
-#if defined(_WIN32)\r
-  fontinfo = (StrokeFontPtr) __glutFont(font);\r
-#else\r
-  fontinfo = (StrokeFontPtr) font;\r
-#endif\r
-\r
-  if (c < 0 || c >= fontinfo->num_chars)\r
-    return;\r
-  ch = &(fontinfo->ch[c]);\r
-  if (ch) {\r
-    for (i = ch->num_strokes, stroke = ch->stroke;\r
-      i > 0; i--, stroke++) {\r
-      glBegin(GL_LINE_STRIP);\r
-      for (j = stroke->num_coords, coord = stroke->coord;\r
-        j > 0; j--, coord++) {\r
-        glVertex2f(coord->x, coord->y);\r
-      }\r
-      glEnd();\r
-    }\r
-    glTranslatef(ch->right, 0.0, 0.0);\r
-  }\r
-}\r
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* 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. */
+
+#include "glutint.h"
+#include "glutstroke.h"
+
+void GLUTAPIENTRY
+glutStrokeCharacter(GLUTstrokeFont font, int c)
+{
+  const StrokeCharRec *ch;
+  const StrokeRec *stroke;
+  const CoordRec *coord;
+  StrokeFontPtr fontinfo;
+  int i, j;
+
+
+#if defined(_WIN32)
+  fontinfo = (StrokeFontPtr) __glutFont(font);
+#else
+  fontinfo = (StrokeFontPtr) font;
+#endif
+
+  if (c < 0 || c >= fontinfo->num_chars)
+    return;
+  ch = &(fontinfo->ch[c]);
+  if (ch) {
+    for (i = ch->num_strokes, stroke = ch->stroke;
+      i > 0; i--, stroke++) {
+      glBegin(GL_LINE_STRIP);
+      for (j = stroke->num_coords, coord = stroke->coord;
+        j > 0; j--, coord++) {
+        glVertex2f(coord->x, coord->y);
+      }
+      glEnd();
+    }
+    glTranslatef(ch->right, 0.0, 0.0);
+  }
+}
index 210a7fc37e01da19079b8f634e8a90f871bd65dc..4831b8eb35134127acd5da1290d50289f85c5fa9 100644 (file)
@@ -1,67 +1,67 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1997.  */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdio.h>\r
-#include "glutint.h"\r
-\r
-GLint __glutFPS = 0;\r
-GLint __glutSwapCount = 0;\r
-GLint __glutSwapTime = 0;\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutSwapBuffers(void)\r
-{\r
-  GLUTwindow *window = __glutCurrentWindow;\r
-\r
-  if (window->renderWin == window->win) {\r
-    if (__glutCurrentWindow->treatAsSingle) {\r
-      /* Pretend the double buffered window is single buffered,\r
-         so treat glutSwapBuffers as a no-op. */\r
-      return;\r
-    }\r
-  } else {\r
-    if (__glutCurrentWindow->overlay->treatAsSingle) {\r
-      /* Pretend the double buffered overlay is single\r
-         buffered, so treat glutSwapBuffers as a no-op. */\r
-      return;\r
-    }\r
-  }\r
-\r
-  /* For the MESA_SWAP_HACK. */\r
-  window->usedSwapBuffers = 1;\r
-\r
-  SWAP_BUFFERS_LAYER(__glutCurrentWindow);\r
-\r
-  /* I considered putting the window being swapped on the\r
-     GLUT_FINISH_WORK work list because you could call\r
-     glutSwapBuffers from an idle callback which doesn't call\r
-     __glutSetWindow which normally adds indirect rendering\r
-     windows to the GLUT_FINISH_WORK work list.  Not being put\r
-     on the list could lead to the buffering up of multiple\r
-     redisplays and buffer swaps and hamper interactivity.  I\r
-     consider this an application bug due to not using\r
-     glutPostRedisplay to trigger redraws.  If\r
-     glutPostRedisplay were used, __glutSetWindow would be\r
-     called and a glFinish to throttle buffering would occur. */\r
-\r
-  if (__glutFPS) {\r
-     GLint t = glutGet(GLUT_ELAPSED_TIME);\r
-     __glutSwapCount++;\r
-     if (__glutSwapTime == 0)\r
-        __glutSwapTime = t;\r
-     else if (t - __glutSwapTime > __glutFPS) {\r
-        float time = 0.001 * (t - __glutSwapTime);\r
-        float fps = (float) __glutSwapCount / time;\r
-        fprintf(stderr, "GLUT: %d frames in %.2f seconds = %.2f FPS\n",\r
-                __glutSwapCount, time, fps);\r
-        __glutSwapTime = t;\r
-        __glutSwapCount = 0;\r
-     }\r
-  }\r
-}\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1997.  */
+
+/* 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. */
+
+#include <stdio.h>
+#include "glutint.h"
+
+GLint __glutFPS = 0;
+GLint __glutSwapCount = 0;
+GLint __glutSwapTime = 0;
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutSwapBuffers(void)
+{
+  GLUTwindow *window = __glutCurrentWindow;
+
+  if (window->renderWin == window->win) {
+    if (__glutCurrentWindow->treatAsSingle) {
+      /* Pretend the double buffered window is single buffered,
+         so treat glutSwapBuffers as a no-op. */
+      return;
+    }
+  } else {
+    if (__glutCurrentWindow->overlay->treatAsSingle) {
+      /* Pretend the double buffered overlay is single
+         buffered, so treat glutSwapBuffers as a no-op. */
+      return;
+    }
+  }
+
+  /* For the MESA_SWAP_HACK. */
+  window->usedSwapBuffers = 1;
+
+  SWAP_BUFFERS_LAYER(__glutCurrentWindow);
+
+  /* I considered putting the window being swapped on the
+     GLUT_FINISH_WORK work list because you could call
+     glutSwapBuffers from an idle callback which doesn't call
+     __glutSetWindow which normally adds indirect rendering
+     windows to the GLUT_FINISH_WORK work list.  Not being put
+     on the list could lead to the buffering up of multiple
+     redisplays and buffer swaps and hamper interactivity.  I
+     consider this an application bug due to not using
+     glutPostRedisplay to trigger redraws.  If
+     glutPostRedisplay were used, __glutSetWindow would be
+     called and a glFinish to throttle buffering would occur. */
+
+  if (__glutFPS) {
+     GLint t = glutGet(GLUT_ELAPSED_TIME);
+     __glutSwapCount++;
+     if (__glutSwapTime == 0)
+        __glutSwapTime = t;
+     else if (t - __glutSwapTime > __glutFPS) {
+        float time = 0.001 * (t - __glutSwapTime);
+        float fps = (float) __glutSwapCount / time;
+        fprintf(stderr, "GLUT: %d frames in %.2f seconds = %.2f FPS\n",
+                __glutSwapCount, time, fps);
+        __glutSwapTime = t;
+        __glutSwapCount = 0;
+     }
+  }
+}
+/* ENDCENTRY */
index e2fcb53152e288aab7fe1f582a7016b9dc9cf3cc..31bbbbd6df45eb96630ad44c2c1fbc0abf45b444 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1994. */\r
-\r
-/**\r
-(c) Copyright 1993, Silicon Graphics, Inc.\r
-\r
-ALL RIGHTS RESERVED\r
-\r
-Permission to use, copy, modify, and distribute this software\r
-for any purpose and without fee is hereby granted, provided\r
-that the above copyright notice appear in all copies and that\r
-both the copyright notice and this permission notice appear in\r
-supporting documentation, and that the name of Silicon\r
-Graphics, Inc. not be used in advertising or publicity\r
-pertaining to distribution of the software without specific,\r
-written prior permission.\r
-\r
-THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU\r
-"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR\r
-OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF\r
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  IN NO\r
-EVENT SHALL SILICON GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE\r
-ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR\r
-CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,\r
-INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,\r
-SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR\r
-NOT SILICON GRAPHICS, INC.  HAS BEEN ADVISED OF THE POSSIBILITY\r
-OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
-ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR\r
-PERFORMANCE OF THIS SOFTWARE.\r
-\r
-US Government Users Restricted Rights\r
-\r
-Use, duplication, or disclosure by the Government is subject to\r
-restrictions set forth in FAR 52.227.19(c)(2) or subparagraph\r
-(c)(1)(ii) of the Rights in Technical Data and Computer\r
-Software clause at DFARS 252.227-7013 and/or in similar or\r
-successor clauses in the FAR or the DOD or NASA FAR\r
-Supplement.  Unpublished-- rights reserved under the copyright\r
-laws of the United States.  Contractor/manufacturer is Silicon\r
-Graphics, Inc., 2011 N.  Shoreline Blvd., Mountain View, CA\r
-94039-7311.\r
-\r
-OpenGL(TM) is a trademark of Silicon Graphics, Inc.\r
-*/\r
-\r
-#include "glutint.h"\r
-\r
-/* Rim, body, lid, and bottom data must be reflected in x and\r
-   y; handle and spout data across the y axis only.  */\r
-\r
-static int patchdata[][16] =\r
-{\r
-    /* rim */\r
-  {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11,\r
-    12, 13, 14, 15},\r
-    /* body */\r
-  {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,\r
-    24, 25, 26, 27},\r
-  {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36,\r
-    37, 38, 39, 40},\r
-    /* lid */\r
-  {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101,\r
-    101, 0, 1, 2, 3,},\r
-  {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112,\r
-    113, 114, 115, 116, 117},\r
-    /* bottom */\r
-  {118, 118, 118, 118, 124, 122, 119, 121, 123, 126,\r
-    125, 120, 40, 39, 38, 37},\r
-    /* handle */\r
-  {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,\r
-    53, 54, 55, 56},\r
-  {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,\r
-    28, 65, 66, 67},\r
-    /* spout */\r
-  {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,\r
-    80, 81, 82, 83},\r
-  {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,\r
-    92, 93, 94, 95}\r
-};\r
-/* *INDENT-OFF* */\r
-\r
-static float cpdata[][3] =\r
-{\r
-    {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0,\r
-    -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125},\r
-    {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375,\r
-    0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375,\r
-    2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84,\r
-    2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875},\r
-    {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75,\r
-    1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35},\r
-    {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2,\r
-    0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12,\r
-    0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225},\r
-    {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225},\r
-    {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0,\r
-    -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5,\r
-    -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3,\r
-    2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0,\r
-    2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0,\r
-    2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8},\r
-    {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3,\r
-    -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3,\r
-    1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2,\r
-    -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0,\r
-    1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0,\r
-    0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66,\r
-    0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1},\r
-    {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7,\r
-    -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0,\r
-    2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375},\r
-    {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475},\r
-    {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4},\r
-    {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0,\r
-    3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8,\r
-    3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4,\r
-    -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0,\r
-    2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4,\r
-    2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3,\r
-    2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4},\r
-    {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425,\r
-    -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425,\r
-    0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075},\r
-    {0.84, -1.5, 0.075}\r
-};\r
-\r
-static float tex[2][2][2] =\r
-{\r
-  { {0, 0},\r
-    {1, 0}},\r
-  { {0, 1},\r
-    {1, 1}}\r
-};\r
-\r
-/* *INDENT-ON* */\r
-\r
-static void\r
-teapot(GLint grid, GLdouble scale, GLenum type)\r
-{\r
-  float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];\r
-  long i, j, k, l;\r
-\r
-  glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT);\r
-  glEnable(GL_AUTO_NORMAL);\r
-  glEnable(GL_NORMALIZE);\r
-  glEnable(GL_MAP2_VERTEX_3);\r
-  glEnable(GL_MAP2_TEXTURE_COORD_2);\r
-  glPushMatrix();\r
-  glRotatef(270.0, 1.0, 0.0, 0.0);\r
-  glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale);\r
-  glTranslatef(0.0, 0.0, -1.5);\r
-  for (i = 0; i < 10; i++) {\r
-    for (j = 0; j < 4; j++) {\r
-      for (k = 0; k < 4; k++) {\r
-        for (l = 0; l < 3; l++) {\r
-          p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];\r
-          q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l];\r
-          if (l == 1)\r
-            q[j][k][l] *= -1.0;\r
-          if (i < 6) {\r
-            r[j][k][l] =\r
-              cpdata[patchdata[i][j * 4 + (3 - k)]][l];\r
-            if (l == 0)\r
-              r[j][k][l] *= -1.0;\r
-            s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];\r
-            if (l == 0)\r
-              s[j][k][l] *= -1.0;\r
-            if (l == 1)\r
-              s[j][k][l] *= -1.0;\r
-          }\r
-        }\r
-      }\r
-    }\r
-    glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2,\r
-      &tex[0][0][0]);\r
-    glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,\r
-      &p[0][0][0]);\r
-    glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0);\r
-    glEvalMesh2(type, 0, grid, 0, grid);\r
-    glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,\r
-      &q[0][0][0]);\r
-    glEvalMesh2(type, 0, grid, 0, grid);\r
-    if (i < 6) {\r
-      glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,\r
-        &r[0][0][0]);\r
-      glEvalMesh2(type, 0, grid, 0, grid);\r
-      glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,\r
-        &s[0][0][0]);\r
-      glEvalMesh2(type, 0, grid, 0, grid);\r
-    }\r
-  }\r
-  glPopMatrix();\r
-  glPopAttrib();\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutSolidTeapot(GLdouble scale)\r
-{\r
-  teapot(7, scale, GL_FILL);\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutWireTeapot(GLdouble scale)\r
-{\r
-  teapot(10, scale, GL_LINE);\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/**
+(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.
+*/
+
+#include "glutint.h"
+
+/* Rim, body, lid, and bottom data must be reflected in x and
+   y; handle and spout data across the y axis only.  */
+
+static int patchdata[][16] =
+{
+    /* rim */
+  {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11,
+    12, 13, 14, 15},
+    /* body */
+  {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+    24, 25, 26, 27},
+  {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36,
+    37, 38, 39, 40},
+    /* lid */
+  {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101,
+    101, 0, 1, 2, 3,},
+  {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112,
+    113, 114, 115, 116, 117},
+    /* bottom */
+  {118, 118, 118, 118, 124, 122, 119, 121, 123, 126,
+    125, 120, 40, 39, 38, 37},
+    /* handle */
+  {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+    53, 54, 55, 56},
+  {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+    28, 65, 66, 67},
+    /* spout */
+  {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+    80, 81, 82, 83},
+  {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+    92, 93, 94, 95}
+};
+/* *INDENT-OFF* */
+
+static float cpdata[][3] =
+{
+    {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0,
+    -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125},
+    {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375,
+    0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375,
+    2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84,
+    2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875},
+    {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75,
+    1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35},
+    {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2,
+    0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12,
+    0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225},
+    {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225},
+    {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0,
+    -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5,
+    -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3,
+    2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0,
+    2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0,
+    2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8},
+    {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3,
+    -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3,
+    1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2,
+    -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0,
+    1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0,
+    0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66,
+    0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1},
+    {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7,
+    -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0,
+    2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375},
+    {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475},
+    {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4},
+    {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0,
+    3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8,
+    3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4,
+    -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0,
+    2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4,
+    2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3,
+    2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4},
+    {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425,
+    -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425,
+    0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075},
+    {0.84, -1.5, 0.075}
+};
+
+static float tex[2][2][2] =
+{
+  { {0, 0},
+    {1, 0}},
+  { {0, 1},
+    {1, 1}}
+};
+
+/* *INDENT-ON* */
+
+static void
+teapot(GLint grid, GLdouble scale, GLenum type)
+{
+  float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];
+  long i, j, k, l;
+
+  glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT);
+  glEnable(GL_AUTO_NORMAL);
+  glEnable(GL_NORMALIZE);
+  glEnable(GL_MAP2_VERTEX_3);
+  glEnable(GL_MAP2_TEXTURE_COORD_2);
+  glPushMatrix();
+  glRotatef(270.0, 1.0, 0.0, 0.0);
+  glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale);
+  glTranslatef(0.0, 0.0, -1.5);
+  for (i = 0; i < 10; i++) {
+    for (j = 0; j < 4; j++) {
+      for (k = 0; k < 4; k++) {
+        for (l = 0; l < 3; l++) {
+          p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
+          q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l];
+          if (l == 1)
+            q[j][k][l] *= -1.0;
+          if (i < 6) {
+            r[j][k][l] =
+              cpdata[patchdata[i][j * 4 + (3 - k)]][l];
+            if (l == 0)
+              r[j][k][l] *= -1.0;
+            s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
+            if (l == 0)
+              s[j][k][l] *= -1.0;
+            if (l == 1)
+              s[j][k][l] *= -1.0;
+          }
+        }
+      }
+    }
+    glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2,
+      &tex[0][0][0]);
+    glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
+      &p[0][0][0]);
+    glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0);
+    glEvalMesh2(type, 0, grid, 0, grid);
+    glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
+      &q[0][0][0]);
+    glEvalMesh2(type, 0, grid, 0, grid);
+    if (i < 6) {
+      glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
+        &r[0][0][0]);
+      glEvalMesh2(type, 0, grid, 0, grid);
+      glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
+        &s[0][0][0]);
+      glEvalMesh2(type, 0, grid, 0, grid);
+    }
+  }
+  glPopMatrix();
+  glPopAttrib();
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutSolidTeapot(GLdouble scale)
+{
+  teapot(7, scale, GL_FILL);
+}
+
+void GLUTAPIENTRY
+glutWireTeapot(GLdouble scale)
+{
+  teapot(10, scale, GL_LINE);
+}
+
+/* ENDCENTRY */
index 9e1234644d7d393198529e074ee83ce9216710e1..a3cbf4b62b60ec40312ee4659791a8c46f9ffe2d 100644 (file)
-\r
-/* GENERATED FILE -- DO NOT MODIFY */\r
-\r
-#define glutBitmapTimesRoman24 XXX\r
-#include "glutbitmap.h"\r
-#undef glutBitmapTimesRoman24\r
-\r
-/* char: 0xff */\r
-\r
-static const GLubyte ch255data[] = {\r
-0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0,\r
-0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0,\r
-0xf1,0xe0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch255 = {11,21,0,5,11,ch255data};\r
-\r
-/* char: 0xfe */\r
-\r
-static const GLubyte ch254data[] = {\r
-0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80,\r
-0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0xe0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch254 = {10,22,-1,5,12,ch254data};\r
-\r
-/* char: 0xfd */\r
-\r
-static const GLubyte ch253data[] = {\r
-0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0,\r
-0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0,\r
-0xf1,0xe0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch253 = {11,22,0,5,11,ch253data};\r
-\r
-/* char: 0xfc */\r
-\r
-static const GLubyte ch252data[] = {\r
-0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch252 = {11,16,-1,0,13,ch252data};\r
-\r
-/* char: 0xfb */\r
-\r
-static const GLubyte ch251data[] = {\r
-0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0,\r
-0xc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch251 = {11,17,-1,0,13,ch251data};\r
-\r
-/* char: 0xfa */\r
-\r
-static const GLubyte ch250data[] = {\r
-0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,\r
-0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch250 = {11,17,-1,0,13,ch250data};\r
-\r
-/* char: 0xf9 */\r
-\r
-static const GLubyte ch249data[] = {\r
-0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0,\r
-0x30,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch249 = {11,17,-1,0,13,ch249data};\r
-\r
-/* char: 0xf8 */\r
-\r
-static const GLubyte ch248data[] = {\r
-0xc0,0x0,0xde,0x0,0x73,0x80,0x71,0x80,0xd0,0xc0,0xd8,0xc0,0xc8,0xc0,0xcc,0xc0,\r
-0xc4,0xc0,0xc6,0xc0,0x63,0x80,0x73,0x80,0x1e,0xc0,0x0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch248 = {10,14,-1,1,12,ch248data};\r
-\r
-/* char: 0xf7 */\r
-\r
-static const GLubyte ch247data[] = {\r
-0x6,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,\r
-0x6,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch247 = {12,10,-1,-2,14,ch247data};\r
-\r
-/* char: 0xf6 */\r
-\r
-static const GLubyte ch246data[] = {\r
-0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch246 = {10,16,-1,0,12,ch246data};\r
-\r
-/* char: 0xf5 */\r
-\r
-static const GLubyte ch245data[] = {\r
-0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch245 = {10,16,-1,0,12,ch245data};\r
-\r
-/* char: 0xf4 */\r
-\r
-static const GLubyte ch244data[] = {\r
-0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0,\r
-0xc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch244 = {10,17,-1,0,12,ch244data};\r
-\r
-/* char: 0xf3 */\r
-\r
-static const GLubyte ch243data[] = {\r
-0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,\r
-0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch243 = {10,17,-1,0,12,ch243data};\r
-\r
-/* char: 0xf2 */\r
-\r
-static const GLubyte ch242data[] = {\r
-0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0,\r
-0x30,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch242 = {10,17,-1,0,12,ch242data};\r
-\r
-/* char: 0xf1 */\r
-\r
-static const GLubyte ch241data[] = {\r
-0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch241 = {11,16,-1,0,13,ch241data};\r
-\r
-/* char: 0xf0 */\r
-\r
-static const GLubyte ch240data[] = {\r
-0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0x61,0x80,0x73,0x80,0x1f,0x0,0xc6,0x0,0x3c,0x0,0x1e,0x0,0x71,0x80,\r
-0xc0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch240 = {10,17,-1,0,12,ch240data};\r
-\r
-/* char: 0xef */\r
-\r
-static const GLubyte ch239data[] = {\r
-0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x0,0xcc,0xcc,\r
-};\r
-\r
-static const BitmapCharRec ch239 = {6,16,0,0,6,ch239data};\r
-\r
-/* char: 0xee */\r
-\r
-static const GLubyte ch238data[] = {\r
-0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x84,0x48,0x78,\r
-0x30,\r
-};\r
-\r
-static const BitmapCharRec ch238 = {6,17,0,0,6,ch238data};\r
-\r
-/* char: 0xed */\r
-\r
-static const GLubyte ch237data[] = {\r
-0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x80,0x60,0x38,\r
-0x18,\r
-};\r
-\r
-static const BitmapCharRec ch237 = {5,17,-1,0,6,ch237data};\r
-\r
-/* char: 0xec */\r
-\r
-static const GLubyte ch236data[] = {\r
-0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x8,0x30,0xe0,\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch236 = {5,17,0,0,6,ch236data};\r
-\r
-/* char: 0xeb */\r
-\r
-static const GLubyte ch235data[] = {\r
-0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,\r
-0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch235 = {9,16,-1,0,11,ch235data};\r
-\r
-/* char: 0xea */\r
-\r
-static const GLubyte ch234data[] = {\r
-0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,\r
-0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0,\r
-0xc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch234 = {9,17,-1,0,11,ch234data};\r
-\r
-/* char: 0xe9 */\r
-\r
-static const GLubyte ch233data[] = {\r
-0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,\r
-0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0,\r
-0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch233 = {9,17,-1,0,11,ch233data};\r
-\r
-/* char: 0xe8 */\r
-\r
-static const GLubyte ch232data[] = {\r
-0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,\r
-0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0,\r
-0x60,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch232 = {9,17,-1,0,11,ch232data};\r
-\r
-/* char: 0xe7 */\r
-\r
-static const GLubyte ch231data[] = {\r
-0x3c,0x0,0x66,0x0,0x6,0x0,0x1e,0x0,0x18,0x0,0x8,0x0,0x1e,0x0,0x7f,0x0,\r
-0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x41,0x80,\r
-0x63,0x80,0x1f,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch231 = {9,18,-1,6,11,ch231data};\r
-\r
-/* char: 0xe6 */\r
-\r
-static const GLubyte ch230data[] = {\r
-0x70,0xf0,0xfb,0xf8,0xc7,0x84,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0xfc,\r
-0x3,0xc,0x63,0xc,0x67,0x98,0x3c,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch230 = {14,12,-1,0,16,ch230data};\r
-\r
-/* char: 0xe5 */\r
-\r
-static const GLubyte ch229data[] = {\r
-0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,\r
-0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x22,0x0,\r
-0x1c,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch229 = {9,17,-1,0,11,ch229data};\r
-\r
-/* char: 0xe4 */\r
-\r
-static const GLubyte ch228data[] = {\r
-0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,\r
-0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x66,0x0,0x66,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch228 = {9,16,-1,0,11,ch228data};\r
-\r
-/* char: 0xe3 */\r
-\r
-static const GLubyte ch227data[] = {\r
-0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,\r
-0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x5c,0x0,0x3a,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch227 = {9,16,-1,0,11,ch227data};\r
-\r
-/* char: 0xe2 */\r
-\r
-static const GLubyte ch226data[] = {\r
-0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,\r
-0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x42,0x0,0x24,0x0,0x3c,0x0,\r
-0x18,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch226 = {9,17,-1,0,11,ch226data};\r
-\r
-/* char: 0xe1 */\r
-\r
-static const GLubyte ch225data[] = {\r
-0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,\r
-0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0,\r
-0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch225 = {9,17,-1,0,11,ch225data};\r
-\r
-/* char: 0xe0 */\r
-\r
-static const GLubyte ch224data[] = {\r
-0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,\r
-0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0,\r
-0x60,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch224 = {9,17,-1,0,11,ch224data};\r
-\r
-/* char: 0xdf */\r
-\r
-static const GLubyte ch223data[] = {\r
-0xe7,0x0,0x6c,0x80,0x6c,0xc0,0x60,0xc0,0x60,0xc0,0x61,0xc0,0x61,0x80,0x63,0x80,\r
-0x67,0x0,0x6c,0x0,0x63,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0,\r
-0x1e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch223 = {10,17,-1,0,12,ch223data};\r
-\r
-/* char: 0xde */\r
-\r
-static const GLubyte ch222data[] = {\r
-0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,\r
-0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,0x3f,0xc0,0x30,0x0,0x30,0x0,0x30,0x0,\r
-0xfc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch222 = {13,17,-1,0,15,ch222data};\r
-\r
-/* char: 0xdd */\r
-\r
-static const GLubyte ch221data[] = {\r
-0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0,\r
-0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc,\r
-0xfc,0x3f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch221 = {16,22,0,0,16,ch221data};\r
-\r
-/* char: 0xdc */\r
-\r
-static const GLubyte ch220data[] = {\r
-0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0xfc,0x1f,0x0,0x0,0x0,0x0,0x6,0x30,0x6,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch220 = {16,21,-1,0,18,ch220data};\r
-\r
-/* char: 0xdb */\r
-\r
-static const GLubyte ch219data[] = {\r
-0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0xfc,0x1f,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch219 = {16,22,-1,0,18,ch219data};\r
-\r
-/* char: 0xda */\r
-\r
-static const GLubyte ch218data[] = {\r
-0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0xfc,0x1f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch218 = {16,22,-1,0,18,ch218data};\r
-\r
-/* char: 0xd9 */\r
-\r
-static const GLubyte ch217data[] = {\r
-0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0xfc,0x1f,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch217 = {16,22,-1,0,18,ch217data};\r
-\r
-/* char: 0xd8 */\r
-\r
-static const GLubyte ch216data[] = {\r
-0x20,0x0,0x27,0xe0,0x1c,0x38,0x38,0x1c,0x68,0x6,0x64,0x6,0xc2,0x3,0xc2,0x3,\r
-0xc1,0x3,0xc1,0x3,0xc0,0x83,0xc0,0x83,0xc0,0x43,0x60,0x46,0x60,0x26,0x38,0x1c,\r
-0x1c,0x38,0x7,0xe4,0x0,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch216 = {16,19,-1,1,18,ch216data};\r
-\r
-/* char: 0xd7 */\r
-\r
-static const GLubyte ch215data[] = {\r
-0x80,0x40,0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,\r
-0x61,0x80,0xc0,0xc0,0x80,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch215 = {10,11,-2,-1,14,ch215data};\r
-\r
-/* char: 0xd6 */\r
-\r
-static const GLubyte ch214data[] = {\r
-0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,\r
-0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,\r
-0x7,0xe0,0x0,0x0,0x0,0x0,0x6,0x60,0x6,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch214 = {16,21,-1,0,18,ch214data};\r
-\r
-/* char: 0xd5 */\r
-\r
-static const GLubyte ch213data[] = {\r
-0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,\r
-0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,\r
-0x7,0xe0,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch213 = {16,21,-1,0,18,ch213data};\r
-\r
-/* char: 0xd4 */\r
-\r
-static const GLubyte ch212data[] = {\r
-0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,\r
-0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,\r
-0x7,0xe0,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch212 = {16,22,-1,0,18,ch212data};\r
-\r
-/* char: 0xd3 */\r
-\r
-static const GLubyte ch211data[] = {\r
-0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,\r
-0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,\r
-0x7,0xe0,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch211 = {16,22,-1,0,18,ch211data};\r
-\r
-/* char: 0xd2 */\r
-\r
-static const GLubyte ch210data[] = {\r
-0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,\r
-0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,\r
-0x7,0xe0,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch210 = {16,22,-1,0,18,ch210data};\r
-\r
-/* char: 0xd1 */\r
-\r
-static const GLubyte ch209data[] = {\r
-0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84,\r
-0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4,\r
-0xf0,0x1f,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90,\r
-};\r
-\r
-static const BitmapCharRec ch209 = {16,21,-1,0,18,ch209data};\r
-\r
-/* char: 0xd0 */\r
-\r
-static const GLubyte ch208data[] = {\r
-0x7f,0xe0,0x18,0x38,0x18,0x1c,0x18,0x6,0x18,0x6,0x18,0x3,0x18,0x3,0x18,0x3,\r
-0xff,0x3,0x18,0x3,0x18,0x3,0x18,0x3,0x18,0x6,0x18,0x6,0x18,0x1c,0x18,0x38,\r
-0x7f,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch208 = {16,17,0,0,17,ch208data};\r
-\r
-/* char: 0xcf */\r
-\r
-static const GLubyte ch207data[] = {\r
-0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,\r
-0xfc,0x0,0x0,0xcc,0xcc,\r
-};\r
-\r
-static const BitmapCharRec ch207 = {6,21,-1,0,8,ch207data};\r
-\r
-/* char: 0xce */\r
-\r
-static const GLubyte ch206data[] = {\r
-0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,\r
-0x7e,0x0,0x81,0x66,0x3c,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch206 = {8,22,-1,0,8,ch206data};\r
-\r
-/* char: 0xcd */\r
-\r
-static const GLubyte ch205data[] = {\r
-0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,\r
-0xfc,0x0,0x40,0x30,0x1c,0xc,\r
-};\r
-\r
-static const BitmapCharRec ch205 = {6,22,-1,0,8,ch205data};\r
-\r
-/* char: 0xcc */\r
-\r
-static const GLubyte ch204data[] = {\r
-0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,\r
-0xfc,0x0,0x8,0x30,0xe0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch204 = {6,22,-1,0,8,ch204data};\r
-\r
-/* char: 0xcb */\r
-\r
-static const GLubyte ch203data[] = {\r
-0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,\r
-0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,\r
-0xff,0xf0,0x0,0x0,0x0,0x0,0x19,0x80,0x19,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch203 = {13,21,-1,0,15,ch203data};\r
-\r
-/* char: 0xca */\r
-\r
-static const GLubyte ch202data[] = {\r
-0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,\r
-0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,\r
-0xff,0xf0,0x0,0x0,0x10,0x20,0xc,0xc0,0x7,0x80,0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch202 = {13,22,-1,0,15,ch202data};\r
-\r
-/* char: 0xc9 */\r
-\r
-static const GLubyte ch201data[] = {\r
-0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,\r
-0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,\r
-0xff,0xf0,0x0,0x0,0x4,0x0,0x3,0x0,0x1,0xc0,0x0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch201 = {13,22,-1,0,15,ch201data};\r
-\r
-/* char: 0xc8 */\r
-\r
-static const GLubyte ch200data[] = {\r
-0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,\r
-0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,\r
-0xff,0xf0,0x0,0x0,0x1,0x0,0x6,0x0,0x1c,0x0,0x18,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch200 = {13,22,-1,0,15,ch200data};\r
-\r
-/* char: 0xc7 */\r
-\r
-static const GLubyte ch199data[] = {\r
-0x7,0x80,0xc,0xc0,0x0,0xc0,0x3,0xc0,0x3,0x0,0x1,0x0,0x7,0xe0,0x1e,0x38,\r
-0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,\r
-0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,0x7,0xe4,\r
-};\r
-\r
-static const BitmapCharRec ch199 = {14,23,-1,6,16,ch199data};\r
-\r
-/* char: 0xc6 */\r
-\r
-static const GLubyte ch198data[] = {\r
-0xf9,0xff,0xf0,0x30,0x60,0x30,0x10,0x60,0x10,0x10,0x60,0x10,0x18,0x60,0x0,0x8,\r
-0x60,0x0,0xf,0xe0,0x80,0xc,0x60,0x80,0x4,0x7f,0x80,0x4,0x60,0x80,0x6,0x60,\r
-0x80,0x2,0x60,0x0,0x2,0x60,0x0,0x1,0x60,0x20,0x1,0x60,0x20,0x1,0xe0,0x60,\r
-0x3,0xff,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch198 = {20,17,0,0,21,ch198data};\r
-\r
-/* char: 0xc5 */\r
-\r
-static const GLubyte ch197data[] = {\r
-0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,\r
-0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,\r
-0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,\r
-0x0,0x80,0x0,0x1,0xc0,0x0,0x2,0x20,0x0,0x2,0x20,0x0,0x1,0xc0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch197 = {17,21,0,0,17,ch197data};\r
-\r
-/* char: 0xc4 */\r
-\r
-static const GLubyte ch196data[] = {\r
-0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,\r
-0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,\r
-0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,\r
-0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x30,0x0,0x6,0x30,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch196 = {17,21,0,0,17,ch196data};\r
-\r
-/* char: 0xc3 */\r
-\r
-static const GLubyte ch195data[] = {\r
-0xfc,0x1f,0x80,0x30,0x7,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,\r
-0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,\r
-0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,\r
-0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0xe0,0x0,0x3,0x90,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch195 = {17,21,0,0,17,ch195data};\r
-\r
-/* char: 0xc2 */\r
-\r
-static const GLubyte ch194data[] = {\r
-0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,\r
-0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,\r
-0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,\r
-0x0,0x80,0x0,0x0,0x0,0x0,0x8,0x10,0x0,0x6,0x60,0x0,0x3,0xc0,0x0,0x1,\r
-0x80,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch194 = {17,22,0,0,17,ch194data};\r
-\r
-/* char: 0xc1 */\r
-\r
-static const GLubyte ch193data[] = {\r
-0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,\r
-0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,\r
-0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,\r
-0x0,0x80,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xc0,0x0,0x0,0x70,0x0,0x0,\r
-0x30,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch193 = {17,22,0,0,17,ch193data};\r
-\r
-/* char: 0xc0 */\r
-\r
-static const GLubyte ch192data[] = {\r
-0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,\r
-0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,\r
-0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,\r
-0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0xc0,0x0,0x3,0x80,0x0,0x3,\r
-0x0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch192 = {17,22,0,0,17,ch192data};\r
-\r
-/* char: 0xbf */\r
-\r
-static const GLubyte ch191data[] = {\r
-0x3e,0x63,0xc1,0xc3,0xc3,0xe0,0x70,0x30,0x38,0x18,0x18,0x8,0x8,0x0,0x0,0xc,\r
-0xc,\r
-};\r
-\r
-static const BitmapCharRec ch191 = {8,17,-1,5,11,ch191data};\r
-\r
-/* char: 0xbe */\r
-\r
-static const GLubyte ch190data[] = {\r
-0x18,0x2,0x0,0x8,0x2,0x0,0xc,0x7f,0x80,0x4,0x22,0x0,0x6,0x32,0x0,0x3,\r
-0x12,0x0,0x1,0xa,0x0,0x71,0x8e,0x0,0x88,0x86,0x0,0x8c,0xc2,0x0,0xc,0x60,\r
-0x0,0x8,0x20,0x0,0x30,0x30,0x0,0x8,0x10,0x0,0x8c,0x18,0x0,0x4c,0xc,0x0,\r
-0x38,0x4,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch190 = {17,17,0,0,18,ch190data};\r
-\r
-/* char: 0xbd */\r
-\r
-static const GLubyte ch189data[] = {\r
-0x30,0x7e,0x10,0x22,0x18,0x10,0x8,0x18,0xc,0x8,0x6,0x4,0x2,0x6,0xfb,0x46,\r
-0x21,0x26,0x21,0x9c,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18,\r
-0x20,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch189 = {15,17,-1,0,18,ch189data};\r
-\r
-/* char: 0xbc */\r
-\r
-static const GLubyte ch188data[] = {\r
-0x30,0x4,0x10,0x4,0x18,0xff,0x8,0x44,0xc,0x64,0x6,0x24,0x2,0x14,0xfb,0x1c,\r
-0x21,0xc,0x21,0x84,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18,\r
-0x20,0x8,\r
-};\r
-\r
-static const BitmapCharRec ch188 = {16,17,-1,0,18,ch188data};\r
-\r
-/* char: 0xbb */\r
-\r
-static const GLubyte ch187data[] = {\r
-0x88,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,0x19,0x80,0x19,0x80,0x33,0x0,0x66,0x0,\r
-0xcc,0x0,0x88,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch187 = {9,10,-2,-1,12,ch187data};\r
-\r
-/* char: 0xba */\r
-\r
-static const GLubyte ch186data[] = {\r
-0xfc,0x0,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch186 = {6,9,-1,-8,8,ch186data};\r
-\r
-/* char: 0xb9 */\r
-\r
-static const GLubyte ch185data[] = {\r
-0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch185 = {5,10,-1,-7,7,ch185data};\r
-\r
-/* char: 0xb8 */\r
-\r
-static const GLubyte ch184data[] = {\r
-0x78,0xcc,0xc,0x3c,0x30,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch184 = {6,6,-1,6,8,ch184data};\r
-\r
-/* char: 0xb7 */\r
-\r
-static const GLubyte ch183data[] = {\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch183 = {2,2,-2,-6,6,ch183data};\r
-\r
-/* char: 0xb6 */\r
-\r
-static const GLubyte ch182data[] = {\r
-0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,\r
-0x9,0x0,0x9,0x0,0x9,0x0,0x19,0x0,0x39,0x0,0x79,0x0,0x79,0x0,0xf9,0x0,\r
-0xf9,0x0,0xf9,0x0,0x79,0x0,0x79,0x0,0x39,0x0,0x1f,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch182 = {9,22,-1,5,11,ch182data};\r
-\r
-/* char: 0xb5 */\r
-\r
-static const GLubyte ch181data[] = {\r
-0x40,0x0,0xe0,0x0,0xc0,0x0,0x40,0x0,0x40,0x0,0x5c,0xe0,0x7e,0xc0,0x71,0xc0,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0xe1,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch181 = {11,17,-1,5,13,ch181data};\r
-\r
-/* char: 0xb4 */\r
-\r
-static const GLubyte ch180data[] = {\r
-0x80,0x60,0x38,0x18,\r
-};\r
-\r
-static const BitmapCharRec ch180 = {5,4,-2,-13,8,ch180data};\r
-\r
-/* char: 0xb3 */\r
-\r
-static const GLubyte ch179data[] = {\r
-0x70,0x88,0x8c,0xc,0x8,0x30,0x8,0x8c,0x4c,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch179 = {6,10,0,-7,7,ch179data};\r
-\r
-/* char: 0xb2 */\r
-\r
-static const GLubyte ch178data[] = {\r
-0xfc,0x44,0x20,0x30,0x10,0x8,0xc,0x8c,0x4c,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch178 = {6,10,0,-7,7,ch178data};\r
-\r
-/* char: 0xb1 */\r
-\r
-static const GLubyte ch177data[] = {\r
-0xff,0xf0,0xff,0xf0,0x0,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,\r
-0xff,0xf0,0xff,0xf0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch177 = {12,15,-1,0,14,ch177data};\r
-\r
-/* char: 0xb0 */\r
-\r
-static const GLubyte ch176data[] = {\r
-0x38,0x44,0x82,0x82,0x82,0x44,0x38,\r
-};\r
-\r
-static const BitmapCharRec ch176 = {7,7,-1,-10,9,ch176data};\r
-\r
-/* char: 0xaf */\r
-\r
-static const GLubyte ch175data[] = {\r
-0xfc,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch175 = {6,2,-1,-14,8,ch175data};\r
-\r
-/* char: 0xae */\r
-\r
-static const GLubyte ch174data[] = {\r
-0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x60,0x3,0x0,0x47,0x19,0x0,0xc2,\r
-0x31,0x80,0x82,0x20,0x80,0x82,0x40,0x80,0x83,0xe0,0x80,0x82,0x30,0x80,0x82,0x10,\r
-0x80,0xc2,0x11,0x80,0x42,0x31,0x0,0x67,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0,\r
-0x7,0xf0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch174 = {17,17,-1,0,19,ch174data};\r
-\r
-/* char: 0xad */\r
-\r
-static const GLubyte ch173data[] = {\r
-0xfe,0xfe,\r
-};\r
-\r
-static const BitmapCharRec ch173 = {7,2,-1,-5,9,ch173data};\r
-\r
-/* char: 0xac */\r
-\r
-static const GLubyte ch172data[] = {\r
-0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0xff,0xf0,0xff,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch172 = {12,7,-1,-3,14,ch172data};\r
-\r
-/* char: 0xab */\r
-\r
-static const GLubyte ch171data[] = {\r
-0x8,0x80,0x19,0x80,0x33,0x0,0x66,0x0,0xcc,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,\r
-0x19,0x80,0x8,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch171 = {9,10,-2,-1,13,ch171data};\r
-\r
-/* char: 0xaa */\r
-\r
-static const GLubyte ch170data[] = {\r
-0x7e,0x0,0x76,0xcc,0xcc,0x7c,0xc,0xcc,0x78,\r
-};\r
-\r
-static const BitmapCharRec ch170 = {7,9,0,-8,8,ch170data};\r
-\r
-/* char: 0xa9 */\r
-\r
-static const GLubyte ch169data[] = {\r
-0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x61,0xc3,0x0,0x47,0x71,0x0,0xc4,\r
-0x19,0x80,0x8c,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x8c,0x0,\r
-0x80,0xc4,0x19,0x80,0x47,0x31,0x0,0x61,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0,\r
-0x7,0xf0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch169 = {17,17,-1,0,19,ch169data};\r
-\r
-/* char: 0xa8 */\r
-\r
-static const GLubyte ch168data[] = {\r
-0xcc,0xcc,\r
-};\r
-\r
-static const BitmapCharRec ch168 = {6,2,-1,-14,8,ch168data};\r
-\r
-/* char: 0xa7 */\r
-\r
-static const GLubyte ch167data[] = {\r
-0x38,0x64,0x62,0x6,0xe,0x1c,0x38,0x74,0xe2,0xc3,0x83,0x87,0x4e,0x3c,0x38,0x70,\r
-0x60,0x46,0x26,0x1c,\r
-};\r
-\r
-static const BitmapCharRec ch167 = {8,20,-2,2,12,ch167data};\r
-\r
-/* char: 0xa6 */\r
-\r
-static const GLubyte ch166data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch166 = {2,17,-2,0,6,ch166data};\r
-\r
-/* char: 0xa5 */\r
-\r
-static const GLubyte ch165data[] = {\r
-0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x1f,0xe0,0x3,0x0,0x1f,0xe0,\r
-0x3,0x0,0x7,0x80,0xc,0x80,0xc,0xc0,0x18,0x40,0x18,0x60,0x30,0x20,0x70,0x30,\r
-0xf8,0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch165 = {14,17,0,0,14,ch165data};\r
-\r
-/* char: 0xa4 */\r
-\r
-static const GLubyte ch164data[] = {\r
-0xc0,0x60,0xee,0xe0,0x7f,0xc0,0x31,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x31,0x80,0x7f,0xc0,0xee,0xe0,0xc0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch164 = {11,12,-1,-3,13,ch164data};\r
-\r
-/* char: 0xa3 */\r
-\r
-static const GLubyte ch163data[] = {\r
-0xe7,0x80,0xbe,0xc0,0x78,0x40,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,\r
-0x30,0x0,0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x31,0x80,0x19,0x80,\r
-0xf,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch163 = {10,17,-1,0,12,ch163data};\r
-\r
-/* char: 0xa2 */\r
-\r
-static const GLubyte ch162data[] = {\r
-0x40,0x0,0x40,0x0,0x3e,0x0,0x7f,0x0,0x70,0x80,0xd0,0x0,0xc8,0x0,0xc8,0x0,\r
-0xc8,0x0,0xc4,0x0,0xc4,0x0,0x43,0x80,0x63,0x80,0x1f,0x0,0x1,0x0,0x1,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch162 = {9,16,-1,2,12,ch162data};\r
-\r
-/* char: 0xa1 */\r
-\r
-static const GLubyte ch161data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch161 = {2,17,-4,5,8,ch161data};\r
-\r
-/* char: 0xa0 */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch160data[] = { 0x0 };\r
-static const BitmapCharRec ch160 = {1,1,0,0,6,ch160data};\r
-#else\r
-static const BitmapCharRec ch160 = {0,0,0,0,6,0};\r
-#endif\r
-\r
-/* char: 0x7e '~' */\r
-\r
-static const GLubyte ch126data[] = {\r
-0x83,0x80,0xc7,0xc0,0x7c,0x60,0x38,0x20,\r
-};\r
-\r
-static const BitmapCharRec ch126 = {11,4,-1,-5,13,ch126data};\r
-\r
-/* char: 0x7d '}' */\r
-\r
-static const GLubyte ch125data[] = {\r
-0xe0,0x30,0x18,0x18,0x18,0x18,0x18,0x18,0x8,0xc,0x4,0x3,0x4,0xc,0x8,0x18,\r
-0x18,0x18,0x18,0x18,0x30,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch125 = {8,22,-1,5,10,ch125data};\r
-\r
-/* char: 0x7c '|' */\r
-\r
-static const GLubyte ch124data[] = {\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch124 = {2,17,-2,0,6,ch124data};\r
-\r
-/* char: 0x7b '{' */\r
-\r
-static const GLubyte ch123data[] = {\r
-0x7,0xc,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x30,0x20,0xc0,0x20,0x30,0x10,0x18,\r
-0x18,0x18,0x18,0x18,0xc,0x7,\r
-};\r
-\r
-static const BitmapCharRec ch123 = {8,22,-1,5,10,ch123data};\r
-\r
-/* char: 0x7a 'z' */\r
-\r
-static const GLubyte ch122data[] = {\r
-0xff,0xc3,0x61,0x70,0x30,0x38,0x18,0x1c,0xe,0x86,0xc3,0xff,\r
-};\r
-\r
-static const BitmapCharRec ch122 = {8,12,-1,0,10,ch122data};\r
-\r
-/* char: 0x79 'y' */\r
-\r
-static const GLubyte ch121data[] = {\r
-0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0,\r
-0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0,\r
-0xf1,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch121 = {11,17,0,5,11,ch121data};\r
-\r
-/* char: 0x78 'x' */\r
-\r
-static const GLubyte ch120data[] = {\r
-0xf1,0xe0,0x60,0xc0,0x21,0x80,0x33,0x80,0x1b,0x0,0xe,0x0,0xc,0x0,0x1a,0x0,\r
-0x39,0x0,0x31,0x80,0x60,0xc0,0xf1,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch120 = {11,12,-1,0,13,ch120data};\r
-\r
-/* char: 0x77 'w' */\r
-\r
-static const GLubyte ch119data[] = {\r
-0x4,0x10,0x0,0xe,0x38,0x0,0xe,0x38,0x0,0x1a,0x28,0x0,0x1a,0x64,0x0,0x19,\r
-0x64,0x0,0x31,0x64,0x0,0x30,0xc2,0x0,0x30,0xc2,0x0,0x60,0xc2,0x0,0x60,0xc3,\r
-0x0,0xf1,0xe7,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch119 = {17,12,0,0,17,ch119data};\r
-\r
-/* char: 0x76 'v' */\r
-\r
-static const GLubyte ch118data[] = {\r
-0x4,0x0,0xe,0x0,0xe,0x0,0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,\r
-0x30,0x80,0x60,0x80,0x60,0xc0,0xf1,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch118 = {11,12,0,0,11,ch118data};\r
-\r
-/* char: 0x75 'u' */\r
-\r
-static const GLubyte ch117data[] = {\r
-0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch117 = {11,12,-1,0,13,ch117data};\r
-\r
-/* char: 0x74 't' */\r
-\r
-static const GLubyte ch116data[] = {\r
-0x1c,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x70,0x30,0x10,\r
-};\r
-\r
-static const BitmapCharRec ch116 = {7,15,0,0,7,ch116data};\r
-\r
-/* char: 0x73 's' */\r
-\r
-static const GLubyte ch115data[] = {\r
-0xf8,0xc6,0x83,0x3,0x7,0x1e,0x7c,0x70,0xe0,0xc2,0x66,0x3e,\r
-};\r
-\r
-static const BitmapCharRec ch115 = {8,12,-1,0,10,ch115data};\r
-\r
-/* char: 0x72 'r' */\r
-\r
-static const GLubyte ch114data[] = {\r
-0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x76,0x6e,0xe6,\r
-};\r
-\r
-static const BitmapCharRec ch114 = {7,12,-1,0,8,ch114data};\r
-\r
-/* char: 0x71 'q' */\r
-\r
-static const GLubyte ch113data[] = {\r
-0x3,0xc0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1d,0x80,0x73,0x80,0x61,0x80,\r
-0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x73,0x80,\r
-0x1d,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch113 = {10,17,-1,5,12,ch113data};\r
-\r
-/* char: 0x70 'p' */\r
-\r
-static const GLubyte ch112data[] = {\r
-0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80,\r
-0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80,\r
-0xee,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch112 = {10,17,-1,5,12,ch112data};\r
-\r
-/* char: 0x6f 'o' */\r
-\r
-static const GLubyte ch111data[] = {\r
-0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch111 = {10,12,-1,0,12,ch111data};\r
-\r
-/* char: 0x6e 'n' */\r
-\r
-static const GLubyte ch110data[] = {\r
-0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch110 = {11,12,-1,0,13,ch110data};\r
-\r
-/* char: 0x6d 'm' */\r
-\r
-static const GLubyte ch109data[] = {\r
-0xf1,0xe3,0xc0,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,\r
-0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x71,0xe3,0x80,0x6f,0x9f,\r
-0x0,0xe7,0xe,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch109 = {18,12,-1,0,20,ch109data};\r
-\r
-/* char: 0x6c 'l' */\r
-\r
-static const GLubyte ch108data[] = {\r
-0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,\r
-0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch108 = {4,17,-1,0,6,ch108data};\r
-\r
-/* char: 0x6b 'k' */\r
-\r
-static const GLubyte ch107data[] = {\r
-0xf3,0xe0,0x61,0xc0,0x63,0x80,0x67,0x0,0x6e,0x0,0x6c,0x0,0x78,0x0,0x68,0x0,\r
-0x64,0x0,0x66,0x0,0x63,0x0,0x67,0xc0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,\r
-0xe0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch107 = {11,17,-1,0,12,ch107data};\r
-\r
-/* char: 0x6a 'j' */\r
-\r
-static const GLubyte ch106data[] = {\r
-0xc0,0xe0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,\r
-0x70,0x0,0x0,0x0,0x30,0x30,\r
-};\r
-\r
-static const BitmapCharRec ch106 = {4,22,0,5,6,ch106data};\r
-\r
-/* char: 0x69 'i' */\r
-\r
-static const GLubyte ch105data[] = {\r
-0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x0,0x0,0x60,\r
-0x60,\r
-};\r
-\r
-static const BitmapCharRec ch105 = {4,17,-1,0,6,ch105data};\r
-\r
-/* char: 0x68 'h' */\r
-\r
-static const GLubyte ch104data[] = {\r
-0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x71,0xc0,0x6f,0x80,0x67,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,\r
-0xe0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch104 = {11,17,-1,0,13,ch104data};\r
-\r
-/* char: 0x67 'g' */\r
-\r
-static const GLubyte ch103data[] = {\r
-0x3f,0x0,0xf1,0xc0,0xc0,0x60,0xc0,0x20,0x60,0x60,0x3f,0xc0,0x7f,0x0,0x60,0x0,\r
-0x30,0x0,0x3e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0,\r
-0x1f,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch103 = {11,17,-1,5,12,ch103data};\r
-\r
-/* char: 0x66 'f' */\r
-\r
-static const GLubyte ch102data[] = {\r
-0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x30,0x30,0x30,0x16,\r
-0xe,\r
-};\r
-\r
-static const BitmapCharRec ch102 = {7,17,0,0,7,ch102data};\r
-\r
-/* char: 0x65 'e' */\r
-\r
-static const GLubyte ch101data[] = {\r
-0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,\r
-0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch101 = {9,12,-1,0,11,ch101data};\r
-\r
-/* char: 0x64 'd' */\r
-\r
-static const GLubyte ch100data[] = {\r
-0x1e,0xc0,0x73,0x80,0x61,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,\r
-0xc1,0x80,0x61,0x80,0x73,0x80,0x1d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,\r
-0x3,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch100 = {10,17,-1,0,12,ch100data};\r
-\r
-/* char: 0x63 'c' */\r
-\r
-static const GLubyte ch99data[] = {\r
-0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,\r
-0xc0,0x0,0x41,0x80,0x63,0x80,0x1f,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch99 = {9,12,-1,0,11,ch99data};\r
-\r
-/* char: 0x62 'b' */\r
-\r
-static const GLubyte ch98data[] = {\r
-0x5e,0x0,0x73,0x80,0x61,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,\r
-0x60,0xc0,0x61,0x80,0x73,0x80,0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,\r
-0xe0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch98 = {10,17,-1,0,12,ch98data};\r
-\r
-/* char: 0x61 'a' */\r
-\r
-static const GLubyte ch97data[] = {\r
-0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,\r
-0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch97 = {9,12,-1,0,11,ch97data};\r
-\r
-/* char: 0x60 '`' */\r
-\r
-static const GLubyte ch96data[] = {\r
-0x60,0xe0,0x80,0xc0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch96 = {3,5,-2,-12,7,ch96data};\r
-\r
-/* char: 0x5f '_' */\r
-\r
-static const GLubyte ch95data[] = {\r
-0xff,0xf8,0xff,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch95 = {13,2,0,5,13,ch95data};\r
-\r
-/* char: 0x5e '^' */\r
-\r
-static const GLubyte ch94data[] = {\r
-0x80,0x80,0xc1,0x80,0x41,0x0,0x63,0x0,0x22,0x0,0x36,0x0,0x14,0x0,0x1c,0x0,\r
-0x8,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch94 = {9,9,-1,-8,11,ch94data};\r
-\r
-/* char: 0x5d ']' */\r
-\r
-static const GLubyte ch93data[] = {\r
-0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,\r
-0x18,0x18,0x18,0x18,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch93 = {5,21,-1,4,8,ch93data};\r
-\r
-/* char: 0x5c '\' */\r
-\r
-static const GLubyte ch92data[] = {\r
-0x6,0x6,0x4,0xc,0xc,0x8,0x18,0x18,0x10,0x30,0x30,0x20,0x60,0x60,0x40,0xc0,\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch92 = {7,17,0,0,7,ch92data};\r
-\r
-/* char: 0x5b '[' */\r
-\r
-static const GLubyte ch91data[] = {\r
-0xf8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0xc0,0xc0,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch91 = {5,21,-2,4,8,ch91data};\r
-\r
-/* char: 0x5a 'Z' */\r
-\r
-static const GLubyte ch90data[] = {\r
-0xff,0xf8,0xe0,0x18,0x70,0x8,0x30,0x8,0x38,0x0,0x18,0x0,0x1c,0x0,0xe,0x0,\r
-0x6,0x0,0x7,0x0,0x3,0x0,0x3,0x80,0x1,0xc0,0x80,0xc0,0x80,0xe0,0xc0,0x70,\r
-0xff,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch90 = {13,17,-1,0,15,ch90data};\r
-\r
-/* char: 0x59 'Y' */\r
-\r
-static const GLubyte ch89data[] = {\r
-0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0,\r
-0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc,\r
-0xfc,0x3f,\r
-};\r
-\r
-static const BitmapCharRec ch89 = {16,17,0,0,16,ch89data};\r
-\r
-/* char: 0x58 'X' */\r
-\r
-static const GLubyte ch88data[] = {\r
-0xfc,0xf,0xc0,0x30,0x3,0x80,0x18,0x7,0x0,0x8,0xe,0x0,0x4,0xc,0x0,0x6,\r
-0x18,0x0,0x2,0x38,0x0,0x1,0x70,0x0,0x0,0xe0,0x0,0x0,0xc0,0x0,0x1,0xc0,\r
-0x0,0x3,0xa0,0x0,0x3,0x10,0x0,0x6,0x8,0x0,0xe,0xc,0x0,0x1c,0x6,0x0,\r
-0x7e,0xf,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch88 = {18,17,0,0,18,ch88data};\r
-\r
-/* char: 0x57 'W' */\r
-\r
-static const GLubyte ch87data[] = {\r
-0x1,0x83,0x0,0x1,0x83,0x0,0x1,0x83,0x80,0x3,0x87,0x80,0x3,0x46,0x80,0x3,\r
-0x46,0xc0,0x6,0x46,0x40,0x6,0x4c,0x40,0x6,0x4c,0x60,0xc,0x2c,0x60,0xc,0x2c,\r
-0x20,0x18,0x2c,0x20,0x18,0x18,0x30,0x18,0x18,0x10,0x30,0x18,0x10,0x30,0x18,0x18,\r
-0xfc,0x7e,0x7e,\r
-};\r
-\r
-static const BitmapCharRec ch87 = {23,17,0,0,23,ch87data};\r
-\r
-/* char: 0x56 'V' */\r
-\r
-static const GLubyte ch86data[] = {\r
-0x1,0x80,0x0,0x1,0x80,0x0,0x1,0x80,0x0,0x3,0xc0,0x0,0x3,0x40,0x0,0x3,\r
-0x60,0x0,0x6,0x20,0x0,0x6,0x20,0x0,0x6,0x30,0x0,0xc,0x10,0x0,0xc,0x18,\r
-0x0,0x18,0x8,0x0,0x18,0x8,0x0,0x18,0xc,0x0,0x30,0x4,0x0,0x30,0x6,0x0,\r
-0xfc,0x1f,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch86 = {17,17,0,0,17,ch86data};\r
-\r
-/* char: 0x55 'U' */\r
-\r
-static const GLubyte ch85data[] = {\r
-0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,\r
-0xfc,0x1f,\r
-};\r
-\r
-static const BitmapCharRec ch85 = {16,17,-1,0,18,ch85data};\r
-\r
-/* char: 0x54 'T' */\r
-\r
-static const GLubyte ch84data[] = {\r
-0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,\r
-0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x83,0x4,0x83,0x4,0xc3,0xc,\r
-0xff,0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch84 = {14,17,-1,0,16,ch84data};\r
-\r
-/* char: 0x53 'S' */\r
-\r
-static const GLubyte ch83data[] = {\r
-0x9e,0x0,0xf1,0x80,0xc0,0xc0,0x80,0x60,0x80,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,\r
-0xf,0x80,0x1e,0x0,0x78,0x0,0xe0,0x0,0xc0,0x40,0xc0,0x40,0xc0,0xc0,0x63,0xc0,\r
-0x1e,0x40,\r
-};\r
-\r
-static const BitmapCharRec ch83 = {11,17,-1,0,13,ch83data};\r
-\r
-/* char: 0x52 'R' */\r
-\r
-static const GLubyte ch82data[] = {\r
-0xfc,0x1e,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0x60,0x30,0xc0,0x31,0xc0,0x33,0x80,\r
-0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x38,0x30,0x18,0x30,0x38,0x30,0x30,0x30,0x70,\r
-0xff,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch82 = {15,17,-1,0,16,ch82data};\r
-\r
-/* char: 0x51 'Q' */\r
-\r
-static const GLubyte ch81data[] = {\r
-0x0,0xf,0x0,0x38,0x0,0x70,0x0,0xe0,0x1,0xc0,0x7,0xe0,0x1c,0x38,0x38,0x1c,\r
-0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,\r
-0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,0x7,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch81 = {16,22,-1,5,18,ch81data};\r
-\r
-/* char: 0x50 'P' */\r
-\r
-static const GLubyte ch80data[] = {\r
-0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,\r
-0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,\r
-0xff,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch80 = {13,17,-1,0,15,ch80data};\r
-\r
-/* char: 0x4f 'O' */\r
-\r
-static const GLubyte ch79data[] = {\r
-0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,\r
-0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,\r
-0x7,0xe0,\r
-};\r
-\r
-static const BitmapCharRec ch79 = {16,17,-1,0,18,ch79data};\r
-\r
-/* char: 0x4e 'N' */\r
-\r
-static const GLubyte ch78data[] = {\r
-0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84,\r
-0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4,\r
-0xf0,0x1f,\r
-};\r
-\r
-static const BitmapCharRec ch78 = {16,17,-1,0,18,ch78data};\r
-\r
-/* char: 0x4d 'M' */\r
-\r
-static const GLubyte ch77data[] = {\r
-0xf8,0x21,0xf8,0x20,0x60,0x60,0x20,0x60,0x60,0x20,0xd0,0x60,0x20,0xd0,0x60,0x21,\r
-0x88,0x60,0x21,0x88,0x60,0x23,0x8,0x60,0x23,0x4,0x60,0x26,0x4,0x60,0x26,0x2,\r
-0x60,0x2c,0x2,0x60,0x2c,0x2,0x60,0x38,0x1,0x60,0x38,0x1,0x60,0x30,0x0,0xe0,\r
-0xf0,0x0,0xf8,\r
-};\r
-\r
-static const BitmapCharRec ch77 = {21,17,-1,0,22,ch77data};\r
-\r
-/* char: 0x4c 'L' */\r
-\r
-static const GLubyte ch76data[] = {\r
-0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,\r
-0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,\r
-0xfc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch76 = {13,17,-1,0,14,ch76data};\r
-\r
-/* char: 0x4b 'K' */\r
-\r
-static const GLubyte ch75data[] = {\r
-0xfc,0x1f,0x30,0xe,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0xe0,0x31,0xc0,0x33,0x80,\r
-0x3f,0x0,0x3e,0x0,0x33,0x0,0x31,0x80,0x30,0xc0,0x30,0x60,0x30,0x30,0x30,0x18,\r
-0xfc,0x7e,\r
-};\r
-\r
-static const BitmapCharRec ch75 = {16,17,-1,0,17,ch75data};\r
-\r
-/* char: 0x4a 'J' */\r
-\r
-static const GLubyte ch74data[] = {\r
-0x78,0x0,0xcc,0x0,0xc6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,\r
-0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,\r
-0x1f,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch74 = {9,17,-1,0,11,ch74data};\r
-\r
-/* char: 0x49 'I' */\r
-\r
-static const GLubyte ch73data[] = {\r
-0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,\r
-0xfc,\r
-};\r
-\r
-static const BitmapCharRec ch73 = {6,17,-1,0,8,ch73data};\r
-\r
-/* char: 0x48 'H' */\r
-\r
-static const GLubyte ch72data[] = {\r
-0xfc,0x1f,0x80,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,\r
-0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x3f,0xfe,0x0,0x30,0x6,0x0,0x30,0x6,\r
-0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,\r
-0xfc,0x1f,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch72 = {17,17,-1,0,19,ch72data};\r
-\r
-/* char: 0x47 'G' */\r
-\r
-static const GLubyte ch71data[] = {\r
-0x7,0xe0,0x1e,0x38,0x38,0x1c,0x60,0xc,0x60,0xc,0xc0,0xc,0xc0,0xc,0xc0,0x3f,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,\r
-0x7,0xe4,\r
-};\r
-\r
-static const BitmapCharRec ch71 = {16,17,-1,0,18,ch71data};\r
-\r
-/* char: 0x46 'F' */\r
-\r
-static const GLubyte ch70data[] = {\r
-0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x20,0x30,0x20,\r
-0x3f,0xe0,0x30,0x20,0x30,0x20,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,\r
-0xff,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch70 = {12,17,-1,0,14,ch70data};\r
-\r
-/* char: 0x45 'E' */\r
-\r
-static const GLubyte ch69data[] = {\r
-0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,\r
-0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,\r
-0xff,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch69 = {13,17,-1,0,15,ch69data};\r
-\r
-/* char: 0x44 'D' */\r
-\r
-static const GLubyte ch68data[] = {\r
-0xff,0xc0,0x30,0x70,0x30,0x38,0x30,0xc,0x30,0xc,0x30,0x6,0x30,0x6,0x30,0x6,\r
-0x30,0x6,0x30,0x6,0x30,0x6,0x30,0x6,0x30,0xc,0x30,0xc,0x30,0x38,0x30,0x70,\r
-0xff,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch68 = {15,17,-1,0,17,ch68data};\r
-\r
-/* char: 0x43 'C' */\r
-\r
-static const GLubyte ch67data[] = {\r
-0x7,0xe0,0x1e,0x38,0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,\r
-0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,\r
-0x7,0xe4,\r
-};\r
-\r
-static const BitmapCharRec ch67 = {14,17,-1,0,16,ch67data};\r
-\r
-/* char: 0x42 'B' */\r
-\r
-static const GLubyte ch66data[] = {\r
-0xff,0xe0,0x30,0x78,0x30,0x18,0x30,0xc,0x30,0xc,0x30,0xc,0x30,0x18,0x30,0x38,\r
-0x3f,0xe0,0x30,0x40,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,\r
-0xff,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch66 = {14,17,-1,0,16,ch66data};\r
-\r
-/* char: 0x41 'A' */\r
-\r
-static const GLubyte ch65data[] = {\r
-0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,\r
-0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,\r
-0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,\r
-0x0,0x80,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch65 = {17,17,0,0,17,ch65data};\r
-\r
-/* char: 0x40 '@' */\r
-\r
-static const GLubyte ch64data[] = {\r
-0x3,0xf0,0x0,0xe,0xc,0x0,0x18,0x0,0x0,0x30,0x0,0x0,0x61,0xde,0x0,0x63,\r
-0x7b,0x0,0xc6,0x39,0x80,0xc6,0x18,0x80,0xc6,0x18,0xc0,0xc6,0x18,0x40,0xc6,0xc,\r
-0x40,0xc3,0xc,0x40,0xc3,0x8c,0x40,0xe1,0xfc,0x40,0x60,0xec,0xc0,0x70,0x0,0x80,\r
-0x38,0x1,0x80,0x1c,0x3,0x0,0xf,0xe,0x0,0x3,0xf8,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch64 = {18,20,-2,3,22,ch64data};\r
-\r
-/* char: 0x3f '?' */\r
-\r
-static const GLubyte ch63data[] = {\r
-0x30,0x30,0x0,0x0,0x10,0x10,0x10,0x18,0x18,0xc,0xe,0x7,0xc3,0xc3,0x83,0xc6,\r
-0x7c,\r
-};\r
-\r
-static const BitmapCharRec ch63 = {8,17,-2,0,11,ch63data};\r
-\r
-/* char: 0x3e '>' */\r
-\r
-static const GLubyte ch62data[] = {\r
-0xc0,0x0,0x70,0x0,0x1c,0x0,0x7,0x0,0x1,0xc0,0x0,0x60,0x1,0xc0,0x7,0x0,\r
-0x1c,0x0,0x70,0x0,0xc0,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch62 = {11,11,-1,-1,13,ch62data};\r
-\r
-/* char: 0x3d '=' */\r
-\r
-static const GLubyte ch61data[] = {\r
-0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch61 = {12,6,-1,-4,14,ch61data};\r
-\r
-/* char: 0x3c '<' */\r
-\r
-static const GLubyte ch60data[] = {\r
-0x0,0x60,0x1,0xc0,0x7,0x0,0x1c,0x0,0x70,0x0,0xc0,0x0,0x70,0x0,0x1c,0x0,\r
-0x7,0x0,0x1,0xc0,0x0,0x60,\r
-};\r
-\r
-static const BitmapCharRec ch60 = {11,11,-1,-1,13,ch60data};\r
-\r
-/* char: 0x3b ';' */\r
-\r
-static const GLubyte ch59data[] = {\r
-0xc0,0x60,0x20,0xe0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch59 = {3,14,-2,3,7,ch59data};\r
-\r
-/* char: 0x3a ':' */\r
-\r
-static const GLubyte ch58data[] = {\r
-0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch58 = {2,11,-2,0,6,ch58data};\r
-\r
-/* char: 0x39 '9' */\r
-\r
-static const GLubyte ch57data[] = {\r
-0xf0,0x0,0x1c,0x0,0x6,0x0,0x3,0x0,0x3,0x80,0x1,0x80,0x1d,0x80,0x73,0xc0,\r
-0x61,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0x61,0x80,0x77,0x80,\r
-0x1e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch57 = {10,17,-1,0,12,ch57data};\r
-\r
-/* char: 0x38 '8' */\r
-\r
-static const GLubyte ch56data[] = {\r
-0x1e,0x0,0x73,0x80,0xe1,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x41,0xc0,0x61,0x80,\r
-0x37,0x0,0x1e,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0,\r
-0x1e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch56 = {10,17,-1,0,12,ch56data};\r
-\r
-/* char: 0x37 '7' */\r
-\r
-static const GLubyte ch55data[] = {\r
-0x18,0x0,0x18,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x4,0x0,0x6,0x0,0x6,0x0,\r
-0x2,0x0,0x3,0x0,0x3,0x0,0x1,0x0,0x1,0x80,0x81,0x80,0xc0,0xc0,0xff,0xc0,\r
-0x7f,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch55 = {10,17,-1,0,12,ch55data};\r
-\r
-/* char: 0x36 '6' */\r
-\r
-static const GLubyte ch54data[] = {\r
-0x1e,0x0,0x7b,0x80,0x61,0x80,0xe0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc1,0x80,0xf3,0x80,0xee,0x0,0x60,0x0,0x70,0x0,0x30,0x0,0x18,0x0,0xe,0x0,\r
-0x3,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch54 = {10,17,-1,0,12,ch54data};\r
-\r
-/* char: 0x35 '5' */\r
-\r
-static const GLubyte ch53data[] = {\r
-0x7e,0x0,0xe3,0x80,0xc1,0x80,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x1,0xc0,\r
-0x3,0x80,0xf,0x80,0x7e,0x0,0x78,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x1f,0x80,\r
-0x1f,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch53 = {10,17,-1,0,12,ch53data};\r
-\r
-/* char: 0x34 '4' */\r
-\r
-static const GLubyte ch52data[] = {\r
-0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0xff,0xc0,0xff,0xc0,0xc3,0x0,0x43,0x0,\r
-0x63,0x0,0x23,0x0,0x33,0x0,0x13,0x0,0x1b,0x0,0xb,0x0,0x7,0x0,0x7,0x0,\r
-0x3,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch52 = {10,17,-1,0,12,ch52data};\r
-\r
-/* char: 0x33 '3' */\r
-\r
-static const GLubyte ch51data[] = {\r
-0x78,0x0,0xe6,0x0,0xc3,0x0,0x1,0x0,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0x80,\r
-0x7,0x0,0x1e,0x0,0xc,0x0,0x6,0x0,0x83,0x0,0x83,0x0,0x47,0x0,0x7e,0x0,\r
-0x1c,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch51 = {9,17,-1,0,12,ch51data};\r
-\r
-/* char: 0x32 '2' */\r
-\r
-static const GLubyte ch50data[] = {\r
-0xff,0x80,0xff,0xc0,0x60,0x40,0x30,0x0,0x18,0x0,0xc,0x0,0x4,0x0,0x6,0x0,\r
-0x3,0x0,0x3,0x0,0x1,0x80,0x1,0x80,0x81,0x80,0x81,0x80,0x43,0x80,0x7f,0x0,\r
-0x1c,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch50 = {10,17,-1,0,12,ch50data};\r
-\r
-/* char: 0x31 '1' */\r
-\r
-static const GLubyte ch49data[] = {\r
-0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x18,\r
-0x8,\r
-};\r
-\r
-static const BitmapCharRec ch49 = {8,17,-2,0,12,ch49data};\r
-\r
-/* char: 0x30 '0' */\r
-\r
-static const GLubyte ch48data[] = {\r
-0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0xe1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x61,0x80,0x61,0x80,0x33,0x0,\r
-0x1e,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch48 = {10,17,-1,0,12,ch48data};\r
-\r
-/* char: 0x2f '/' */\r
-\r
-static const GLubyte ch47data[] = {\r
-0xc0,0xc0,0xc0,0x60,0x60,0x20,0x30,0x30,0x10,0x18,0x18,0x8,0xc,0xc,0x4,0x6,\r
-0x6,0x3,0x3,0x3,\r
-};\r
-\r
-static const BitmapCharRec ch47 = {8,20,1,3,7,ch47data};\r
-\r
-/* char: 0x2e '.' */\r
-\r
-static const GLubyte ch46data[] = {\r
-0xc0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch46 = {2,2,-2,0,6,ch46data};\r
-\r
-/* char: 0x2d '-' */\r
-\r
-static const GLubyte ch45data[] = {\r
-0xff,0xf0,0xff,0xf0,\r
-};\r
-\r
-static const BitmapCharRec ch45 = {12,2,-1,-6,14,ch45data};\r
-\r
-/* char: 0x2c ',' */\r
-\r
-static const GLubyte ch44data[] = {\r
-0xc0,0x60,0x20,0xe0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch44 = {3,5,-2,3,7,ch44data};\r
-\r
-/* char: 0x2b '+' */\r
-\r
-static const GLubyte ch43data[] = {\r
-0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xff,0xf0,0xff,0xf0,0x6,0x0,\r
-0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch43 = {12,12,-1,-1,14,ch43data};\r
-\r
-/* char: 0x2a '*' */\r
-\r
-static const GLubyte ch42data[] = {\r
-0x8,0x0,0x1c,0x0,0xc9,0x80,0xeb,0x80,0x1c,0x0,0xeb,0x80,0xc9,0x80,0x1c,0x0,\r
-0x8,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch42 = {9,9,-2,-8,12,ch42data};\r
-\r
-/* char: 0x29 ')' */\r
-\r
-static const GLubyte ch41data[] = {\r
-0x80,0x40,0x20,0x30,0x10,0x18,0x18,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x18,\r
-0x18,0x10,0x30,0x20,0x40,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch41 = {6,22,-1,5,8,ch41data};\r
-\r
-/* char: 0x28 '(' */\r
-\r
-static const GLubyte ch40data[] = {\r
-0x4,0x8,0x10,0x30,0x20,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,\r
-0x60,0x20,0x30,0x10,0x8,0x4,\r
-};\r
-\r
-static const BitmapCharRec ch40 = {6,22,-1,5,8,ch40data};\r
-\r
-/* char: 0x27 ''' */\r
-\r
-static const GLubyte ch39data[] = {\r
-0xc0,0x60,0x20,0xe0,0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch39 = {3,5,-3,-12,8,ch39data};\r
-\r
-/* char: 0x26 '&' */\r
-\r
-static const GLubyte ch38data[] = {\r
-0x3c,0x3c,0x7f,0x7e,0xe1,0xe1,0xc0,0xc0,0xc1,0xc0,0xc1,0xa0,0x63,0x20,0x37,0x10,\r
-0x1e,0x18,0xe,0x3e,0xf,0x0,0x1d,0x80,0x18,0xc0,0x18,0x40,0x18,0x40,0xc,0xc0,\r
-0x7,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch38 = {16,17,-1,0,18,ch38data};\r
-\r
-/* char: 0x25 '%' */\r
-\r
-static const GLubyte ch37data[] = {\r
-0x30,0x3c,0x0,0x18,0x72,0x0,0xc,0x61,0x0,0x4,0x60,0x80,0x6,0x60,0x80,0x3,\r
-0x30,0x80,0x1,0x19,0x80,0x1,0x8f,0x0,0x78,0xc0,0x0,0xe4,0x40,0x0,0xc2,0x60,\r
-0x0,0xc1,0x30,0x0,0xc1,0x10,0x0,0x61,0x18,0x0,0x33,0xfc,0x0,0x1e,0xc,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch37 = {17,16,-1,0,19,ch37data};\r
-\r
-/* char: 0x24 '$' */\r
-\r
-static const GLubyte ch36data[] = {\r
-0x4,0x0,0x4,0x0,0x3f,0x0,0xe5,0xc0,0xc4,0xc0,0x84,0x60,0x84,0x60,0x4,0x60,\r
-0x4,0xe0,0x7,0xc0,0x7,0x80,0x1e,0x0,0x3c,0x0,0x74,0x0,0x64,0x0,0x64,0x20,\r
-0x64,0x60,0x34,0xe0,0x1f,0x80,0x4,0x0,0x4,0x0,\r
-};\r
-\r
-static const BitmapCharRec ch36 = {11,21,0,2,12,ch36data};\r
-\r
-/* char: 0x23 '#' */\r
-\r
-static const GLubyte ch35data[] = {\r
-0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0xff,0xc0,0xff,0xc0,0x11,0x0,\r
-0x11,0x0,0x11,0x0,0x7f,0xe0,0x7f,0xe0,0x8,0x80,0x8,0x80,0x8,0x80,0x8,0x80,\r
-0x8,0x80,\r
-};\r
-\r
-static const BitmapCharRec ch35 = {11,17,-1,0,13,ch35data};\r
-\r
-/* char: 0x22 '"' */\r
-\r
-static const GLubyte ch34data[] = {\r
-0x88,0xcc,0xcc,0xcc,0xcc,\r
-};\r
-\r
-static const BitmapCharRec ch34 = {6,5,-1,-12,10,ch34data};\r
-\r
-/* char: 0x21 '!' */\r
-\r
-static const GLubyte ch33data[] = {\r
-0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,\r
-0xc0,\r
-};\r
-\r
-static const BitmapCharRec ch33 = {2,17,-3,0,8,ch33data};\r
-\r
-/* char: 0x20 ' ' */\r
-\r
-#ifdef _WIN32\r
-/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with\r
-   a height or width of zero does not advance the raster position\r
-   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */\r
-static const GLubyte ch32data[] = { 0x0 };\r
-static const BitmapCharRec ch32 = {1,1,0,0,6,ch32data};\r
-#else\r
-static const BitmapCharRec ch32 = {0,0,0,0,6,0};\r
-#endif\r
-\r
-static const BitmapCharRec * const chars[] = {\r
-&ch32,\r
-&ch33,\r
-&ch34,\r
-&ch35,\r
-&ch36,\r
-&ch37,\r
-&ch38,\r
-&ch39,\r
-&ch40,\r
-&ch41,\r
-&ch42,\r
-&ch43,\r
-&ch44,\r
-&ch45,\r
-&ch46,\r
-&ch47,\r
-&ch48,\r
-&ch49,\r
-&ch50,\r
-&ch51,\r
-&ch52,\r
-&ch53,\r
-&ch54,\r
-&ch55,\r
-&ch56,\r
-&ch57,\r
-&ch58,\r
-&ch59,\r
-&ch60,\r
-&ch61,\r
-&ch62,\r
-&ch63,\r
-&ch64,\r
-&ch65,\r
-&ch66,\r
-&ch67,\r
-&ch68,\r
-&ch69,\r
-&ch70,\r
-&ch71,\r
-&ch72,\r
-&ch73,\r
-&ch74,\r
-&ch75,\r
-&ch76,\r
-&ch77,\r
-&ch78,\r
-&ch79,\r
-&ch80,\r
-&ch81,\r
-&ch82,\r
-&ch83,\r
-&ch84,\r
-&ch85,\r
-&ch86,\r
-&ch87,\r
-&ch88,\r
-&ch89,\r
-&ch90,\r
-&ch91,\r
-&ch92,\r
-&ch93,\r
-&ch94,\r
-&ch95,\r
-&ch96,\r
-&ch97,\r
-&ch98,\r
-&ch99,\r
-&ch100,\r
-&ch101,\r
-&ch102,\r
-&ch103,\r
-&ch104,\r
-&ch105,\r
-&ch106,\r
-&ch107,\r
-&ch108,\r
-&ch109,\r
-&ch110,\r
-&ch111,\r
-&ch112,\r
-&ch113,\r
-&ch114,\r
-&ch115,\r
-&ch116,\r
-&ch117,\r
-&ch118,\r
-&ch119,\r
-&ch120,\r
-&ch121,\r
-&ch122,\r
-&ch123,\r
-&ch124,\r
-&ch125,\r
-&ch126,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-0,\r
-&ch160,\r
-&ch161,\r
-&ch162,\r
-&ch163,\r
-&ch164,\r
-&ch165,\r
-&ch166,\r
-&ch167,\r
-&ch168,\r
-&ch169,\r
-&ch170,\r
-&ch171,\r
-&ch172,\r
-&ch173,\r
-&ch174,\r
-&ch175,\r
-&ch176,\r
-&ch177,\r
-&ch178,\r
-&ch179,\r
-&ch180,\r
-&ch181,\r
-&ch182,\r
-&ch183,\r
-&ch184,\r
-&ch185,\r
-&ch186,\r
-&ch187,\r
-&ch188,\r
-&ch189,\r
-&ch190,\r
-&ch191,\r
-&ch192,\r
-&ch193,\r
-&ch194,\r
-&ch195,\r
-&ch196,\r
-&ch197,\r
-&ch198,\r
-&ch199,\r
-&ch200,\r
-&ch201,\r
-&ch202,\r
-&ch203,\r
-&ch204,\r
-&ch205,\r
-&ch206,\r
-&ch207,\r
-&ch208,\r
-&ch209,\r
-&ch210,\r
-&ch211,\r
-&ch212,\r
-&ch213,\r
-&ch214,\r
-&ch215,\r
-&ch216,\r
-&ch217,\r
-&ch218,\r
-&ch219,\r
-&ch220,\r
-&ch221,\r
-&ch222,\r
-&ch223,\r
-&ch224,\r
-&ch225,\r
-&ch226,\r
-&ch227,\r
-&ch228,\r
-&ch229,\r
-&ch230,\r
-&ch231,\r
-&ch232,\r
-&ch233,\r
-&ch234,\r
-&ch235,\r
-&ch236,\r
-&ch237,\r
-&ch238,\r
-&ch239,\r
-&ch240,\r
-&ch241,\r
-&ch242,\r
-&ch243,\r
-&ch244,\r
-&ch245,\r
-&ch246,\r
-&ch247,\r
-&ch248,\r
-&ch249,\r
-&ch250,\r
-&ch251,\r
-&ch252,\r
-&ch253,\r
-&ch254,\r
-&ch255,\r
-};\r
-\r
-#if !defined(__IBMCPP__)\r
-const \r
-#endif\r
-BitmapFontRec glutBitmapTimesRoman24 = {\r
-"-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1",\r
-224,\r
-32,\r
-chars\r
-};\r
-\r
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+#define glutBitmapTimesRoman24 XXX
+#include "glutbitmap.h"
+#undef glutBitmapTimesRoman24
+
+/* char: 0xff */
+
+static const GLubyte ch255data[] = {
+0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0,
+0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0,
+0xf1,0xe0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,
+};
+
+static const BitmapCharRec ch255 = {11,21,0,5,11,ch255data};
+
+/* char: 0xfe */
+
+static const GLubyte ch254data[] = {
+0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80,
+0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0xe0,0x0,
+};
+
+static const BitmapCharRec ch254 = {10,22,-1,5,12,ch254data};
+
+/* char: 0xfd */
+
+static const GLubyte ch253data[] = {
+0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0,
+0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0,
+0xf1,0xe0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,0x1,0x80,
+};
+
+static const BitmapCharRec ch253 = {11,22,0,5,11,ch253data};
+
+/* char: 0xfc */
+
+static const GLubyte ch252data[] = {
+0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,
+};
+
+static const BitmapCharRec ch252 = {11,16,-1,0,13,ch252data};
+
+/* char: 0xfb */
+
+static const GLubyte ch251data[] = {
+0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0,
+0xc,0x0,
+};
+
+static const BitmapCharRec ch251 = {11,17,-1,0,13,ch251data};
+
+/* char: 0xfa */
+
+static const GLubyte ch250data[] = {
+0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,
+0x1,0x80,
+};
+
+static const BitmapCharRec ch250 = {11,17,-1,0,13,ch250data};
+
+/* char: 0xf9 */
+
+static const GLubyte ch249data[] = {
+0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0,
+0x30,0x0,
+};
+
+static const BitmapCharRec ch249 = {11,17,-1,0,13,ch249data};
+
+/* char: 0xf8 */
+
+static const GLubyte ch248data[] = {
+0xc0,0x0,0xde,0x0,0x73,0x80,0x71,0x80,0xd0,0xc0,0xd8,0xc0,0xc8,0xc0,0xcc,0xc0,
+0xc4,0xc0,0xc6,0xc0,0x63,0x80,0x73,0x80,0x1e,0xc0,0x0,0xc0,
+};
+
+static const BitmapCharRec ch248 = {10,14,-1,1,12,ch248data};
+
+/* char: 0xf7 */
+
+static const GLubyte ch247data[] = {
+0x6,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,
+0x6,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch247 = {12,10,-1,-2,14,ch247data};
+
+/* char: 0xf6 */
+
+static const GLubyte ch246data[] = {
+0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,
+};
+
+static const BitmapCharRec ch246 = {10,16,-1,0,12,ch246data};
+
+/* char: 0xf5 */
+
+static const GLubyte ch245data[] = {
+0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80,
+};
+
+static const BitmapCharRec ch245 = {10,16,-1,0,12,ch245data};
+
+/* char: 0xf4 */
+
+static const GLubyte ch244data[] = {
+0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0,
+0xc,0x0,
+};
+
+static const BitmapCharRec ch244 = {10,17,-1,0,12,ch244data};
+
+/* char: 0xf3 */
+
+static const GLubyte ch243data[] = {
+0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x8,0x0,0x6,0x0,0x3,0x80,
+0x1,0x80,
+};
+
+static const BitmapCharRec ch243 = {10,17,-1,0,12,ch243data};
+
+/* char: 0xf2 */
+
+static const GLubyte ch242data[] = {
+0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,0x0,0x0,0x2,0x0,0xc,0x0,0x38,0x0,
+0x30,0x0,
+};
+
+static const BitmapCharRec ch242 = {10,17,-1,0,12,ch242data};
+
+/* char: 0xf1 */
+
+static const GLubyte ch241data[] = {
+0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,0x0,0x0,0x0,0x0,0x27,0x0,0x1c,0x80,
+};
+
+static const BitmapCharRec ch241 = {11,16,-1,0,13,ch241data};
+
+/* char: 0xf0 */
+
+static const GLubyte ch240data[] = {
+0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0x61,0x80,0x73,0x80,0x1f,0x0,0xc6,0x0,0x3c,0x0,0x1e,0x0,0x71,0x80,
+0xc0,0x0,
+};
+
+static const BitmapCharRec ch240 = {10,17,-1,0,12,ch240data};
+
+/* char: 0xef */
+
+static const GLubyte ch239data[] = {
+0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x0,0xcc,0xcc,
+};
+
+static const BitmapCharRec ch239 = {6,16,0,0,6,ch239data};
+
+/* char: 0xee */
+
+static const GLubyte ch238data[] = {
+0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x84,0x48,0x78,
+0x30,
+};
+
+static const BitmapCharRec ch238 = {6,17,0,0,6,ch238data};
+
+/* char: 0xed */
+
+static const GLubyte ch237data[] = {
+0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x80,0x60,0x38,
+0x18,
+};
+
+static const BitmapCharRec ch237 = {5,17,-1,0,6,ch237data};
+
+/* char: 0xec */
+
+static const GLubyte ch236data[] = {
+0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x70,0x0,0x8,0x30,0xe0,
+0xc0,
+};
+
+static const BitmapCharRec ch236 = {5,17,0,0,6,ch236data};
+
+/* char: 0xeb */
+
+static const GLubyte ch235data[] = {
+0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,
+0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x0,0x0,0x33,0x0,0x33,0x0,
+};
+
+static const BitmapCharRec ch235 = {9,16,-1,0,11,ch235data};
+
+/* char: 0xea */
+
+static const GLubyte ch234data[] = {
+0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,
+0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x21,0x0,0x12,0x0,0x1e,0x0,
+0xc,0x0,
+};
+
+static const BitmapCharRec ch234 = {9,17,-1,0,11,ch234data};
+
+/* char: 0xe9 */
+
+static const GLubyte ch233data[] = {
+0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,
+0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0,
+0x3,0x0,
+};
+
+static const BitmapCharRec ch233 = {9,17,-1,0,11,ch233data};
+
+/* char: 0xe8 */
+
+static const GLubyte ch232data[] = {
+0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,
+0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0,
+0x60,0x0,
+};
+
+static const BitmapCharRec ch232 = {9,17,-1,0,11,ch232data};
+
+/* char: 0xe7 */
+
+static const GLubyte ch231data[] = {
+0x3c,0x0,0x66,0x0,0x6,0x0,0x1e,0x0,0x18,0x0,0x8,0x0,0x1e,0x0,0x7f,0x0,
+0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x41,0x80,
+0x63,0x80,0x1f,0x0,
+};
+
+static const BitmapCharRec ch231 = {9,18,-1,6,11,ch231data};
+
+/* char: 0xe6 */
+
+static const GLubyte ch230data[] = {
+0x70,0xf0,0xfb,0xf8,0xc7,0x84,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0xfc,
+0x3,0xc,0x63,0xc,0x67,0x98,0x3c,0xf0,
+};
+
+static const BitmapCharRec ch230 = {14,12,-1,0,16,ch230data};
+
+/* char: 0xe5 */
+
+static const GLubyte ch229data[] = {
+0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,
+0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x1c,0x0,0x22,0x0,0x22,0x0,
+0x1c,0x0,
+};
+
+static const BitmapCharRec ch229 = {9,17,-1,0,11,ch229data};
+
+/* char: 0xe4 */
+
+static const GLubyte ch228data[] = {
+0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,
+0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x66,0x0,0x66,0x0,
+};
+
+static const BitmapCharRec ch228 = {9,16,-1,0,11,ch228data};
+
+/* char: 0xe3 */
+
+static const GLubyte ch227data[] = {
+0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,
+0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x5c,0x0,0x3a,0x0,
+};
+
+static const BitmapCharRec ch227 = {9,16,-1,0,11,ch227data};
+
+/* char: 0xe2 */
+
+static const GLubyte ch226data[] = {
+0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,
+0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x42,0x0,0x24,0x0,0x3c,0x0,
+0x18,0x0,
+};
+
+static const BitmapCharRec ch226 = {9,17,-1,0,11,ch226data};
+
+/* char: 0xe1 */
+
+static const GLubyte ch225data[] = {
+0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,
+0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x10,0x0,0xc,0x0,0x7,0x0,
+0x3,0x0,
+};
+
+static const BitmapCharRec ch225 = {9,17,-1,0,11,ch225data};
+
+/* char: 0xe0 */
+
+static const GLubyte ch224data[] = {
+0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,
+0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,0x0,0x0,0x4,0x0,0x18,0x0,0x70,0x0,
+0x60,0x0,
+};
+
+static const BitmapCharRec ch224 = {9,17,-1,0,11,ch224data};
+
+/* char: 0xdf */
+
+static const GLubyte ch223data[] = {
+0xe7,0x0,0x6c,0x80,0x6c,0xc0,0x60,0xc0,0x60,0xc0,0x61,0xc0,0x61,0x80,0x63,0x80,
+0x67,0x0,0x6c,0x0,0x63,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0,
+0x1e,0x0,
+};
+
+static const BitmapCharRec ch223 = {10,17,-1,0,12,ch223data};
+
+/* char: 0xde */
+
+static const GLubyte ch222data[] = {
+0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,
+0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,0x3f,0xc0,0x30,0x0,0x30,0x0,0x30,0x0,
+0xfc,0x0,
+};
+
+static const BitmapCharRec ch222 = {13,17,-1,0,15,ch222data};
+
+/* char: 0xdd */
+
+static const GLubyte ch221data[] = {
+0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0,
+0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc,
+0xfc,0x3f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30,
+};
+
+static const BitmapCharRec ch221 = {16,22,0,0,16,ch221data};
+
+/* char: 0xdc */
+
+static const GLubyte ch220data[] = {
+0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0xfc,0x1f,0x0,0x0,0x0,0x0,0x6,0x30,0x6,0x30,
+};
+
+static const BitmapCharRec ch220 = {16,21,-1,0,18,ch220data};
+
+/* char: 0xdb */
+
+static const GLubyte ch219data[] = {
+0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0xfc,0x1f,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80,
+};
+
+static const BitmapCharRec ch219 = {16,22,-1,0,18,ch219data};
+
+/* char: 0xda */
+
+static const GLubyte ch218data[] = {
+0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0xfc,0x1f,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30,
+};
+
+static const BitmapCharRec ch218 = {16,22,-1,0,18,ch218data};
+
+/* char: 0xd9 */
+
+static const GLubyte ch217data[] = {
+0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0xfc,0x1f,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch217 = {16,22,-1,0,18,ch217data};
+
+/* char: 0xd8 */
+
+static const GLubyte ch216data[] = {
+0x20,0x0,0x27,0xe0,0x1c,0x38,0x38,0x1c,0x68,0x6,0x64,0x6,0xc2,0x3,0xc2,0x3,
+0xc1,0x3,0xc1,0x3,0xc0,0x83,0xc0,0x83,0xc0,0x43,0x60,0x46,0x60,0x26,0x38,0x1c,
+0x1c,0x38,0x7,0xe4,0x0,0x4,
+};
+
+static const BitmapCharRec ch216 = {16,19,-1,1,18,ch216data};
+
+/* char: 0xd7 */
+
+static const GLubyte ch215data[] = {
+0x80,0x40,0xc0,0xc0,0x61,0x80,0x33,0x0,0x1e,0x0,0xc,0x0,0x1e,0x0,0x33,0x0,
+0x61,0x80,0xc0,0xc0,0x80,0x40,
+};
+
+static const BitmapCharRec ch215 = {10,11,-2,-1,14,ch215data};
+
+/* char: 0xd6 */
+
+static const GLubyte ch214data[] = {
+0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,
+0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,
+0x7,0xe0,0x0,0x0,0x0,0x0,0x6,0x60,0x6,0x60,
+};
+
+static const BitmapCharRec ch214 = {16,21,-1,0,18,ch214data};
+
+/* char: 0xd5 */
+
+static const GLubyte ch213data[] = {
+0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,
+0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,
+0x7,0xe0,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90,
+};
+
+static const BitmapCharRec ch213 = {16,21,-1,0,18,ch213data};
+
+/* char: 0xd4 */
+
+static const GLubyte ch212data[] = {
+0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,
+0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,
+0x7,0xe0,0x0,0x0,0x8,0x10,0x6,0x60,0x3,0xc0,0x1,0x80,
+};
+
+static const BitmapCharRec ch212 = {16,22,-1,0,18,ch212data};
+
+/* char: 0xd3 */
+
+static const GLubyte ch211data[] = {
+0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,
+0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,
+0x7,0xe0,0x0,0x0,0x1,0x0,0x0,0xc0,0x0,0x70,0x0,0x30,
+};
+
+static const BitmapCharRec ch211 = {16,22,-1,0,18,ch211data};
+
+/* char: 0xd2 */
+
+static const GLubyte ch210data[] = {
+0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,
+0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,
+0x7,0xe0,0x0,0x0,0x0,0x40,0x1,0x80,0x7,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch210 = {16,22,-1,0,18,ch210data};
+
+/* char: 0xd1 */
+
+static const GLubyte ch209data[] = {
+0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84,
+0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4,
+0xf0,0x1f,0x0,0x0,0x0,0x0,0x4,0xe0,0x3,0x90,
+};
+
+static const BitmapCharRec ch209 = {16,21,-1,0,18,ch209data};
+
+/* char: 0xd0 */
+
+static const GLubyte ch208data[] = {
+0x7f,0xe0,0x18,0x38,0x18,0x1c,0x18,0x6,0x18,0x6,0x18,0x3,0x18,0x3,0x18,0x3,
+0xff,0x3,0x18,0x3,0x18,0x3,0x18,0x3,0x18,0x6,0x18,0x6,0x18,0x1c,0x18,0x38,
+0x7f,0xe0,
+};
+
+static const BitmapCharRec ch208 = {16,17,0,0,17,ch208data};
+
+/* char: 0xcf */
+
+static const GLubyte ch207data[] = {
+0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+0xfc,0x0,0x0,0xcc,0xcc,
+};
+
+static const BitmapCharRec ch207 = {6,21,-1,0,8,ch207data};
+
+/* char: 0xce */
+
+static const GLubyte ch206data[] = {
+0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x7e,0x0,0x81,0x66,0x3c,0x18,
+};
+
+static const BitmapCharRec ch206 = {8,22,-1,0,8,ch206data};
+
+/* char: 0xcd */
+
+static const GLubyte ch205data[] = {
+0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+0xfc,0x0,0x40,0x30,0x1c,0xc,
+};
+
+static const BitmapCharRec ch205 = {6,22,-1,0,8,ch205data};
+
+/* char: 0xcc */
+
+static const GLubyte ch204data[] = {
+0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+0xfc,0x0,0x8,0x30,0xe0,0xc0,
+};
+
+static const BitmapCharRec ch204 = {6,22,-1,0,8,ch204data};
+
+/* char: 0xcb */
+
+static const GLubyte ch203data[] = {
+0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,
+0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,
+0xff,0xf0,0x0,0x0,0x0,0x0,0x19,0x80,0x19,0x80,
+};
+
+static const BitmapCharRec ch203 = {13,21,-1,0,15,ch203data};
+
+/* char: 0xca */
+
+static const GLubyte ch202data[] = {
+0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,
+0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,
+0xff,0xf0,0x0,0x0,0x10,0x20,0xc,0xc0,0x7,0x80,0x3,0x0,
+};
+
+static const BitmapCharRec ch202 = {13,22,-1,0,15,ch202data};
+
+/* char: 0xc9 */
+
+static const GLubyte ch201data[] = {
+0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,
+0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,
+0xff,0xf0,0x0,0x0,0x4,0x0,0x3,0x0,0x1,0xc0,0x0,0xc0,
+};
+
+static const BitmapCharRec ch201 = {13,22,-1,0,15,ch201data};
+
+/* char: 0xc8 */
+
+static const GLubyte ch200data[] = {
+0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,
+0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,
+0xff,0xf0,0x0,0x0,0x1,0x0,0x6,0x0,0x1c,0x0,0x18,0x0,
+};
+
+static const BitmapCharRec ch200 = {13,22,-1,0,15,ch200data};
+
+/* char: 0xc7 */
+
+static const GLubyte ch199data[] = {
+0x7,0x80,0xc,0xc0,0x0,0xc0,0x3,0xc0,0x3,0x0,0x1,0x0,0x7,0xe0,0x1e,0x38,
+0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,
+0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,0x7,0xe4,
+};
+
+static const BitmapCharRec ch199 = {14,23,-1,6,16,ch199data};
+
+/* char: 0xc6 */
+
+static const GLubyte ch198data[] = {
+0xf9,0xff,0xf0,0x30,0x60,0x30,0x10,0x60,0x10,0x10,0x60,0x10,0x18,0x60,0x0,0x8,
+0x60,0x0,0xf,0xe0,0x80,0xc,0x60,0x80,0x4,0x7f,0x80,0x4,0x60,0x80,0x6,0x60,
+0x80,0x2,0x60,0x0,0x2,0x60,0x0,0x1,0x60,0x20,0x1,0x60,0x20,0x1,0xe0,0x60,
+0x3,0xff,0xe0,
+};
+
+static const BitmapCharRec ch198 = {20,17,0,0,21,ch198data};
+
+/* char: 0xc5 */
+
+static const GLubyte ch197data[] = {
+0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,
+0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,
+0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,
+0x0,0x80,0x0,0x1,0xc0,0x0,0x2,0x20,0x0,0x2,0x20,0x0,0x1,0xc0,0x0,
+};
+
+static const BitmapCharRec ch197 = {17,21,0,0,17,ch197data};
+
+/* char: 0xc4 */
+
+static const GLubyte ch196data[] = {
+0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,
+0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,
+0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,
+0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x30,0x0,0x6,0x30,0x0,
+};
+
+static const BitmapCharRec ch196 = {17,21,0,0,17,ch196data};
+
+/* char: 0xc3 */
+
+static const GLubyte ch195data[] = {
+0xfc,0x1f,0x80,0x30,0x7,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,
+0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,
+0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,
+0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0xe0,0x0,0x3,0x90,0x0,
+};
+
+static const BitmapCharRec ch195 = {17,21,0,0,17,ch195data};
+
+/* char: 0xc2 */
+
+static const GLubyte ch194data[] = {
+0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,
+0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,
+0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,
+0x0,0x80,0x0,0x0,0x0,0x0,0x8,0x10,0x0,0x6,0x60,0x0,0x3,0xc0,0x0,0x1,
+0x80,0x0,
+};
+
+static const BitmapCharRec ch194 = {17,22,0,0,17,ch194data};
+
+/* char: 0xc1 */
+
+static const GLubyte ch193data[] = {
+0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,
+0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,
+0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,
+0x0,0x80,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xc0,0x0,0x0,0x70,0x0,0x0,
+0x30,0x0,
+};
+
+static const BitmapCharRec ch193 = {17,22,0,0,17,ch193data};
+
+/* char: 0xc0 */
+
+static const GLubyte ch192data[] = {
+0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,
+0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,
+0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,
+0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0xc0,0x0,0x3,0x80,0x0,0x3,
+0x0,0x0,
+};
+
+static const BitmapCharRec ch192 = {17,22,0,0,17,ch192data};
+
+/* char: 0xbf */
+
+static const GLubyte ch191data[] = {
+0x3e,0x63,0xc1,0xc3,0xc3,0xe0,0x70,0x30,0x38,0x18,0x18,0x8,0x8,0x0,0x0,0xc,
+0xc,
+};
+
+static const BitmapCharRec ch191 = {8,17,-1,5,11,ch191data};
+
+/* char: 0xbe */
+
+static const GLubyte ch190data[] = {
+0x18,0x2,0x0,0x8,0x2,0x0,0xc,0x7f,0x80,0x4,0x22,0x0,0x6,0x32,0x0,0x3,
+0x12,0x0,0x1,0xa,0x0,0x71,0x8e,0x0,0x88,0x86,0x0,0x8c,0xc2,0x0,0xc,0x60,
+0x0,0x8,0x20,0x0,0x30,0x30,0x0,0x8,0x10,0x0,0x8c,0x18,0x0,0x4c,0xc,0x0,
+0x38,0x4,0x0,
+};
+
+static const BitmapCharRec ch190 = {17,17,0,0,18,ch190data};
+
+/* char: 0xbd */
+
+static const GLubyte ch189data[] = {
+0x30,0x7e,0x10,0x22,0x18,0x10,0x8,0x18,0xc,0x8,0x6,0x4,0x2,0x6,0xfb,0x46,
+0x21,0x26,0x21,0x9c,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18,
+0x20,0x8,
+};
+
+static const BitmapCharRec ch189 = {15,17,-1,0,18,ch189data};
+
+/* char: 0xbc */
+
+static const GLubyte ch188data[] = {
+0x30,0x4,0x10,0x4,0x18,0xff,0x8,0x44,0xc,0x64,0x6,0x24,0x2,0x14,0xfb,0x1c,
+0x21,0xc,0x21,0x84,0x20,0xc0,0x20,0x40,0x20,0x60,0x20,0x20,0xa0,0x30,0x60,0x18,
+0x20,0x8,
+};
+
+static const BitmapCharRec ch188 = {16,17,-1,0,18,ch188data};
+
+/* char: 0xbb */
+
+static const GLubyte ch187data[] = {
+0x88,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,0x19,0x80,0x19,0x80,0x33,0x0,0x66,0x0,
+0xcc,0x0,0x88,0x0,
+};
+
+static const BitmapCharRec ch187 = {9,10,-2,-1,12,ch187data};
+
+/* char: 0xba */
+
+static const GLubyte ch186data[] = {
+0xfc,0x0,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,
+};
+
+static const BitmapCharRec ch186 = {6,9,-1,-8,8,ch186data};
+
+/* char: 0xb9 */
+
+static const GLubyte ch185data[] = {
+0xf8,0x20,0x20,0x20,0x20,0x20,0x20,0xa0,0x60,0x20,
+};
+
+static const BitmapCharRec ch185 = {5,10,-1,-7,7,ch185data};
+
+/* char: 0xb8 */
+
+static const GLubyte ch184data[] = {
+0x78,0xcc,0xc,0x3c,0x30,0x10,
+};
+
+static const BitmapCharRec ch184 = {6,6,-1,6,8,ch184data};
+
+/* char: 0xb7 */
+
+static const GLubyte ch183data[] = {
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch183 = {2,2,-2,-6,6,ch183data};
+
+/* char: 0xb6 */
+
+static const GLubyte ch182data[] = {
+0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,0x9,0x0,
+0x9,0x0,0x9,0x0,0x9,0x0,0x19,0x0,0x39,0x0,0x79,0x0,0x79,0x0,0xf9,0x0,
+0xf9,0x0,0xf9,0x0,0x79,0x0,0x79,0x0,0x39,0x0,0x1f,0x80,
+};
+
+static const BitmapCharRec ch182 = {9,22,-1,5,11,ch182data};
+
+/* char: 0xb5 */
+
+static const GLubyte ch181data[] = {
+0x40,0x0,0xe0,0x0,0xc0,0x0,0x40,0x0,0x40,0x0,0x5c,0xe0,0x7e,0xc0,0x71,0xc0,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0xe1,0xc0,
+};
+
+static const BitmapCharRec ch181 = {11,17,-1,5,13,ch181data};
+
+/* char: 0xb4 */
+
+static const GLubyte ch180data[] = {
+0x80,0x60,0x38,0x18,
+};
+
+static const BitmapCharRec ch180 = {5,4,-2,-13,8,ch180data};
+
+/* char: 0xb3 */
+
+static const GLubyte ch179data[] = {
+0x70,0x88,0x8c,0xc,0x8,0x30,0x8,0x8c,0x4c,0x38,
+};
+
+static const BitmapCharRec ch179 = {6,10,0,-7,7,ch179data};
+
+/* char: 0xb2 */
+
+static const GLubyte ch178data[] = {
+0xfc,0x44,0x20,0x30,0x10,0x8,0xc,0x8c,0x4c,0x38,
+};
+
+static const BitmapCharRec ch178 = {6,10,0,-7,7,ch178data};
+
+/* char: 0xb1 */
+
+static const GLubyte ch177data[] = {
+0xff,0xf0,0xff,0xf0,0x0,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,
+0xff,0xf0,0xff,0xf0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch177 = {12,15,-1,0,14,ch177data};
+
+/* char: 0xb0 */
+
+static const GLubyte ch176data[] = {
+0x38,0x44,0x82,0x82,0x82,0x44,0x38,
+};
+
+static const BitmapCharRec ch176 = {7,7,-1,-10,9,ch176data};
+
+/* char: 0xaf */
+
+static const GLubyte ch175data[] = {
+0xfc,0xfc,
+};
+
+static const BitmapCharRec ch175 = {6,2,-1,-14,8,ch175data};
+
+/* char: 0xae */
+
+static const GLubyte ch174data[] = {
+0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x60,0x3,0x0,0x47,0x19,0x0,0xc2,
+0x31,0x80,0x82,0x20,0x80,0x82,0x40,0x80,0x83,0xe0,0x80,0x82,0x30,0x80,0x82,0x10,
+0x80,0xc2,0x11,0x80,0x42,0x31,0x0,0x67,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0,
+0x7,0xf0,0x0,
+};
+
+static const BitmapCharRec ch174 = {17,17,-1,0,19,ch174data};
+
+/* char: 0xad */
+
+static const GLubyte ch173data[] = {
+0xfe,0xfe,
+};
+
+static const BitmapCharRec ch173 = {7,2,-1,-5,9,ch173data};
+
+/* char: 0xac */
+
+static const GLubyte ch172data[] = {
+0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0xff,0xf0,0xff,0xf0,
+};
+
+static const BitmapCharRec ch172 = {12,7,-1,-3,14,ch172data};
+
+/* char: 0xab */
+
+static const GLubyte ch171data[] = {
+0x8,0x80,0x19,0x80,0x33,0x0,0x66,0x0,0xcc,0x0,0xcc,0x0,0x66,0x0,0x33,0x0,
+0x19,0x80,0x8,0x80,
+};
+
+static const BitmapCharRec ch171 = {9,10,-2,-1,13,ch171data};
+
+/* char: 0xaa */
+
+static const GLubyte ch170data[] = {
+0x7e,0x0,0x76,0xcc,0xcc,0x7c,0xc,0xcc,0x78,
+};
+
+static const BitmapCharRec ch170 = {7,9,0,-8,8,ch170data};
+
+/* char: 0xa9 */
+
+static const GLubyte ch169data[] = {
+0x7,0xf0,0x0,0x1c,0x1c,0x0,0x30,0x6,0x0,0x61,0xc3,0x0,0x47,0x71,0x0,0xc4,
+0x19,0x80,0x8c,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x88,0x0,0x80,0x8c,0x0,
+0x80,0xc4,0x19,0x80,0x47,0x31,0x0,0x61,0xe3,0x0,0x30,0x6,0x0,0x1c,0x1c,0x0,
+0x7,0xf0,0x0,
+};
+
+static const BitmapCharRec ch169 = {17,17,-1,0,19,ch169data};
+
+/* char: 0xa8 */
+
+static const GLubyte ch168data[] = {
+0xcc,0xcc,
+};
+
+static const BitmapCharRec ch168 = {6,2,-1,-14,8,ch168data};
+
+/* char: 0xa7 */
+
+static const GLubyte ch167data[] = {
+0x38,0x64,0x62,0x6,0xe,0x1c,0x38,0x74,0xe2,0xc3,0x83,0x87,0x4e,0x3c,0x38,0x70,
+0x60,0x46,0x26,0x1c,
+};
+
+static const BitmapCharRec ch167 = {8,20,-2,2,12,ch167data};
+
+/* char: 0xa6 */
+
+static const GLubyte ch166data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,
+};
+
+static const BitmapCharRec ch166 = {2,17,-2,0,6,ch166data};
+
+/* char: 0xa5 */
+
+static const GLubyte ch165data[] = {
+0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x1f,0xe0,0x3,0x0,0x1f,0xe0,
+0x3,0x0,0x7,0x80,0xc,0x80,0xc,0xc0,0x18,0x40,0x18,0x60,0x30,0x20,0x70,0x30,
+0xf8,0x7c,
+};
+
+static const BitmapCharRec ch165 = {14,17,0,0,14,ch165data};
+
+/* char: 0xa4 */
+
+static const GLubyte ch164data[] = {
+0xc0,0x60,0xee,0xe0,0x7f,0xc0,0x31,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x31,0x80,0x7f,0xc0,0xee,0xe0,0xc0,0x60,
+};
+
+static const BitmapCharRec ch164 = {11,12,-1,-3,13,ch164data};
+
+/* char: 0xa3 */
+
+static const GLubyte ch163data[] = {
+0xe7,0x80,0xbe,0xc0,0x78,0x40,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,
+0x30,0x0,0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x31,0x80,0x19,0x80,
+0xf,0x0,
+};
+
+static const BitmapCharRec ch163 = {10,17,-1,0,12,ch163data};
+
+/* char: 0xa2 */
+
+static const GLubyte ch162data[] = {
+0x40,0x0,0x40,0x0,0x3e,0x0,0x7f,0x0,0x70,0x80,0xd0,0x0,0xc8,0x0,0xc8,0x0,
+0xc8,0x0,0xc4,0x0,0xc4,0x0,0x43,0x80,0x63,0x80,0x1f,0x0,0x1,0x0,0x1,0x0,
+};
+
+static const BitmapCharRec ch162 = {9,16,-1,2,12,ch162data};
+
+/* char: 0xa1 */
+
+static const GLubyte ch161data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x0,0x0,0x0,0xc0,
+0xc0,
+};
+
+static const BitmapCharRec ch161 = {2,17,-4,5,8,ch161data};
+
+/* char: 0xa0 */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch160data[] = { 0x0 };
+static const BitmapCharRec ch160 = {1,1,0,0,6,ch160data};
+#else
+static const BitmapCharRec ch160 = {0,0,0,0,6,0};
+#endif
+
+/* char: 0x7e '~' */
+
+static const GLubyte ch126data[] = {
+0x83,0x80,0xc7,0xc0,0x7c,0x60,0x38,0x20,
+};
+
+static const BitmapCharRec ch126 = {11,4,-1,-5,13,ch126data};
+
+/* char: 0x7d '}' */
+
+static const GLubyte ch125data[] = {
+0xe0,0x30,0x18,0x18,0x18,0x18,0x18,0x18,0x8,0xc,0x4,0x3,0x4,0xc,0x8,0x18,
+0x18,0x18,0x18,0x18,0x30,0xe0,
+};
+
+static const BitmapCharRec ch125 = {8,22,-1,5,10,ch125data};
+
+/* char: 0x7c '|' */
+
+static const GLubyte ch124data[] = {
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,
+};
+
+static const BitmapCharRec ch124 = {2,17,-2,0,6,ch124data};
+
+/* char: 0x7b '{' */
+
+static const GLubyte ch123data[] = {
+0x7,0xc,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x30,0x20,0xc0,0x20,0x30,0x10,0x18,
+0x18,0x18,0x18,0x18,0xc,0x7,
+};
+
+static const BitmapCharRec ch123 = {8,22,-1,5,10,ch123data};
+
+/* char: 0x7a 'z' */
+
+static const GLubyte ch122data[] = {
+0xff,0xc3,0x61,0x70,0x30,0x38,0x18,0x1c,0xe,0x86,0xc3,0xff,
+};
+
+static const BitmapCharRec ch122 = {8,12,-1,0,10,ch122data};
+
+/* char: 0x79 'y' */
+
+static const GLubyte ch121data[] = {
+0xe0,0x0,0xf0,0x0,0x18,0x0,0x8,0x0,0xc,0x0,0x4,0x0,0xe,0x0,0xe,0x0,
+0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,0x30,0x80,0x60,0x80,0x60,0xc0,
+0xf1,0xe0,
+};
+
+static const BitmapCharRec ch121 = {11,17,0,5,11,ch121data};
+
+/* char: 0x78 'x' */
+
+static const GLubyte ch120data[] = {
+0xf1,0xe0,0x60,0xc0,0x21,0x80,0x33,0x80,0x1b,0x0,0xe,0x0,0xc,0x0,0x1a,0x0,
+0x39,0x0,0x31,0x80,0x60,0xc0,0xf1,0xe0,
+};
+
+static const BitmapCharRec ch120 = {11,12,-1,0,13,ch120data};
+
+/* char: 0x77 'w' */
+
+static const GLubyte ch119data[] = {
+0x4,0x10,0x0,0xe,0x38,0x0,0xe,0x38,0x0,0x1a,0x28,0x0,0x1a,0x64,0x0,0x19,
+0x64,0x0,0x31,0x64,0x0,0x30,0xc2,0x0,0x30,0xc2,0x0,0x60,0xc2,0x0,0x60,0xc3,
+0x0,0xf1,0xe7,0x80,
+};
+
+static const BitmapCharRec ch119 = {17,12,0,0,17,ch119data};
+
+/* char: 0x76 'v' */
+
+static const GLubyte ch118data[] = {
+0x4,0x0,0xe,0x0,0xe,0x0,0x1a,0x0,0x19,0x0,0x19,0x0,0x31,0x0,0x30,0x80,
+0x30,0x80,0x60,0x80,0x60,0xc0,0xf1,0xe0,
+};
+
+static const BitmapCharRec ch118 = {11,12,0,0,11,ch118data};
+
+/* char: 0x75 'u' */
+
+static const GLubyte ch117data[] = {
+0x1c,0xe0,0x3e,0xc0,0x71,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0xe1,0xc0,
+};
+
+static const BitmapCharRec ch117 = {11,12,-1,0,13,ch117data};
+
+/* char: 0x74 't' */
+
+static const GLubyte ch116data[] = {
+0x1c,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x70,0x30,0x10,
+};
+
+static const BitmapCharRec ch116 = {7,15,0,0,7,ch116data};
+
+/* char: 0x73 's' */
+
+static const GLubyte ch115data[] = {
+0xf8,0xc6,0x83,0x3,0x7,0x1e,0x7c,0x70,0xe0,0xc2,0x66,0x3e,
+};
+
+static const BitmapCharRec ch115 = {8,12,-1,0,10,ch115data};
+
+/* char: 0x72 'r' */
+
+static const GLubyte ch114data[] = {
+0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x76,0x6e,0xe6,
+};
+
+static const BitmapCharRec ch114 = {7,12,-1,0,8,ch114data};
+
+/* char: 0x71 'q' */
+
+static const GLubyte ch113data[] = {
+0x3,0xc0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1d,0x80,0x73,0x80,0x61,0x80,
+0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x61,0x80,0x73,0x80,
+0x1d,0x80,
+};
+
+static const BitmapCharRec ch113 = {10,17,-1,5,12,ch113data};
+
+/* char: 0x70 'p' */
+
+static const GLubyte ch112data[] = {
+0xf0,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x6e,0x0,0x73,0x80,0x61,0x80,
+0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x61,0x80,0x73,0x80,
+0xee,0x0,
+};
+
+static const BitmapCharRec ch112 = {10,17,-1,5,12,ch112data};
+
+/* char: 0x6f 'o' */
+
+static const GLubyte ch111data[] = {
+0x1e,0x0,0x73,0x80,0x61,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0x61,0x80,0x73,0x80,0x1e,0x0,
+};
+
+static const BitmapCharRec ch111 = {10,12,-1,0,12,ch111data};
+
+/* char: 0x6e 'n' */
+
+static const GLubyte ch110data[] = {
+0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x71,0xc0,0x6f,0x80,0xe7,0x0,
+};
+
+static const BitmapCharRec ch110 = {11,12,-1,0,13,ch110data};
+
+/* char: 0x6d 'm' */
+
+static const GLubyte ch109data[] = {
+0xf1,0xe3,0xc0,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,
+0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x60,0xc1,0x80,0x71,0xe3,0x80,0x6f,0x9f,
+0x0,0xe7,0xe,0x0,
+};
+
+static const BitmapCharRec ch109 = {18,12,-1,0,20,ch109data};
+
+/* char: 0x6c 'l' */
+
+static const GLubyte ch108data[] = {
+0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
+0xe0,
+};
+
+static const BitmapCharRec ch108 = {4,17,-1,0,6,ch108data};
+
+/* char: 0x6b 'k' */
+
+static const GLubyte ch107data[] = {
+0xf3,0xe0,0x61,0xc0,0x63,0x80,0x67,0x0,0x6e,0x0,0x6c,0x0,0x78,0x0,0x68,0x0,
+0x64,0x0,0x66,0x0,0x63,0x0,0x67,0xc0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,
+0xe0,0x0,
+};
+
+static const BitmapCharRec ch107 = {11,17,-1,0,12,ch107data};
+
+/* char: 0x6a 'j' */
+
+static const GLubyte ch106data[] = {
+0xc0,0xe0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+0x70,0x0,0x0,0x0,0x30,0x30,
+};
+
+static const BitmapCharRec ch106 = {4,22,0,5,6,ch106data};
+
+/* char: 0x69 'i' */
+
+static const GLubyte ch105data[] = {
+0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x0,0x0,0x0,0x60,
+0x60,
+};
+
+static const BitmapCharRec ch105 = {4,17,-1,0,6,ch105data};
+
+/* char: 0x68 'h' */
+
+static const GLubyte ch104data[] = {
+0xf1,0xe0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x71,0xc0,0x6f,0x80,0x67,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,
+0xe0,0x0,
+};
+
+static const BitmapCharRec ch104 = {11,17,-1,0,13,ch104data};
+
+/* char: 0x67 'g' */
+
+static const GLubyte ch103data[] = {
+0x3f,0x0,0xf1,0xc0,0xc0,0x60,0xc0,0x20,0x60,0x60,0x3f,0xc0,0x7f,0x0,0x60,0x0,
+0x30,0x0,0x3e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0,
+0x1f,0xc0,
+};
+
+static const BitmapCharRec ch103 = {11,17,-1,5,12,ch103data};
+
+/* char: 0x66 'f' */
+
+static const GLubyte ch102data[] = {
+0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xfe,0x30,0x30,0x30,0x16,
+0xe,
+};
+
+static const BitmapCharRec ch102 = {7,17,0,0,7,ch102data};
+
+/* char: 0x65 'e' */
+
+static const GLubyte ch101data[] = {
+0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xff,0x80,
+0xc1,0x80,0x41,0x80,0x63,0x0,0x1e,0x0,
+};
+
+static const BitmapCharRec ch101 = {9,12,-1,0,11,ch101data};
+
+/* char: 0x64 'd' */
+
+static const GLubyte ch100data[] = {
+0x1e,0xc0,0x73,0x80,0x61,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,
+0xc1,0x80,0x61,0x80,0x73,0x80,0x1d,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,
+0x3,0x80,
+};
+
+static const BitmapCharRec ch100 = {10,17,-1,0,12,ch100data};
+
+/* char: 0x63 'c' */
+
+static const GLubyte ch99data[] = {
+0x1e,0x0,0x7f,0x0,0x70,0x80,0xe0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,
+0xc0,0x0,0x41,0x80,0x63,0x80,0x1f,0x0,
+};
+
+static const BitmapCharRec ch99 = {9,12,-1,0,11,ch99data};
+
+/* char: 0x62 'b' */
+
+static const GLubyte ch98data[] = {
+0x5e,0x0,0x73,0x80,0x61,0x80,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,0x60,0xc0,
+0x60,0xc0,0x61,0x80,0x73,0x80,0x6e,0x0,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x0,
+0xe0,0x0,
+};
+
+static const BitmapCharRec ch98 = {10,17,-1,0,12,ch98data};
+
+/* char: 0x61 'a' */
+
+static const GLubyte ch97data[] = {
+0x71,0x80,0xfb,0x0,0xc7,0x0,0xc3,0x0,0xc3,0x0,0x63,0x0,0x3b,0x0,0xf,0x0,
+0x3,0x0,0x63,0x0,0x67,0x0,0x3e,0x0,
+};
+
+static const BitmapCharRec ch97 = {9,12,-1,0,11,ch97data};
+
+/* char: 0x60 '`' */
+
+static const GLubyte ch96data[] = {
+0x60,0xe0,0x80,0xc0,0x60,
+};
+
+static const BitmapCharRec ch96 = {3,5,-2,-12,7,ch96data};
+
+/* char: 0x5f '_' */
+
+static const GLubyte ch95data[] = {
+0xff,0xf8,0xff,0xf8,
+};
+
+static const BitmapCharRec ch95 = {13,2,0,5,13,ch95data};
+
+/* char: 0x5e '^' */
+
+static const GLubyte ch94data[] = {
+0x80,0x80,0xc1,0x80,0x41,0x0,0x63,0x0,0x22,0x0,0x36,0x0,0x14,0x0,0x1c,0x0,
+0x8,0x0,
+};
+
+static const BitmapCharRec ch94 = {9,9,-1,-8,11,ch94data};
+
+/* char: 0x5d ']' */
+
+static const GLubyte ch93data[] = {
+0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+0x18,0x18,0x18,0x18,0xf8,
+};
+
+static const BitmapCharRec ch93 = {5,21,-1,4,8,ch93data};
+
+/* char: 0x5c '\' */
+
+static const GLubyte ch92data[] = {
+0x6,0x6,0x4,0xc,0xc,0x8,0x18,0x18,0x10,0x30,0x30,0x20,0x60,0x60,0x40,0xc0,
+0xc0,
+};
+
+static const BitmapCharRec ch92 = {7,17,0,0,7,ch92data};
+
+/* char: 0x5b '[' */
+
+static const GLubyte ch91data[] = {
+0xf8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0xc0,0xc0,0xf8,
+};
+
+static const BitmapCharRec ch91 = {5,21,-2,4,8,ch91data};
+
+/* char: 0x5a 'Z' */
+
+static const GLubyte ch90data[] = {
+0xff,0xf8,0xe0,0x18,0x70,0x8,0x30,0x8,0x38,0x0,0x18,0x0,0x1c,0x0,0xe,0x0,
+0x6,0x0,0x7,0x0,0x3,0x0,0x3,0x80,0x1,0xc0,0x80,0xc0,0x80,0xe0,0xc0,0x70,
+0xff,0xf0,
+};
+
+static const BitmapCharRec ch90 = {13,17,-1,0,15,ch90data};
+
+/* char: 0x59 'Y' */
+
+static const GLubyte ch89data[] = {
+0x7,0xe0,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0xc0,
+0x3,0x40,0x6,0x60,0x6,0x20,0xc,0x30,0x1c,0x10,0x18,0x18,0x38,0x8,0x30,0xc,
+0xfc,0x3f,
+};
+
+static const BitmapCharRec ch89 = {16,17,0,0,16,ch89data};
+
+/* char: 0x58 'X' */
+
+static const GLubyte ch88data[] = {
+0xfc,0xf,0xc0,0x30,0x3,0x80,0x18,0x7,0x0,0x8,0xe,0x0,0x4,0xc,0x0,0x6,
+0x18,0x0,0x2,0x38,0x0,0x1,0x70,0x0,0x0,0xe0,0x0,0x0,0xc0,0x0,0x1,0xc0,
+0x0,0x3,0xa0,0x0,0x3,0x10,0x0,0x6,0x8,0x0,0xe,0xc,0x0,0x1c,0x6,0x0,
+0x7e,0xf,0x80,
+};
+
+static const BitmapCharRec ch88 = {18,17,0,0,18,ch88data};
+
+/* char: 0x57 'W' */
+
+static const GLubyte ch87data[] = {
+0x1,0x83,0x0,0x1,0x83,0x0,0x1,0x83,0x80,0x3,0x87,0x80,0x3,0x46,0x80,0x3,
+0x46,0xc0,0x6,0x46,0x40,0x6,0x4c,0x40,0x6,0x4c,0x60,0xc,0x2c,0x60,0xc,0x2c,
+0x20,0x18,0x2c,0x20,0x18,0x18,0x30,0x18,0x18,0x10,0x30,0x18,0x10,0x30,0x18,0x18,
+0xfc,0x7e,0x7e,
+};
+
+static const BitmapCharRec ch87 = {23,17,0,0,23,ch87data};
+
+/* char: 0x56 'V' */
+
+static const GLubyte ch86data[] = {
+0x1,0x80,0x0,0x1,0x80,0x0,0x1,0x80,0x0,0x3,0xc0,0x0,0x3,0x40,0x0,0x3,
+0x60,0x0,0x6,0x20,0x0,0x6,0x20,0x0,0x6,0x30,0x0,0xc,0x10,0x0,0xc,0x18,
+0x0,0x18,0x8,0x0,0x18,0x8,0x0,0x18,0xc,0x0,0x30,0x4,0x0,0x30,0x6,0x0,
+0xfc,0x1f,0x80,
+};
+
+static const BitmapCharRec ch86 = {17,17,0,0,17,ch86data};
+
+/* char: 0x55 'U' */
+
+static const GLubyte ch85data[] = {
+0x7,0xe0,0x1c,0x30,0x18,0x8,0x30,0x8,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,0x30,0x4,
+0xfc,0x1f,
+};
+
+static const BitmapCharRec ch85 = {16,17,-1,0,18,ch85data};
+
+/* char: 0x54 'T' */
+
+static const GLubyte ch84data[] = {
+0xf,0xc0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,
+0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0x83,0x4,0x83,0x4,0xc3,0xc,
+0xff,0xfc,
+};
+
+static const BitmapCharRec ch84 = {14,17,-1,0,16,ch84data};
+
+/* char: 0x53 'S' */
+
+static const GLubyte ch83data[] = {
+0x9e,0x0,0xf1,0x80,0xc0,0xc0,0x80,0x60,0x80,0x60,0x0,0x60,0x0,0xe0,0x3,0xc0,
+0xf,0x80,0x1e,0x0,0x78,0x0,0xe0,0x0,0xc0,0x40,0xc0,0x40,0xc0,0xc0,0x63,0xc0,
+0x1e,0x40,
+};
+
+static const BitmapCharRec ch83 = {11,17,-1,0,13,ch83data};
+
+/* char: 0x52 'R' */
+
+static const GLubyte ch82data[] = {
+0xfc,0x1e,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0x60,0x30,0xc0,0x31,0xc0,0x33,0x80,
+0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x38,0x30,0x18,0x30,0x38,0x30,0x30,0x30,0x70,
+0xff,0xc0,
+};
+
+static const BitmapCharRec ch82 = {15,17,-1,0,16,ch82data};
+
+/* char: 0x51 'Q' */
+
+static const GLubyte ch81data[] = {
+0x0,0xf,0x0,0x38,0x0,0x70,0x0,0xe0,0x1,0xc0,0x7,0xe0,0x1c,0x38,0x38,0x1c,
+0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,
+0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,0x7,0xe0,
+};
+
+static const BitmapCharRec ch81 = {16,22,-1,5,18,ch81data};
+
+/* char: 0x50 'P' */
+
+static const GLubyte ch80data[] = {
+0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,
+0x3f,0xc0,0x30,0x70,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,
+0xff,0xc0,
+};
+
+static const BitmapCharRec ch80 = {13,17,-1,0,15,ch80data};
+
+/* char: 0x4f 'O' */
+
+static const GLubyte ch79data[] = {
+0x7,0xe0,0x1c,0x38,0x38,0x1c,0x60,0x6,0x60,0x6,0xc0,0x3,0xc0,0x3,0xc0,0x3,
+0xc0,0x3,0xc0,0x3,0xc0,0x3,0xc0,0x3,0x60,0x6,0x60,0x6,0x38,0x1c,0x1c,0x38,
+0x7,0xe0,
+};
+
+static const BitmapCharRec ch79 = {16,17,-1,0,18,ch79data};
+
+/* char: 0x4e 'N' */
+
+static const GLubyte ch78data[] = {
+0xf8,0xc,0x20,0x1c,0x20,0x1c,0x20,0x34,0x20,0x64,0x20,0x64,0x20,0xc4,0x21,0x84,
+0x21,0x84,0x23,0x4,0x26,0x4,0x26,0x4,0x2c,0x4,0x38,0x4,0x38,0x4,0x30,0x4,
+0xf0,0x1f,
+};
+
+static const BitmapCharRec ch78 = {16,17,-1,0,18,ch78data};
+
+/* char: 0x4d 'M' */
+
+static const GLubyte ch77data[] = {
+0xf8,0x21,0xf8,0x20,0x60,0x60,0x20,0x60,0x60,0x20,0xd0,0x60,0x20,0xd0,0x60,0x21,
+0x88,0x60,0x21,0x88,0x60,0x23,0x8,0x60,0x23,0x4,0x60,0x26,0x4,0x60,0x26,0x2,
+0x60,0x2c,0x2,0x60,0x2c,0x2,0x60,0x38,0x1,0x60,0x38,0x1,0x60,0x30,0x0,0xe0,
+0xf0,0x0,0xf8,
+};
+
+static const BitmapCharRec ch77 = {21,17,-1,0,22,ch77data};
+
+/* char: 0x4c 'L' */
+
+static const GLubyte ch76data[] = {
+0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,
+0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,
+0xfc,0x0,
+};
+
+static const BitmapCharRec ch76 = {13,17,-1,0,14,ch76data};
+
+/* char: 0x4b 'K' */
+
+static const GLubyte ch75data[] = {
+0xfc,0x1f,0x30,0xe,0x30,0x1c,0x30,0x38,0x30,0x70,0x30,0xe0,0x31,0xc0,0x33,0x80,
+0x3f,0x0,0x3e,0x0,0x33,0x0,0x31,0x80,0x30,0xc0,0x30,0x60,0x30,0x30,0x30,0x18,
+0xfc,0x7e,
+};
+
+static const BitmapCharRec ch75 = {16,17,-1,0,17,ch75data};
+
+/* char: 0x4a 'J' */
+
+static const GLubyte ch74data[] = {
+0x78,0x0,0xcc,0x0,0xc6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,
+0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,
+0x1f,0x80,
+};
+
+static const BitmapCharRec ch74 = {9,17,-1,0,11,ch74data};
+
+/* char: 0x49 'I' */
+
+static const GLubyte ch73data[] = {
+0xfc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+0xfc,
+};
+
+static const BitmapCharRec ch73 = {6,17,-1,0,8,ch73data};
+
+/* char: 0x48 'H' */
+
+static const GLubyte ch72data[] = {
+0xfc,0x1f,0x80,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,
+0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x3f,0xfe,0x0,0x30,0x6,0x0,0x30,0x6,
+0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,0x30,0x6,0x0,
+0xfc,0x1f,0x80,
+};
+
+static const BitmapCharRec ch72 = {17,17,-1,0,19,ch72data};
+
+/* char: 0x47 'G' */
+
+static const GLubyte ch71data[] = {
+0x7,0xe0,0x1e,0x38,0x38,0x1c,0x60,0xc,0x60,0xc,0xc0,0xc,0xc0,0xc,0xc0,0x3f,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,
+0x7,0xe4,
+};
+
+static const BitmapCharRec ch71 = {16,17,-1,0,18,ch71data};
+
+/* char: 0x46 'F' */
+
+static const GLubyte ch70data[] = {
+0xfc,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x0,0x30,0x20,0x30,0x20,
+0x3f,0xe0,0x30,0x20,0x30,0x20,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,
+0xff,0xf0,
+};
+
+static const BitmapCharRec ch70 = {12,17,-1,0,14,ch70data};
+
+/* char: 0x45 'E' */
+
+static const GLubyte ch69data[] = {
+0xff,0xf8,0x30,0x18,0x30,0x8,0x30,0x8,0x30,0x0,0x30,0x0,0x30,0x40,0x30,0x40,
+0x3f,0xc0,0x30,0x40,0x30,0x40,0x30,0x0,0x30,0x0,0x30,0x10,0x30,0x10,0x30,0x30,
+0xff,0xf0,
+};
+
+static const BitmapCharRec ch69 = {13,17,-1,0,15,ch69data};
+
+/* char: 0x44 'D' */
+
+static const GLubyte ch68data[] = {
+0xff,0xc0,0x30,0x70,0x30,0x38,0x30,0xc,0x30,0xc,0x30,0x6,0x30,0x6,0x30,0x6,
+0x30,0x6,0x30,0x6,0x30,0x6,0x30,0x6,0x30,0xc,0x30,0xc,0x30,0x38,0x30,0x70,
+0xff,0xc0,
+};
+
+static const BitmapCharRec ch68 = {15,17,-1,0,17,ch68data};
+
+/* char: 0x43 'C' */
+
+static const GLubyte ch67data[] = {
+0x7,0xe0,0x1e,0x38,0x38,0x8,0x60,0x4,0x60,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,
+0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0x60,0x4,0x60,0x4,0x38,0xc,0x1c,0x3c,
+0x7,0xe4,
+};
+
+static const BitmapCharRec ch67 = {14,17,-1,0,16,ch67data};
+
+/* char: 0x42 'B' */
+
+static const GLubyte ch66data[] = {
+0xff,0xe0,0x30,0x78,0x30,0x18,0x30,0xc,0x30,0xc,0x30,0xc,0x30,0x18,0x30,0x38,
+0x3f,0xe0,0x30,0x40,0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x30,0x30,0x70,
+0xff,0xc0,
+};
+
+static const BitmapCharRec ch66 = {14,17,-1,0,16,ch66data};
+
+/* char: 0x41 'A' */
+
+static const GLubyte ch65data[] = {
+0xfc,0x1f,0x80,0x30,0x6,0x0,0x10,0x6,0x0,0x10,0xc,0x0,0x18,0xc,0x0,0x8,
+0xc,0x0,0xf,0xf8,0x0,0xc,0x18,0x0,0x4,0x18,0x0,0x4,0x30,0x0,0x6,0x30,
+0x0,0x2,0x30,0x0,0x2,0x60,0x0,0x1,0x60,0x0,0x1,0xc0,0x0,0x1,0xc0,0x0,
+0x0,0x80,0x0,
+};
+
+static const BitmapCharRec ch65 = {17,17,0,0,17,ch65data};
+
+/* char: 0x40 '@' */
+
+static const GLubyte ch64data[] = {
+0x3,0xf0,0x0,0xe,0xc,0x0,0x18,0x0,0x0,0x30,0x0,0x0,0x61,0xde,0x0,0x63,
+0x7b,0x0,0xc6,0x39,0x80,0xc6,0x18,0x80,0xc6,0x18,0xc0,0xc6,0x18,0x40,0xc6,0xc,
+0x40,0xc3,0xc,0x40,0xc3,0x8c,0x40,0xe1,0xfc,0x40,0x60,0xec,0xc0,0x70,0x0,0x80,
+0x38,0x1,0x80,0x1c,0x3,0x0,0xf,0xe,0x0,0x3,0xf8,0x0,
+};
+
+static const BitmapCharRec ch64 = {18,20,-2,3,22,ch64data};
+
+/* char: 0x3f '?' */
+
+static const GLubyte ch63data[] = {
+0x30,0x30,0x0,0x0,0x10,0x10,0x10,0x18,0x18,0xc,0xe,0x7,0xc3,0xc3,0x83,0xc6,
+0x7c,
+};
+
+static const BitmapCharRec ch63 = {8,17,-2,0,11,ch63data};
+
+/* char: 0x3e '>' */
+
+static const GLubyte ch62data[] = {
+0xc0,0x0,0x70,0x0,0x1c,0x0,0x7,0x0,0x1,0xc0,0x0,0x60,0x1,0xc0,0x7,0x0,
+0x1c,0x0,0x70,0x0,0xc0,0x0,
+};
+
+static const BitmapCharRec ch62 = {11,11,-1,-1,13,ch62data};
+
+/* char: 0x3d '=' */
+
+static const GLubyte ch61data[] = {
+0xff,0xf0,0xff,0xf0,0x0,0x0,0x0,0x0,0xff,0xf0,0xff,0xf0,
+};
+
+static const BitmapCharRec ch61 = {12,6,-1,-4,14,ch61data};
+
+/* char: 0x3c '<' */
+
+static const GLubyte ch60data[] = {
+0x0,0x60,0x1,0xc0,0x7,0x0,0x1c,0x0,0x70,0x0,0xc0,0x0,0x70,0x0,0x1c,0x0,
+0x7,0x0,0x1,0xc0,0x0,0x60,
+};
+
+static const BitmapCharRec ch60 = {11,11,-1,-1,13,ch60data};
+
+/* char: 0x3b ';' */
+
+static const GLubyte ch59data[] = {
+0xc0,0x60,0x20,0xe0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch59 = {3,14,-2,3,7,ch59data};
+
+/* char: 0x3a ':' */
+
+static const GLubyte ch58data[] = {
+0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,
+};
+
+static const BitmapCharRec ch58 = {2,11,-2,0,6,ch58data};
+
+/* char: 0x39 '9' */
+
+static const GLubyte ch57data[] = {
+0xf0,0x0,0x1c,0x0,0x6,0x0,0x3,0x0,0x3,0x80,0x1,0x80,0x1d,0x80,0x73,0xc0,
+0x61,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc1,0xc0,0x61,0x80,0x77,0x80,
+0x1e,0x0,
+};
+
+static const BitmapCharRec ch57 = {10,17,-1,0,12,ch57data};
+
+/* char: 0x38 '8' */
+
+static const GLubyte ch56data[] = {
+0x1e,0x0,0x73,0x80,0xe1,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x41,0xc0,0x61,0x80,
+0x37,0x0,0x1e,0x0,0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0x61,0x80,0x33,0x0,
+0x1e,0x0,
+};
+
+static const BitmapCharRec ch56 = {10,17,-1,0,12,ch56data};
+
+/* char: 0x37 '7' */
+
+static const GLubyte ch55data[] = {
+0x18,0x0,0x18,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x4,0x0,0x6,0x0,0x6,0x0,
+0x2,0x0,0x3,0x0,0x3,0x0,0x1,0x0,0x1,0x80,0x81,0x80,0xc0,0xc0,0xff,0xc0,
+0x7f,0xc0,
+};
+
+static const BitmapCharRec ch55 = {10,17,-1,0,12,ch55data};
+
+/* char: 0x36 '6' */
+
+static const GLubyte ch54data[] = {
+0x1e,0x0,0x7b,0x80,0x61,0x80,0xe0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc1,0x80,0xf3,0x80,0xee,0x0,0x60,0x0,0x70,0x0,0x30,0x0,0x18,0x0,0xe,0x0,
+0x3,0xc0,
+};
+
+static const BitmapCharRec ch54 = {10,17,-1,0,12,ch54data};
+
+/* char: 0x35 '5' */
+
+static const GLubyte ch53data[] = {
+0x7e,0x0,0xe3,0x80,0xc1,0x80,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x0,0xc0,0x1,0xc0,
+0x3,0x80,0xf,0x80,0x7e,0x0,0x78,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x1f,0x80,
+0x1f,0xc0,
+};
+
+static const BitmapCharRec ch53 = {10,17,-1,0,12,ch53data};
+
+/* char: 0x34 '4' */
+
+static const GLubyte ch52data[] = {
+0x3,0x0,0x3,0x0,0x3,0x0,0x3,0x0,0xff,0xc0,0xff,0xc0,0xc3,0x0,0x43,0x0,
+0x63,0x0,0x23,0x0,0x33,0x0,0x13,0x0,0x1b,0x0,0xb,0x0,0x7,0x0,0x7,0x0,
+0x3,0x0,
+};
+
+static const BitmapCharRec ch52 = {10,17,-1,0,12,ch52data};
+
+/* char: 0x33 '3' */
+
+static const GLubyte ch51data[] = {
+0x78,0x0,0xe6,0x0,0xc3,0x0,0x1,0x0,0x1,0x80,0x1,0x80,0x1,0x80,0x3,0x80,
+0x7,0x0,0x1e,0x0,0xc,0x0,0x6,0x0,0x83,0x0,0x83,0x0,0x47,0x0,0x7e,0x0,
+0x1c,0x0,
+};
+
+static const BitmapCharRec ch51 = {9,17,-1,0,12,ch51data};
+
+/* char: 0x32 '2' */
+
+static const GLubyte ch50data[] = {
+0xff,0x80,0xff,0xc0,0x60,0x40,0x30,0x0,0x18,0x0,0xc,0x0,0x4,0x0,0x6,0x0,
+0x3,0x0,0x3,0x0,0x1,0x80,0x1,0x80,0x81,0x80,0x81,0x80,0x43,0x80,0x7f,0x0,
+0x1c,0x0,
+};
+
+static const BitmapCharRec ch50 = {10,17,-1,0,12,ch50data};
+
+/* char: 0x31 '1' */
+
+static const GLubyte ch49data[] = {
+0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x18,
+0x8,
+};
+
+static const BitmapCharRec ch49 = {8,17,-2,0,12,ch49data};
+
+/* char: 0x30 '0' */
+
+static const GLubyte ch48data[] = {
+0x1e,0x0,0x33,0x0,0x61,0x80,0x61,0x80,0xe1,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x61,0x80,0x61,0x80,0x33,0x0,
+0x1e,0x0,
+};
+
+static const BitmapCharRec ch48 = {10,17,-1,0,12,ch48data};
+
+/* char: 0x2f '/' */
+
+static const GLubyte ch47data[] = {
+0xc0,0xc0,0xc0,0x60,0x60,0x20,0x30,0x30,0x10,0x18,0x18,0x8,0xc,0xc,0x4,0x6,
+0x6,0x3,0x3,0x3,
+};
+
+static const BitmapCharRec ch47 = {8,20,1,3,7,ch47data};
+
+/* char: 0x2e '.' */
+
+static const GLubyte ch46data[] = {
+0xc0,0xc0,
+};
+
+static const BitmapCharRec ch46 = {2,2,-2,0,6,ch46data};
+
+/* char: 0x2d '-' */
+
+static const GLubyte ch45data[] = {
+0xff,0xf0,0xff,0xf0,
+};
+
+static const BitmapCharRec ch45 = {12,2,-1,-6,14,ch45data};
+
+/* char: 0x2c ',' */
+
+static const GLubyte ch44data[] = {
+0xc0,0x60,0x20,0xe0,0xc0,
+};
+
+static const BitmapCharRec ch44 = {3,5,-2,3,7,ch44data};
+
+/* char: 0x2b '+' */
+
+static const GLubyte ch43data[] = {
+0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,0xff,0xf0,0xff,0xf0,0x6,0x0,
+0x6,0x0,0x6,0x0,0x6,0x0,0x6,0x0,
+};
+
+static const BitmapCharRec ch43 = {12,12,-1,-1,14,ch43data};
+
+/* char: 0x2a '*' */
+
+static const GLubyte ch42data[] = {
+0x8,0x0,0x1c,0x0,0xc9,0x80,0xeb,0x80,0x1c,0x0,0xeb,0x80,0xc9,0x80,0x1c,0x0,
+0x8,0x0,
+};
+
+static const BitmapCharRec ch42 = {9,9,-2,-8,12,ch42data};
+
+/* char: 0x29 ')' */
+
+static const GLubyte ch41data[] = {
+0x80,0x40,0x20,0x30,0x10,0x18,0x18,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x18,
+0x18,0x10,0x30,0x20,0x40,0x80,
+};
+
+static const BitmapCharRec ch41 = {6,22,-1,5,8,ch41data};
+
+/* char: 0x28 '(' */
+
+static const GLubyte ch40data[] = {
+0x4,0x8,0x10,0x30,0x20,0x60,0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x60,
+0x60,0x20,0x30,0x10,0x8,0x4,
+};
+
+static const BitmapCharRec ch40 = {6,22,-1,5,8,ch40data};
+
+/* char: 0x27 ''' */
+
+static const GLubyte ch39data[] = {
+0xc0,0x60,0x20,0xe0,0xc0,
+};
+
+static const BitmapCharRec ch39 = {3,5,-3,-12,8,ch39data};
+
+/* char: 0x26 '&' */
+
+static const GLubyte ch38data[] = {
+0x3c,0x3c,0x7f,0x7e,0xe1,0xe1,0xc0,0xc0,0xc1,0xc0,0xc1,0xa0,0x63,0x20,0x37,0x10,
+0x1e,0x18,0xe,0x3e,0xf,0x0,0x1d,0x80,0x18,0xc0,0x18,0x40,0x18,0x40,0xc,0xc0,
+0x7,0x80,
+};
+
+static const BitmapCharRec ch38 = {16,17,-1,0,18,ch38data};
+
+/* char: 0x25 '%' */
+
+static const GLubyte ch37data[] = {
+0x30,0x3c,0x0,0x18,0x72,0x0,0xc,0x61,0x0,0x4,0x60,0x80,0x6,0x60,0x80,0x3,
+0x30,0x80,0x1,0x19,0x80,0x1,0x8f,0x0,0x78,0xc0,0x0,0xe4,0x40,0x0,0xc2,0x60,
+0x0,0xc1,0x30,0x0,0xc1,0x10,0x0,0x61,0x18,0x0,0x33,0xfc,0x0,0x1e,0xc,0x0,
+};
+
+static const BitmapCharRec ch37 = {17,16,-1,0,19,ch37data};
+
+/* char: 0x24 '$' */
+
+static const GLubyte ch36data[] = {
+0x4,0x0,0x4,0x0,0x3f,0x0,0xe5,0xc0,0xc4,0xc0,0x84,0x60,0x84,0x60,0x4,0x60,
+0x4,0xe0,0x7,0xc0,0x7,0x80,0x1e,0x0,0x3c,0x0,0x74,0x0,0x64,0x0,0x64,0x20,
+0x64,0x60,0x34,0xe0,0x1f,0x80,0x4,0x0,0x4,0x0,
+};
+
+static const BitmapCharRec ch36 = {11,21,0,2,12,ch36data};
+
+/* char: 0x23 '#' */
+
+static const GLubyte ch35data[] = {
+0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0x22,0x0,0xff,0xc0,0xff,0xc0,0x11,0x0,
+0x11,0x0,0x11,0x0,0x7f,0xe0,0x7f,0xe0,0x8,0x80,0x8,0x80,0x8,0x80,0x8,0x80,
+0x8,0x80,
+};
+
+static const BitmapCharRec ch35 = {11,17,-1,0,13,ch35data};
+
+/* char: 0x22 '"' */
+
+static const GLubyte ch34data[] = {
+0x88,0xcc,0xcc,0xcc,0xcc,
+};
+
+static const BitmapCharRec ch34 = {6,5,-1,-12,10,ch34data};
+
+/* char: 0x21 '!' */
+
+static const GLubyte ch33data[] = {
+0xc0,0xc0,0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+0xc0,
+};
+
+static const BitmapCharRec ch33 = {2,17,-3,0,8,ch33data};
+
+/* char: 0x20 ' ' */
+
+#ifdef _WIN32
+/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with
+   a height or width of zero does not advance the raster position
+   as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */
+static const GLubyte ch32data[] = { 0x0 };
+static const BitmapCharRec ch32 = {1,1,0,0,6,ch32data};
+#else
+static const BitmapCharRec ch32 = {0,0,0,0,6,0};
+#endif
+
+static const BitmapCharRec * const chars[] = {
+&ch32,
+&ch33,
+&ch34,
+&ch35,
+&ch36,
+&ch37,
+&ch38,
+&ch39,
+&ch40,
+&ch41,
+&ch42,
+&ch43,
+&ch44,
+&ch45,
+&ch46,
+&ch47,
+&ch48,
+&ch49,
+&ch50,
+&ch51,
+&ch52,
+&ch53,
+&ch54,
+&ch55,
+&ch56,
+&ch57,
+&ch58,
+&ch59,
+&ch60,
+&ch61,
+&ch62,
+&ch63,
+&ch64,
+&ch65,
+&ch66,
+&ch67,
+&ch68,
+&ch69,
+&ch70,
+&ch71,
+&ch72,
+&ch73,
+&ch74,
+&ch75,
+&ch76,
+&ch77,
+&ch78,
+&ch79,
+&ch80,
+&ch81,
+&ch82,
+&ch83,
+&ch84,
+&ch85,
+&ch86,
+&ch87,
+&ch88,
+&ch89,
+&ch90,
+&ch91,
+&ch92,
+&ch93,
+&ch94,
+&ch95,
+&ch96,
+&ch97,
+&ch98,
+&ch99,
+&ch100,
+&ch101,
+&ch102,
+&ch103,
+&ch104,
+&ch105,
+&ch106,
+&ch107,
+&ch108,
+&ch109,
+&ch110,
+&ch111,
+&ch112,
+&ch113,
+&ch114,
+&ch115,
+&ch116,
+&ch117,
+&ch118,
+&ch119,
+&ch120,
+&ch121,
+&ch122,
+&ch123,
+&ch124,
+&ch125,
+&ch126,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+&ch160,
+&ch161,
+&ch162,
+&ch163,
+&ch164,
+&ch165,
+&ch166,
+&ch167,
+&ch168,
+&ch169,
+&ch170,
+&ch171,
+&ch172,
+&ch173,
+&ch174,
+&ch175,
+&ch176,
+&ch177,
+&ch178,
+&ch179,
+&ch180,
+&ch181,
+&ch182,
+&ch183,
+&ch184,
+&ch185,
+&ch186,
+&ch187,
+&ch188,
+&ch189,
+&ch190,
+&ch191,
+&ch192,
+&ch193,
+&ch194,
+&ch195,
+&ch196,
+&ch197,
+&ch198,
+&ch199,
+&ch200,
+&ch201,
+&ch202,
+&ch203,
+&ch204,
+&ch205,
+&ch206,
+&ch207,
+&ch208,
+&ch209,
+&ch210,
+&ch211,
+&ch212,
+&ch213,
+&ch214,
+&ch215,
+&ch216,
+&ch217,
+&ch218,
+&ch219,
+&ch220,
+&ch221,
+&ch222,
+&ch223,
+&ch224,
+&ch225,
+&ch226,
+&ch227,
+&ch228,
+&ch229,
+&ch230,
+&ch231,
+&ch232,
+&ch233,
+&ch234,
+&ch235,
+&ch236,
+&ch237,
+&ch238,
+&ch239,
+&ch240,
+&ch241,
+&ch242,
+&ch243,
+&ch244,
+&ch245,
+&ch246,
+&ch247,
+&ch248,
+&ch249,
+&ch250,
+&ch251,
+&ch252,
+&ch253,
+&ch254,
+&ch255,
+};
+
+#if !defined(__IBMCPP__)
+const 
+#endif
+BitmapFontRec glutBitmapTimesRoman24 = {
+"-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1",
+224,
+32,
+chars
+};
+
index 76f25020affb3df8cebf0d65c6838db14a12199a..2a50a7400e4fce99b929b10af39445d46c42d68b 100644 (file)
@@ -1,90 +1,90 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1994. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-#include <stdarg.h>\r
-#include <string.h>\r
-#include <stdio.h>\r
-\r
-#include "glutint.h"\r
-\r
-#if !defined(__OS2__)\r
-\r
-/* strdup is actually not a standard ANSI C or POSIX routine\r
-   so implement a private one for GLUT.  OpenVMS does not have a\r
-   strdup; Linux's standard libc doesn't declare strdup by default\r
-   (unless BSD or SVID interfaces are requested). */\r
-char *\r
-__glutStrdup(const char *string)\r
-{\r
-  char *copy;\r
-\r
-  copy = (char*) malloc(strlen(string) + 1);\r
-  if (copy == NULL)\r
-    return NULL;\r
-  strcpy(copy, string);\r
-  return copy;\r
-}\r
-#endif\r
-\r
-void\r
-__glutWarning(char *format,...)\r
-{\r
-  va_list args;\r
-\r
-  va_start(args, format);\r
-  fprintf(stderr, "GLUT: Warning in %s: ",\r
-    __glutProgramName ? __glutProgramName : "(unamed)");\r
-  vfprintf(stderr, format, args);\r
-  va_end(args);\r
-  putc('\n', stderr);\r
-}\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutReportErrors(void)\r
-{\r
-  GLenum error;\r
-\r
-  while ((error = glGetError()) != GL_NO_ERROR)\r
-    __glutWarning("GL error: %s", gluErrorString(error));\r
-}\r
-/* ENDCENTRY */\r
-\r
-void\r
-__glutFatalError(char *format,...)\r
-{\r
-  va_list args;\r
-\r
-  va_start(args, format);\r
-  fprintf(stderr, "GLUT: Fatal Error in %s: ",\r
-    __glutProgramName ? __glutProgramName : "(unamed)");\r
-  vfprintf(stderr, format, args);\r
-  va_end(args);\r
-  putc('\n', stderr);\r
-/*                   || defined(__OS2__) */\r
-#if defined(_WIN32)\r
-  if (__glutExitFunc) {\r
-    __glutExitFunc(1);\r
-  }\r
-#endif\r
-  exit(1);\r
-}\r
-\r
-void\r
-__glutFatalUsage(char *format,...)\r
-{\r
-  va_list args;\r
-\r
-  va_start(args, format);\r
-  fprintf(stderr, "GLUT: Fatal API Usage in %s: ",\r
-    __glutProgramName ? __glutProgramName : "(unamed)");\r
-  vfprintf(stderr, format, args);\r
-  va_end(args);\r
-  putc('\n', stderr);\r
-  abort();\r
-}\r
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* 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. */
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "glutint.h"
+
+#if !defined(__OS2__)
+
+/* strdup is actually not a standard ANSI C or POSIX routine
+   so implement a private one for GLUT.  OpenVMS does not have a
+   strdup; Linux's standard libc doesn't declare strdup by default
+   (unless BSD or SVID interfaces are requested). */
+char *
+__glutStrdup(const char *string)
+{
+  char *copy;
+
+  copy = (char*) malloc(strlen(string) + 1);
+  if (copy == NULL)
+    return NULL;
+  strcpy(copy, string);
+  return copy;
+}
+#endif
+
+void
+__glutWarning(char *format,...)
+{
+  va_list args;
+
+  va_start(args, format);
+  fprintf(stderr, "GLUT: Warning in %s: ",
+    __glutProgramName ? __glutProgramName : "(unamed)");
+  vfprintf(stderr, format, args);
+  va_end(args);
+  putc('\n', stderr);
+}
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutReportErrors(void)
+{
+  GLenum error;
+
+  while ((error = glGetError()) != GL_NO_ERROR)
+    __glutWarning("GL error: %s", gluErrorString(error));
+}
+/* ENDCENTRY */
+
+void
+__glutFatalError(char *format,...)
+{
+  va_list args;
+
+  va_start(args, format);
+  fprintf(stderr, "GLUT: Fatal Error in %s: ",
+    __glutProgramName ? __glutProgramName : "(unamed)");
+  vfprintf(stderr, format, args);
+  va_end(args);
+  putc('\n', stderr);
+/*                   || defined(__OS2__) */
+#if defined(_WIN32)
+  if (__glutExitFunc) {
+    __glutExitFunc(1);
+  }
+#endif
+  exit(1);
+}
+
+void
+__glutFatalUsage(char *format,...)
+{
+  va_list args;
+
+  va_start(args, format);
+  fprintf(stderr, "GLUT: Fatal API Usage in %s: ",
+    __glutProgramName ? __glutProgramName : "(unamed)");
+  vfprintf(stderr, format, args);
+  va_end(args);
+  putc('\n', stderr);
+  abort();
+}
index f9d345dcf52a49e5192d35002fd07d4b0c1dc715..9f9b6eef5804e7bad5737eb9366be4028e901987 100644 (file)
-\r
-/* Copyright (c) Mark J. Kilgard, 1996. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-\r
-#ifdef __sgi\r
-#include <dlfcn.h>\r
-#endif\r
-\r
-#include "glutint.h"\r
-\r
-/* Grumble.  The IRIX 6.3 and early IRIX 6.4 OpenGL headers\r
-   support the video resize extension, but failed to define\r
-   GLX_SGIX_video_resize. */\r
-#if 0\r
-#ifdef GLX_SYNC_FRAME_SGIX\r
-#define GLX_SGIX_video_resize 1\r
-#endif\r
-#endif\r
-\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-static int canVideoResize = -1;\r
-static int videoResizeChannel;\r
-#else\r
-static int canVideoResize = 0;\r
-#endif\r
-static int videoResizeInUse = 0;\r
-static int dx = -1, dy = -1, dw = -1, dh = -1;\r
-\r
-/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a\r
-   bug where programs seg-fault when they attempt video\r
-   resizing from an indirect OpenGL context (either local or\r
-   over a network). */\r
-\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-\r
-static volatile int errorCaught;\r
-\r
-/* ARGSUSED */\r
-static int\r
-catchXSGIvcErrors(Display * dpy, XErrorEvent * event)\r
-{\r
-  errorCaught = 1;\r
-  return 0;\r
-}\r
-#endif\r
-\r
-/* CENTRY */\r
-\r
-int GLUTAPIENTRY\r
-glutVideoResizeGet(GLenum param)\r
-{\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-  if (canVideoResize < 0) {\r
-    canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize");\r
-    if (canVideoResize) {\r
-#if defined(__sgi) && __sgi\r
-      /* This is a hack because IRIX 6.2, 6.3, and some 6.4\r
-         versions were released with GLX_SGIX_video_resize\r
-         being advertised by the X server though the video\r
-         resize extension is not actually supported.  We try to\r
-         determine if the libGL.so we are using actually has a\r
-         video resize entrypoint before we try to use the\r
-         feature. */\r
-      void (*func) (void);\r
-      void *glxDso = dlopen("libGL.so", RTLD_LAZY);\r
-\r
-      func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX");\r
-      if (!func) {\r
-        canVideoResize = 0;\r
-      } else\r
-#endif\r
-      {\r
-        char *channelString;\r
-        int (*handler) (Display *, XErrorEvent *);\r
-\r
-        channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL");\r
-        videoResizeChannel = channelString ? atoi(channelString) : 0;\r
-\r
-        /* Work around another annoying problem with SGI's\r
-           GLX_SGIX_video_resize implementation.  Early IRIX\r
-           6.4 OpenGL's advertise the extension and have the\r
-           video resize API, but an XSGIvc X protocol errors\r
-           result trying to use the API.  Set up an error\r
-           handler to intercept what would otherwise be a fatal\r
-           error.  If an error was recieved, do not report that\r
-           video resize is possible. */\r
-        handler = XSetErrorHandler(catchXSGIvcErrors);\r
-\r
-        errorCaught = 0;\r
-\r
-#if defined(GLX_GLXEXT_PROTOTYPES)\r
-#endif\r
-\r
-        __glut_glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen,\r
-          videoResizeChannel, &dx, &dy, &dw, &dh);\r
-\r
-        /* glXQueryChannelDeltasSGIX is an inherent X server\r
-           round-trip so we know we will have gotten either the\r
-           correct reply or and error by this time. */\r
-        XSetErrorHandler(handler);\r
-\r
-        /* Still yet another work around.  In IRIX 6.4 betas,\r
-           glXQueryChannelDeltasSGIX will return as if it\r
-           succeeded, but the values are filled with junk.\r
-           Watch to make sure the delta variables really make\r
-           sense. */\r
-        if (errorCaught ||\r
-          dx < 0 || dy < 0 || dw < 0 || dh < 0 ||\r
-          dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) {\r
-          canVideoResize = 0;\r
-        }\r
-      }\r
-    }\r
-  }\r
-#endif /* GLX_SGIX_video_resize */\r
-\r
-  switch (param) {\r
-  case GLUT_VIDEO_RESIZE_POSSIBLE:\r
-    return canVideoResize;\r
-  case GLUT_VIDEO_RESIZE_IN_USE:\r
-    return videoResizeInUse;\r
-  case GLUT_VIDEO_RESIZE_X_DELTA:\r
-    return dx;\r
-  case GLUT_VIDEO_RESIZE_Y_DELTA:\r
-    return dy;\r
-  case GLUT_VIDEO_RESIZE_WIDTH_DELTA:\r
-    return dw;\r
-  case GLUT_VIDEO_RESIZE_HEIGHT_DELTA:\r
-    return dh;\r
-  case GLUT_VIDEO_RESIZE_X:\r
-  case GLUT_VIDEO_RESIZE_Y:\r
-  case GLUT_VIDEO_RESIZE_WIDTH:\r
-  case GLUT_VIDEO_RESIZE_HEIGHT:\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-    if (videoResizeInUse) {\r
-      int x, y, width, height;\r
-\r
-      __glut_glXQueryChannelRectSGIX(__glutDisplay, __glutScreen,\r
-        videoResizeChannel, &x, &y, &width, &height);\r
-      switch (param) {\r
-      case GLUT_VIDEO_RESIZE_X:\r
-        return x;\r
-      case GLUT_VIDEO_RESIZE_Y:\r
-        return y;\r
-      case GLUT_VIDEO_RESIZE_WIDTH:\r
-        return width;\r
-      case GLUT_VIDEO_RESIZE_HEIGHT:\r
-        return height;\r
-      }\r
-    }\r
-#endif\r
-    return -1;\r
-  default:\r
-    __glutWarning("invalid glutVideoResizeGet parameter: %d", param);\r
-    return -1;\r
-  }\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutSetupVideoResizing(void)\r
-{\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-  if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {\r
-    __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,\r
-      videoResizeChannel, __glutCurrentWindow->win);\r
-    videoResizeInUse = 1;\r
-  } else\r
-#endif\r
-    __glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n");\r
-}\r
-\r
-void GLUTAPIENTRY\r
-glutStopVideoResizing(void)\r
-{\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-  if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {\r
-    if (videoResizeInUse) {\r
-      __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,\r
-        videoResizeChannel, None);\r
-      videoResizeInUse = 0;\r
-    }\r
-  }\r
-#endif\r
-}\r
-\r
-/* ARGSUSED */\r
-void GLUTAPIENTRY\r
-glutVideoResize(int x, int y, int width, int height)\r
-{\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-  if (videoResizeInUse) {\r
-#ifdef GLX_SYNC_SWAP_SGIX\r
-    /* glXChannelRectSyncSGIX introduced in a patch to IRIX\r
-       6.2; the original unpatched IRIX 6.2 behavior is always\r
-       GLX_SYNC_SWAP_SGIX. */\r
-    __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,\r
-      videoResizeChannel, GLX_SYNC_SWAP_SGIX);\r
-#endif\r
-    __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,\r
-      videoResizeChannel, x, y, width, height);\r
-  }\r
-#endif\r
-}\r
-\r
-/* ARGSUSED */\r
-void GLUTAPIENTRY\r
-glutVideoPan(int x, int y, int width, int height)\r
-{\r
-#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)\r
-  if (videoResizeInUse) {\r
-#ifdef GLX_SYNC_FRAME_SGIX\r
-    /* glXChannelRectSyncSGIX introduced in a patch to IRIX\r
-       6.2; the original unpatched IRIX 6.2 behavior is always\r
-       GLX_SYNC_SWAP_SGIX.  We just ignore that we cannot\r
-       accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2;\r
-       this means you'd need a glutSwapBuffers to actually\r
-       realize the video resize. */\r
-    __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,\r
-      videoResizeChannel, GLX_SYNC_FRAME_SGIX);\r
-#endif\r
-    __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,\r
-      videoResizeChannel, x, y, width, height);\r
-  }\r
-#endif\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1996. */
+
+/* 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. */
+
+#include <stdlib.h>
+
+#ifdef __sgi
+#include <dlfcn.h>
+#endif
+
+#include "glutint.h"
+
+/* Grumble.  The IRIX 6.3 and early IRIX 6.4 OpenGL headers
+   support the video resize extension, but failed to define
+   GLX_SGIX_video_resize. */
+#if 0
+#ifdef GLX_SYNC_FRAME_SGIX
+#define GLX_SGIX_video_resize 1
+#endif
+#endif
+
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+static int canVideoResize = -1;
+static int videoResizeChannel;
+#else
+static int canVideoResize = 0;
+#endif
+static int videoResizeInUse = 0;
+static int dx = -1, dy = -1, dw = -1, dh = -1;
+
+/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a
+   bug where programs seg-fault when they attempt video
+   resizing from an indirect OpenGL context (either local or
+   over a network). */
+
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+
+static volatile int errorCaught;
+
+/* ARGSUSED */
+static int
+catchXSGIvcErrors(Display * dpy, XErrorEvent * event)
+{
+  errorCaught = 1;
+  return 0;
+}
+#endif
+
+/* CENTRY */
+
+int GLUTAPIENTRY
+glutVideoResizeGet(GLenum param)
+{
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+  if (canVideoResize < 0) {
+    canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize");
+    if (canVideoResize) {
+#if defined(__sgi) && __sgi
+      /* This is a hack because IRIX 6.2, 6.3, and some 6.4
+         versions were released with GLX_SGIX_video_resize
+         being advertised by the X server though the video
+         resize extension is not actually supported.  We try to
+         determine if the libGL.so we are using actually has a
+         video resize entrypoint before we try to use the
+         feature. */
+      void (*func) (void);
+      void *glxDso = dlopen("libGL.so", RTLD_LAZY);
+
+      func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX");
+      if (!func) {
+        canVideoResize = 0;
+      } else
+#endif
+      {
+        char *channelString;
+        int (*handler) (Display *, XErrorEvent *);
+
+        channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL");
+        videoResizeChannel = channelString ? atoi(channelString) : 0;
+
+        /* Work around another annoying problem with SGI's
+           GLX_SGIX_video_resize implementation.  Early IRIX
+           6.4 OpenGL's advertise the extension and have the
+           video resize API, but an XSGIvc X protocol errors
+           result trying to use the API.  Set up an error
+           handler to intercept what would otherwise be a fatal
+           error.  If an error was recieved, do not report that
+           video resize is possible. */
+        handler = XSetErrorHandler(catchXSGIvcErrors);
+
+        errorCaught = 0;
+
+#if defined(GLX_GLXEXT_PROTOTYPES)
+#endif
+
+        __glut_glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen,
+          videoResizeChannel, &dx, &dy, &dw, &dh);
+
+        /* glXQueryChannelDeltasSGIX is an inherent X server
+           round-trip so we know we will have gotten either the
+           correct reply or and error by this time. */
+        XSetErrorHandler(handler);
+
+        /* Still yet another work around.  In IRIX 6.4 betas,
+           glXQueryChannelDeltasSGIX will return as if it
+           succeeded, but the values are filled with junk.
+           Watch to make sure the delta variables really make
+           sense. */
+        if (errorCaught ||
+          dx < 0 || dy < 0 || dw < 0 || dh < 0 ||
+          dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) {
+          canVideoResize = 0;
+        }
+      }
+    }
+  }
+#endif /* GLX_SGIX_video_resize */
+
+  switch (param) {
+  case GLUT_VIDEO_RESIZE_POSSIBLE:
+    return canVideoResize;
+  case GLUT_VIDEO_RESIZE_IN_USE:
+    return videoResizeInUse;
+  case GLUT_VIDEO_RESIZE_X_DELTA:
+    return dx;
+  case GLUT_VIDEO_RESIZE_Y_DELTA:
+    return dy;
+  case GLUT_VIDEO_RESIZE_WIDTH_DELTA:
+    return dw;
+  case GLUT_VIDEO_RESIZE_HEIGHT_DELTA:
+    return dh;
+  case GLUT_VIDEO_RESIZE_X:
+  case GLUT_VIDEO_RESIZE_Y:
+  case GLUT_VIDEO_RESIZE_WIDTH:
+  case GLUT_VIDEO_RESIZE_HEIGHT:
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+    if (videoResizeInUse) {
+      int x, y, width, height;
+
+      __glut_glXQueryChannelRectSGIX(__glutDisplay, __glutScreen,
+        videoResizeChannel, &x, &y, &width, &height);
+      switch (param) {
+      case GLUT_VIDEO_RESIZE_X:
+        return x;
+      case GLUT_VIDEO_RESIZE_Y:
+        return y;
+      case GLUT_VIDEO_RESIZE_WIDTH:
+        return width;
+      case GLUT_VIDEO_RESIZE_HEIGHT:
+        return height;
+      }
+    }
+#endif
+    return -1;
+  default:
+    __glutWarning("invalid glutVideoResizeGet parameter: %d", param);
+    return -1;
+  }
+}
+
+void GLUTAPIENTRY
+glutSetupVideoResizing(void)
+{
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+  if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {
+    __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,
+      videoResizeChannel, __glutCurrentWindow->win);
+    videoResizeInUse = 1;
+  } else
+#endif
+    __glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n");
+}
+
+void GLUTAPIENTRY
+glutStopVideoResizing(void)
+{
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+  if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {
+    if (videoResizeInUse) {
+      __glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,
+        videoResizeChannel, None);
+      videoResizeInUse = 0;
+    }
+  }
+#endif
+}
+
+/* ARGSUSED */
+void GLUTAPIENTRY
+glutVideoResize(int x, int y, int width, int height)
+{
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+  if (videoResizeInUse) {
+#ifdef GLX_SYNC_SWAP_SGIX
+    /* glXChannelRectSyncSGIX introduced in a patch to IRIX
+       6.2; the original unpatched IRIX 6.2 behavior is always
+       GLX_SYNC_SWAP_SGIX. */
+    __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,
+      videoResizeChannel, GLX_SYNC_SWAP_SGIX);
+#endif
+    __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,
+      videoResizeChannel, x, y, width, height);
+  }
+#endif
+}
+
+/* ARGSUSED */
+void GLUTAPIENTRY
+glutVideoPan(int x, int y, int width, int height)
+{
+#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
+  if (videoResizeInUse) {
+#ifdef GLX_SYNC_FRAME_SGIX
+    /* glXChannelRectSyncSGIX introduced in a patch to IRIX
+       6.2; the original unpatched IRIX 6.2 behavior is always
+       GLX_SYNC_SWAP_SGIX.  We just ignore that we cannot
+       accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2;
+       this means you'd need a glutSwapBuffers to actually
+       realize the video resize. */
+    __glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,
+      videoResizeChannel, GLX_SYNC_FRAME_SGIX);
+#endif
+    __glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,
+      videoResizeChannel, x, y, width, height);
+  }
+#endif
+}
+
+/* ENDCENTRY */
index 885e169d3f174a1bc0b97f613fdd88b0153e2217..4ef6f7bf392f08bfdd9d85c0fa23541ed0f3fa5b 100644 (file)
@@ -1,29 +1,29 @@
-\r
-/* Copyright (c) Mark J. Kilgard, 1996, 1997. */\r
-\r
-/* This program is freely distributable without licensing fees\r
-   and is provided without guarantee or warrantee expressed or\r
-   implied. This program is -not- in the public domain. */\r
-\r
-#include <stdlib.h>\r
-#include <stdarg.h>\r
-#include <stdio.h>\r
-\r
-#include "glutint.h"\r
-\r
-/* CENTRY */\r
-void GLUTAPIENTRY\r
-glutWarpPointer(int x, int y)\r
-{\r
-//  XWarpPointer(__glutDisplay, None, __glutCurrentWindow->win,\r
-//    0, 0, 0, 0, x, y);\r
-  POINTL point;\r
-  point.x = x;\r
-  point.y = y;\r
-  WinMapWindowPoints(__glutCurrentWindow->win,HWND_DESKTOP,&point,1);\r
-  WinSetPointerPos(HWND_DESKTOP, point.x, point.y);\r
-\r
-  XFlush(__glutDisplay);\r
-}\r
-\r
-/* ENDCENTRY */\r
+
+/* Copyright (c) Mark J. Kilgard, 1996, 1997. */
+
+/* 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. */
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "glutint.h"
+
+/* CENTRY */
+void GLUTAPIENTRY
+glutWarpPointer(int x, int y)
+{
+//  XWarpPointer(__glutDisplay, None, __glutCurrentWindow->win,
+//    0, 0, 0, 0, x, y);
+  POINTL point;
+  point.x = x;
+  point.y = y;
+  WinMapWindowPoints(__glutCurrentWindow->win,HWND_DESKTOP,&point,1);
+  WinSetPointerPos(HWND_DESKTOP, point.x, point.y);
+
+  XFlush(__glutDisplay);
+}
+
+/* ENDCENTRY */
index dc1b61af195581d6833856243ab8aaa1c5110e95..9584bb129daafd7e0a078abc8bc163ca090f63e7 100644 (file)
@@ -1,32 +1,32 @@
-#ifndef __glutbitmap_h__\r
-#define __glutbitmap_h__\r
-\r
-/* Copyright (c) Mark J. Kilgard, 1994, 1998. */\r
-\r
-/* This program is freely distributable without licensing fees \r
-   and is provided without guarantee or warrantee expressed or \r
-   implied. This program is -not- in the public domain. */\r
-\r
-#define GLUT_NO_LIB_PRAGMA  /* Avoid auto library linking when building\r
-                               the GLUT library itself. */\r
-#include <GL/glut.h>\r
-\r
-typedef struct {\r
-  const GLsizei width;\r
-  const GLsizei height;\r
-  const GLfloat xorig;\r
-  const GLfloat yorig;\r
-  const GLfloat advance;\r
-  const GLubyte *bitmap;\r
-} BitmapCharRec, *BitmapCharPtr;\r
-\r
-typedef struct {\r
-  const char *name;\r
-  const int num_chars;\r
-  const int first;\r
-  const BitmapCharRec * const *ch;\r
-} BitmapFontRec, *BitmapFontPtr;\r
-\r
-typedef void *GLUTbitmapFont;\r
-\r
-#endif /* __glutbitmap_h__ */\r
+#ifndef __glutbitmap_h__
+#define __glutbitmap_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994, 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. */
+
+#define GLUT_NO_LIB_PRAGMA  /* Avoid auto library linking when building
+                               the GLUT library itself. */
+#include <GL/glut.h>
+
+typedef struct {
+  const GLsizei width;
+  const GLsizei height;
+  const GLfloat xorig;
+  const GLfloat yorig;
+  const GLfloat advance;
+  const GLubyte *bitmap;
+} BitmapCharRec, *BitmapCharPtr;
+
+typedef struct {
+  const char *name;
+  const int num_chars;
+  const int first;
+  const BitmapCharRec * const *ch;
+} BitmapFontRec, *BitmapFontPtr;
+
+typedef void *GLUTbitmapFont;
+
+#endif /* __glutbitmap_h__ */
index fbbc70d6cc09a812633b447268694beec02ef8ad..cbc9e156fea5693b8d581ff024a5ebf383bbde16 100644 (file)
@@ -1,42 +1,42 @@
-#ifndef __glutstroke_h__\r
-#define __glutstroke_h__\r
-\r
-/* Copyright (c) Mark J. Kilgard, 1994. */\r
-\r
-/* This program is freely distributable without licensing fees \r
-   and is provided without guarantee or warrantee expressed or \r
-   implied. This program is -not- in the public domain. */\r
-\r
-#if defined(_WIN32)\r
-#pragma warning (disable:4244)  /* disable bogus conversion warnings */\r
-#pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */\r
-#endif\r
-\r
-typedef struct {\r
-  float x;\r
-  float y;\r
-} CoordRec, *CoordPtr;\r
-\r
-typedef struct {\r
-  int num_coords;\r
-  const CoordRec *coord;\r
-} StrokeRec, *StrokePtr;\r
-\r
-typedef struct {\r
-  int num_strokes;\r
-  const StrokeRec *stroke;\r
-  float center;\r
-  float right;\r
-} StrokeCharRec, *StrokeCharPtr;\r
-\r
-typedef struct {\r
-  const char *name;\r
-  int num_chars;\r
-  const StrokeCharRec *ch;\r
-  float top;\r
-  float bottom;\r
-} StrokeFontRec, *StrokeFontPtr;\r
-\r
-typedef void *GLUTstrokeFont;\r
-\r
-#endif /* __glutstroke_h__ */\r
+#ifndef __glutstroke_h__
+#define __glutstroke_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994. */
+
+/* This program is freely distributable without licensing fees 
+   and is provided without guarantee or warrantee expressed or 
+   implied. This program is -not- in the public domain. */
+
+#if defined(_WIN32)
+#pragma warning (disable:4244)  /* disable bogus conversion warnings */
+#pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */
+#endif
+
+typedef struct {
+  float x;
+  float y;
+} CoordRec, *CoordPtr;
+
+typedef struct {
+  int num_coords;
+  const CoordRec *coord;
+} StrokeRec, *StrokePtr;
+
+typedef struct {
+  int num_strokes;
+  const StrokeRec *stroke;
+  float center;
+  float right;
+} StrokeCharRec, *StrokeCharPtr;
+
+typedef struct {
+  const char *name;
+  int num_chars;
+  const StrokeCharRec *ch;
+  float top;
+  float bottom;
+} StrokeFontRec, *StrokeFontPtr;
+
+typedef void *GLUTstrokeFont;
+
+#endif /* __glutstroke_h__ */
index 3786c4d871c64840ea8f6be9227c463c5820f246..3f62031939c8d1d77e0bc2d53dc700b23d5279be 100644 (file)
@@ -1,59 +1,59 @@
-#ifndef __layerutil_h__\r
-#define __layerutil_h__\r
-\r
-/* Copyright (c) Mark J. Kilgard, 1993, 1994. */\r
-\r
-/* This program is freely distributable without licensing fees \r
-   and is provided without guarantee or warrantee expressed or \r
-   implied. This program is -not- in the public domain. */\r
-\r
-/* Based on XLayerUtil.h: Revision: 1.3 */\r
-\r
-#ifdef __VMS\r
-#include <GL/vms_x_fix.h>\r
-#endif\r
-\r
-#if !defined(_WIN32) && !defined(__OS2__)\r
-#include <X11/Xlib.h>\r
-#include <X11/Xutil.h>\r
-#include <X11/Xmd.h>\r
-#endif /* !_WIN32 */\r
-\r
-/* Transparent type values */\r
-/* None                       0 */\r
-#define TransparentPixel      1\r
-#define TransparentMask       2\r
-\r
-/* layered visual info template flags */\r
-#define VisualLayerMask                0x200\r
-#define VisualTransparentType  0x400\r
-#define VisualTransparentValue 0x800\r
-#define VisualAllLayerMask     0xFFF\r
-\r
-/* layered visual info structure */\r
-typedef struct _XLayerVisualInfo {\r
-  XVisualInfo vinfo;\r
-  long layer;\r
-  long type;\r
-  unsigned long value;\r
-} XLayerVisualInfo;\r
-\r
-/* SERVER_OVERLAY_VISUALS property element */\r
-typedef struct _OverlayInfo {\r
-  /* Avoid 64-bit portability problems by being careful to use\r
-     longs due to the way XGetWindowProperty is specified. Note\r
-     that these parameters are passed as CARD32s over X\r
-     protocol. */\r
-  long overlay_visual;\r
-  long transparent_type;\r
-  long value;\r
-  long layer;\r
-} OverlayInfo;\r
-\r
-extern int __glutGetTransparentPixel(Display *, XVisualInfo *);\r
-extern XLayerVisualInfo *__glutXGetLayerVisualInfo(Display *,\r
-  long, XLayerVisualInfo *, int *);\r
-extern Status __glutXMatchLayerVisualInfo(Display *,\r
-  int, int, int, int, XLayerVisualInfo *);\r
-\r
-#endif /* __layerutil_h__ */\r
+#ifndef __layerutil_h__
+#define __layerutil_h__
+
+/* Copyright (c) Mark J. Kilgard, 1993, 1994. */
+
+/* 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. */
+
+/* Based on XLayerUtil.h: Revision: 1.3 */
+
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+#endif
+
+#if !defined(_WIN32) && !defined(__OS2__)
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xmd.h>
+#endif /* !_WIN32 */
+
+/* Transparent type values */
+/* None                       0 */
+#define TransparentPixel      1
+#define TransparentMask       2
+
+/* layered visual info template flags */
+#define VisualLayerMask                0x200
+#define VisualTransparentType  0x400
+#define VisualTransparentValue 0x800
+#define VisualAllLayerMask     0xFFF
+
+/* layered visual info structure */
+typedef struct _XLayerVisualInfo {
+  XVisualInfo vinfo;
+  long layer;
+  long type;
+  unsigned long value;
+} XLayerVisualInfo;
+
+/* SERVER_OVERLAY_VISUALS property element */
+typedef struct _OverlayInfo {
+  /* Avoid 64-bit portability problems by being careful to use
+     longs due to the way XGetWindowProperty is specified. Note
+     that these parameters are passed as CARD32s over X
+     protocol. */
+  long overlay_visual;
+  long transparent_type;
+  long value;
+  long layer;
+} OverlayInfo;
+
+extern int __glutGetTransparentPixel(Display *, XVisualInfo *);
+extern XLayerVisualInfo *__glutXGetLayerVisualInfo(Display *,
+  long, XLayerVisualInfo *, int *);
+extern Status __glutXMatchLayerVisualInfo(Display *,
+  int, int, int, int, XLayerVisualInfo *);
+
+#endif /* __layerutil_h__ */
index fb92544ab800cc527d5934c5848994daaa56de88..a0e184eef0ea46a3a89b031a6f9f1d32f2573c4d 100644 (file)
@@ -1,94 +1,94 @@
-\r
-;-----------------------------------------------------\r
-; def Module definition file for the DLL\r
-;-----------------------------------------------------\r
-\r
-LIBRARY libGlut INITINSTANCE TERMINSTANCE\r
-PROTMODE\r
-DATA MULTIPLE NONSHARED READWRITE LOADONCALL\r
-CODE LOADONCALL\r
-EXPORTS          ; Names of exported functions and data\r
-\r
-;*********************************\r
-;MesaGLUT\r
-        glutCommandFunc                @3001\r
-       glutCreateWindow        @3002\r
-       glutCreateSubWindow     @3003\r
-       glutDestroyWindow       @3004\r
-       glutDisplayFunc         @3005\r
-       glutEntryFunc           @3006\r
-       glutExtensionSupported  @3007\r
-       glutIdleFunc            @3008\r
-        glutInit               @3009\r
-       glutInitDisplayMode     @3010\r
-       glutInitWindowPosition  @3011\r
-       glutInitWindowSize      @3012\r
-       glutMainLoop            @3013\r
-       glutGet                 @3014\r
-       glutGetColor            @3015\r
-       glutGetWindow           @3016\r
-       glutKeyboardFunc        @3017\r
-       glutMouseFunc           @3018\r
-       glutSpecialFunc         @3019\r
-       glutStrokeCharacter     @3020\r
-       glutSetColor            @3021\r
-       glutSetIconTitle        @3022\r
-       glutSetWindow           @3023\r
-       glutSetWindowTitle      @3024\r
-\r
-       glutReshapeFunc         @3025\r
-       glutReshapeWindow       @3026\r
-\r
-\r
-       glutSwapBuffers         @3027\r
-       glutPostRedisplay       @3028\r
-       glutPositionWindow      @3029\r
-       glutVisibilityFunc      @3030\r
-       glutTimerFunc           @3031\r
-       glutMotionFunc          @3032\r
-\r
-       glutCreateMenu          @3033\r
-       glutAttachMenu          @3034\r
-       glutDestroyMenu         @3035\r
-       glutAddMenuEntry        @3036\r
-       glutPassiveMotionFunc   @3037\r
-\r
-        glutSolidCone          @3038\r
-       glutSolidCube           @3039\r
-       glutSolidDodecahedron   @3040\r
-       glutSolidOctahedron     @3041\r
-       glutSolidIcosahedron    @3042\r
-       glutSolidSphere         @3043\r
-       glutSolidTeapot         @3044\r
-       glutSolidTetrahedron    @3045\r
-       glutSolidTorus          @3046\r
-\r
-       glutWireCone            @3047\r
-        glutWireCube           @3048\r
-        glutWireDodecahedron   @3049\r
-       glutWireIcosahedron     @3050\r
-       glutWireOctahedron      @3051\r
-       glutWireSphere          @3052\r
-        glutWireTetrahedron    @3053\r
-        glutWireTorus          @3054\r
-       glutWireTeapot          @3055\r
-\r
-;GL_GLEXT_PROTOTYPES   \r
-       glutBitmapCharacter     @3101\r
-        glutBitmap9By15                @3102\r
-        glutBitmapHelvetica10  @3103\r
-        glutBitmapHelvetica12  @3104\r
-        glutBitmapHelvetica18  @3105\r
-        glutBitmapTimesRoman24 @3106\r
-       glutStrokeRoman         @3107\r
-       glutBitmap8By13         @3108\r
-       \r
-;Global constants\r
-;         hab                  @12001\r
-;      /* PM anchor block handle         */\r
-;         hpsCurrent           @12002\r
-         XHDC                  @12004\r
-         XHWND                 @12005\r
-\r
-\r
-\r
+
+;-----------------------------------------------------
+; def Module definition file for the DLL
+;-----------------------------------------------------
+
+LIBRARY libGlut INITINSTANCE TERMINSTANCE
+PROTMODE
+DATA MULTIPLE NONSHARED READWRITE LOADONCALL
+CODE LOADONCALL
+EXPORTS          ; Names of exported functions and data
+
+;*********************************
+;MesaGLUT
+        glutCommandFunc                @3001
+       glutCreateWindow        @3002
+       glutCreateSubWindow     @3003
+       glutDestroyWindow       @3004
+       glutDisplayFunc         @3005
+       glutEntryFunc           @3006
+       glutExtensionSupported  @3007
+       glutIdleFunc            @3008
+        glutInit               @3009
+       glutInitDisplayMode     @3010
+       glutInitWindowPosition  @3011
+       glutInitWindowSize      @3012
+       glutMainLoop            @3013
+       glutGet                 @3014
+       glutGetColor            @3015
+       glutGetWindow           @3016
+       glutKeyboardFunc        @3017
+       glutMouseFunc           @3018
+       glutSpecialFunc         @3019
+       glutStrokeCharacter     @3020
+       glutSetColor            @3021
+       glutSetIconTitle        @3022
+       glutSetWindow           @3023
+       glutSetWindowTitle      @3024
+
+       glutReshapeFunc         @3025
+       glutReshapeWindow       @3026
+
+
+       glutSwapBuffers         @3027
+       glutPostRedisplay       @3028
+       glutPositionWindow      @3029
+       glutVisibilityFunc      @3030
+       glutTimerFunc           @3031
+       glutMotionFunc          @3032
+
+       glutCreateMenu          @3033
+       glutAttachMenu          @3034
+       glutDestroyMenu         @3035
+       glutAddMenuEntry        @3036
+       glutPassiveMotionFunc   @3037
+
+        glutSolidCone          @3038
+       glutSolidCube           @3039
+       glutSolidDodecahedron   @3040
+       glutSolidOctahedron     @3041
+       glutSolidIcosahedron    @3042
+       glutSolidSphere         @3043
+       glutSolidTeapot         @3044
+       glutSolidTetrahedron    @3045
+       glutSolidTorus          @3046
+
+       glutWireCone            @3047
+        glutWireCube           @3048
+        glutWireDodecahedron   @3049
+       glutWireIcosahedron     @3050
+       glutWireOctahedron      @3051
+       glutWireSphere          @3052
+        glutWireTetrahedron    @3053
+        glutWireTorus          @3054
+       glutWireTeapot          @3055
+
+;GL_GLEXT_PROTOTYPES   
+       glutBitmapCharacter     @3101
+        glutBitmap9By15                @3102
+        glutBitmapHelvetica10  @3103
+        glutBitmapHelvetica12  @3104
+        glutBitmapHelvetica18  @3105
+        glutBitmapTimesRoman24 @3106
+       glutStrokeRoman         @3107
+       glutBitmap8By13         @3108
+       
+;Global constants
+;         hab                  @12001
+;      /* PM anchor block handle         */
+;         hpsCurrent           @12002
+         XHDC                  @12004
+         XHWND                 @12005
+
+
+
index db18c61fac38ece2d24cbd6e4903dee8d197a1b9..a77c3de6c79abfffe68dfd2ced25756d82b5c41b 100644 (file)
@@ -12,6 +12,11 @@ env.Append(CPPPATH = [
        '#/src/mesa/main',
 ])
 
+env.Append(CFLAGS = [
+       '-std=c99',
+])
+
+
 #######################################################################
 # Core sources
 
index 518211ccf467431bae4131ea82e39f926436b660..c12d42148b61da707b953894f02eafde7fc27fc9 100644 (file)
-/*\r
- * Mesa 3-D graphics library\r
- * Version:  3.0\r
- * Copyright (C) 1995-1998  Brian Paul\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Library General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Library General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Library General Public\r
- * License along with this library; if not, write to the Free\r
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <allegro.h>\r
-#include "buffers.h"\r
-#include "context.h"\r
-#include "imports.h"\r
-#include "matrix.h"\r
+/*
+ * 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <allegro.h>
+#include "buffers.h"
+#include "context.h"
+#include "imports.h"
+#include "matrix.h"
 #include "mtypes.h"
-#include "GL/amesa.h"\r
-\r
-\r
-struct amesa_visual\r
-    {\r
-    GLvisual   *GLVisual;       /* inherit from GLvisual      */\r
-    GLboolean   DBFlag;         /* double buffered?           */\r
-    GLuint      Depth;          /* bits per pixel ( >= 15 )   */\r
-    };\r
-\r
-\r
-struct amesa_buffer\r
-    {\r
-    GLframebuffer *GLBuffer;    /* inherit from GLframebuffer */\r
-    GLuint         Width, Height;\r
-    BITMAP        *Screen;\r
-       BITMAP        *Background;\r
-       BITMAP        *Active;\r
-    };\r
-\r
-\r
-struct amesa_context\r
-    {\r
-    GLcontext   *GLContext;     /* inherit from GLcontext     */\r
-    AMesaVisual  Visual;\r
-       AMesaBuffer  Buffer;\r
-    GLuint       ClearColor;\r
-    GLuint       CurrentColor;\r
-    };\r
-\r
-\r
-static void setup_dd_pointers(GLcontext *ctx);\r
-\r
-\r
-/**********************************************************************/\r
-/*****                   drawing functions                        *****/\r
-/**********************************************************************/\r
-\r
-#define FLIP(context, y)  (context->Buffer->Height - (y) - 1)\r
-\r
-#include "allegro/generic.h"\r
-#include "allegro/direct.h"\r
-\r
-\r
-/**********************************************************************/\r
-/*****            15-bit accelerated drawing funcs                *****/\r
-/**********************************************************************/\r
-\r
-IMPLEMENT_WRITE_RGBA_SPAN(15, unsigned short)\r
-IMPLEMENT_WRITE_RGB_SPAN(15, unsigned short)\r
-IMPLEMENT_WRITE_MONO_RGBA_SPAN(15, unsigned short)\r
-IMPLEMENT_READ_RGBA_SPAN(15, unsigned short)\r
-IMPLEMENT_WRITE_RGBA_PIXELS(15, unsigned short)\r
-IMPLEMENT_WRITE_MONO_RGBA_PIXELS(15, unsigned short)\r
-IMPLEMENT_READ_RGBA_PIXELS(15, unsigned short)\r
-\r
-\r
-/**********************************************************************/\r
-/*****            16-bit accelerated drawing funcs                *****/\r
-/**********************************************************************/\r
-\r
-IMPLEMENT_WRITE_RGBA_SPAN(16, unsigned short)\r
-IMPLEMENT_WRITE_RGB_SPAN(16, unsigned short)\r
-IMPLEMENT_WRITE_MONO_RGBA_SPAN(16, unsigned short)\r
-IMPLEMENT_READ_RGBA_SPAN(16, unsigned short)\r
-IMPLEMENT_WRITE_RGBA_PIXELS(16, unsigned short)\r
-IMPLEMENT_WRITE_MONO_RGBA_PIXELS(16, unsigned short)\r
-IMPLEMENT_READ_RGBA_PIXELS(16, unsigned short)\r
-\r
-\r
-/**********************************************************************/\r
-/*****            32-bit accelerated drawing funcs                *****/\r
-/**********************************************************************/\r
-\r
-IMPLEMENT_WRITE_RGBA_SPAN(32, unsigned long)\r
-IMPLEMENT_WRITE_RGB_SPAN(32, unsigned long)\r
-IMPLEMENT_WRITE_MONO_RGBA_SPAN(32, unsigned long)\r
-IMPLEMENT_READ_RGBA_SPAN(32, unsigned long)\r
-IMPLEMENT_WRITE_RGBA_PIXELS(32, unsigned long)\r
-IMPLEMENT_WRITE_MONO_RGBA_PIXELS(32, unsigned long)\r
-IMPLEMENT_READ_RGBA_PIXELS(32, unsigned long)\r
-\r
-\r
-/**********************************************************************/\r
-/*****              Miscellaneous device driver funcs             *****/\r
-/**********************************************************************/\r
-\r
-static GLboolean set_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bit)\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    GLboolean    ok      = GL_TRUE;\r
-\r
-    if (bit == DD_FRONT_LEFT_BIT)\r
-        context->Buffer->Active = context->Buffer->Screen;\r
-\r
-    else if (bit == DD_BACK_LEFT)\r
-        {\r
-        if (context->Buffer->Background)\r
-            context->Buffer->Active = context->Buffer->Background;\r
-        else\r
-            ok = GL_FALSE;\r
-        }\r
-\r
-    else\r
-        ok = GL_FALSE;\r
-\r
-    return ok;\r
-    }\r
-\r
-\r
-static void get_buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)\r
-    {\r
-       AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-\r
-    *width  = context->Buffer->Width;\r
-    *height = context->Buffer->Height;\r
-    }\r
-\r
-\r
-/**\r
- * We only implement this function as a mechanism to check if the\r
- * framebuffer size has changed (and update corresponding state).\r
- */\r
-static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)\r
-{\r
-   /* poll for window size change and realloc software Z/stencil/etc if needed */\r
-   GLuint newWidth, newHeight;\r
-   GLframebuffer *buffer = ctx->WinSysDrawBuffer;\r
-   get_buffer_size( &newWidth, &newHeight );\r
-   if (buffer->Width != newWidth || buffer->Height != newHeight) {\r
-      _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );\r
-   }\r
-\r
-}\r
-\r
-\r
-/**********************************************************************/\r
-/**********************************************************************/\r
-\r
-static void setup_dd_pointers(GLcontext *ctx)\r
-       {\r
-       AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-\r
-       /* Initialize all the pointers in the driver struct. Do this whenever */\r
-       /* a new context is made current or we change buffers via set_buffer! */\r
-\r
-    ctx->Driver.UpdateState   = setup_dd_pointers;\r
-    ctx->Driver.SetBuffer     = set_buffer;\r
-    ctx->Driver.GetBufferSize = get_buffer_size;\r
-    ctx->Driver.Viewport      = viewport;\r
-\r
-    ctx->Driver.Color               = set_color_generic;\r
-    ctx->Driver.ClearColor          = clear_color_generic;\r
-    ctx->Driver.Clear               = clear_generic;\r
-    ctx->Driver.WriteRGBASpan       = write_rgba_span_generic;\r
-    ctx->Driver.WriteRGBSpan        = write_rgb_span_generic;\r
-    ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_generic;\r
-    ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_generic;\r
-    ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_generic;\r
-    ctx->Driver.ReadRGBASpan        = read_rgba_span_generic;\r
-    ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_generic;\r
-\r
-    if (context->Buffer->Active != screen)\r
-        {\r
-        switch (context->Visual->Depth)\r
-            {\r
-            case 15:\r
-                ctx->Driver.WriteRGBASpan       = write_rgba_span_15;\r
-                ctx->Driver.WriteRGBSpan        = write_rgb_span_15;\r
-                ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_15;\r
-                ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_15;\r
-                ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_15;\r
-                ctx->Driver.ReadRGBASpan        = read_rgba_span_15;\r
-                ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_15;\r
-                break;\r
-\r
-            case 16:\r
-                ctx->Driver.WriteRGBASpan       = write_rgba_span_16;\r
-                ctx->Driver.WriteRGBSpan        = write_rgb_span_16;\r
-                ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_16;\r
-                ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_16;\r
-                ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_16;\r
-                ctx->Driver.ReadRGBASpan        = read_rgba_span_16;\r
-                ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_16;\r
-                break;\r
-\r
-            case 32:\r
-                ctx->Driver.WriteRGBASpan       = write_rgba_span_32;\r
-                ctx->Driver.WriteRGBSpan        = write_rgb_span_32;\r
-                ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_32;\r
-                ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_32;\r
-                ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_32;\r
-                ctx->Driver.ReadRGBASpan        = read_rgba_span_32;\r
-                ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_32;\r
-                break;\r
-            }\r
-        }\r
-       }\r
-\r
-\r
-/**********************************************************************/\r
-/*****                AMesa Public API Functions                  *****/\r
-/**********************************************************************/\r
-\r
-\r
-AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth,\r
-                              GLint depthSize, GLint stencilSize, GLint accumSize)\r
-       {\r
-       AMesaVisual visual;\r
-    GLbyte      redBits, greenBits, blueBits;\r
-\r
-    visual = (AMesaVisual)calloc(1, sizeof(struct amesa_visual));\r
-       if (!visual)\r
-       return NULL;\r
-\r
-    switch (depth)\r
-        {\r
-        case 15:\r
-            redBits   = 5;\r
-            greenBits = 5;\r
-            blueBits  = 5;\r
-            break;\r
-\r
-        case 16:\r
-            redBits   = 5;\r
-            greenBits = 6;\r
-            blueBits  = 5;\r
-            break;\r
-\r
-        case 24: case 32:\r
-            redBits   = 8;\r
-            greenBits = 8;\r
-            blueBits  = 8;\r
-            break;\r
-\r
-        default:\r
-            free(visual);\r
-            return NULL;\r
-        }\r
-\r
-    visual->DBFlag   = dbFlag;\r
-    visual->Depth    = depth;\r
-    visual->GLVisual = _mesa_create_visual(GL_TRUE,    /* rgb mode       */\r
-                                           dbFlag,     /* db_flag        */\r
-                                           GL_FALSE,   /* stereo         */\r
-                                           redBits, greenBits, blueBits, 8,\r
-                                           0,          /* index bits     */\r
-                                           depthSize,  /* depth bits     */\r
-                                           stencilSize,/* stencil bits   */\r
-                                           accumSize,  /* accum bits     */\r
-                                           accumSize,  /* accum bits     */\r
-                                           accumSize,  /* accum bits     */\r
-                                           accumSize,  /* accum bits     */\r
-                                           1 );\r
-    if (!visual->GLVisual)\r
-        {\r
-        free(visual);\r
-        return NULL;\r
-        }\r
-\r
-       return visual;\r
-       }\r
-\r
-\r
-void AMesaDestroyVisual(AMesaVisual visual)\r
-       {\r
-           _mesa_destroy_visual(visual->GLVisual);\r
-           free(visual);\r
-       }\r
-\r
-\r
-AMesaBuffer AMesaCreateBuffer(AMesaVisual visual,\r
-                                                         GLint width, GLint height)\r
-       {\r
-       AMesaBuffer buffer;\r
-\r
-    buffer = (AMesaBuffer)calloc(1, sizeof(struct amesa_buffer));\r
-       if (!buffer)\r
-       return NULL;\r
-\r
-       buffer->Screen     = NULL;\r
-       buffer->Background = NULL;\r
-       buffer->Active     = NULL;\r
-       buffer->Width      = width;\r
-       buffer->Height     = height;\r
-\r
-       if (visual->DBFlag)\r
-               {\r
-               buffer->Background = create_bitmap_ex(visual->Depth, width, height);\r
-               if (!buffer->Background)\r
-                       {\r
-                       free(buffer);\r
-                       return NULL;\r
-                       }\r
-               }\r
-\r
-    buffer->GLBuffer = _mesa_create_framebuffer(visual->GLVisual);\r
-    if (!buffer->GLBuffer)\r
-        {\r
-        if (buffer->Background) destroy_bitmap(buffer->Background);\r
-        free(buffer);\r
-        return NULL;\r
-        }\r
-\r
-       return buffer;\r
-       }\r
-\r
-\r
-void AMesaDestroyBuffer(AMesaBuffer buffer)\r
-{\r
-   if (buffer->Screen)     destroy_bitmap(buffer->Screen);\r
-   if (buffer->Background) destroy_bitmap(buffer->Background);\r
-   _mesa_unreference_framebuffer(&buffer->GLBuffer);\r
-   free(buffer);\r
-}\r
-\r
-\r
-AMesaContext AMesaCreateContext(AMesaVisual visual,\r
-                                AMesaContext share)\r
-{\r
-       AMesaContext context;\r
-       GLboolean    direct = GL_FALSE;\r
-\r
-       context = (AMesaContext)calloc(1, sizeof(struct amesa_context));\r
-       if (!context)\r
-               return NULL;\r
-\r
-       context->Visual       = visual;\r
-       context->Buffer           = NULL;\r
-       context->ClearColor   = 0;\r
-       context->CurrentColor = 0;\r
-       context->GLContext    = _mesa_create_context(visual->GLVisual,\r
-                                              share ? share->GLContext : NULL,\r
-                                               (void *) context, GL_FALSE );\r
-       if (!context->GLContext)\r
-        {\r
-               free(context);\r
-               return NULL;\r
-        }\r
-\r
-       return context;\r
-}\r
-\r
-\r
-void AMesaDestroyContext(AMesaContext context)\r
-{\r
-   _mesa_destroy_context(context->GLContext);\r
-   free(context);\r
-}\r
-\r
-\r
-GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer)\r
-{\r
-   if (context && buffer) {\r
-      set_color_depth(context->Visual->Depth);\r
-      if (set_gfx_mode(GFX_AUTODETECT, buffer->Width, buffer->Height, 0, 0) != 0)\r
-         return GL_FALSE;\r
-\r
-      context->Buffer = buffer;\r
-      buffer->Screen  = screen;\r
-      buffer->Active  = buffer->Background ? buffer->Background : screen;\r
-        \r
-      setup_dd_pointers(context->GLContext);\r
-      _mesa_make_current(context->GLContext, buffer->GLBuffer);\r
-   }\r
-   else {\r
+#include "GL/amesa.h"
+
+
+struct amesa_visual
+    {
+    GLvisual   *GLVisual;       /* inherit from GLvisual      */
+    GLboolean   DBFlag;         /* double buffered?           */
+    GLuint      Depth;          /* bits per pixel ( >= 15 )   */
+    };
+
+
+struct amesa_buffer
+    {
+    GLframebuffer *GLBuffer;    /* inherit from GLframebuffer */
+    GLuint         Width, Height;
+    BITMAP        *Screen;
+       BITMAP        *Background;
+       BITMAP        *Active;
+    };
+
+
+struct amesa_context
+    {
+    GLcontext   *GLContext;     /* inherit from GLcontext     */
+    AMesaVisual  Visual;
+       AMesaBuffer  Buffer;
+    GLuint       ClearColor;
+    GLuint       CurrentColor;
+    };
+
+
+static void setup_dd_pointers(GLcontext *ctx);
+
+
+/**********************************************************************/
+/*****                   drawing functions                        *****/
+/**********************************************************************/
+
+#define FLIP(context, y)  (context->Buffer->Height - (y) - 1)
+
+#include "allegro/generic.h"
+#include "allegro/direct.h"
+
+
+/**********************************************************************/
+/*****            15-bit accelerated drawing funcs                *****/
+/**********************************************************************/
+
+IMPLEMENT_WRITE_RGBA_SPAN(15, unsigned short)
+IMPLEMENT_WRITE_RGB_SPAN(15, unsigned short)
+IMPLEMENT_WRITE_MONO_RGBA_SPAN(15, unsigned short)
+IMPLEMENT_READ_RGBA_SPAN(15, unsigned short)
+IMPLEMENT_WRITE_RGBA_PIXELS(15, unsigned short)
+IMPLEMENT_WRITE_MONO_RGBA_PIXELS(15, unsigned short)
+IMPLEMENT_READ_RGBA_PIXELS(15, unsigned short)
+
+
+/**********************************************************************/
+/*****            16-bit accelerated drawing funcs                *****/
+/**********************************************************************/
+
+IMPLEMENT_WRITE_RGBA_SPAN(16, unsigned short)
+IMPLEMENT_WRITE_RGB_SPAN(16, unsigned short)
+IMPLEMENT_WRITE_MONO_RGBA_SPAN(16, unsigned short)
+IMPLEMENT_READ_RGBA_SPAN(16, unsigned short)
+IMPLEMENT_WRITE_RGBA_PIXELS(16, unsigned short)
+IMPLEMENT_WRITE_MONO_RGBA_PIXELS(16, unsigned short)
+IMPLEMENT_READ_RGBA_PIXELS(16, unsigned short)
+
+
+/**********************************************************************/
+/*****            32-bit accelerated drawing funcs                *****/
+/**********************************************************************/
+
+IMPLEMENT_WRITE_RGBA_SPAN(32, unsigned long)
+IMPLEMENT_WRITE_RGB_SPAN(32, unsigned long)
+IMPLEMENT_WRITE_MONO_RGBA_SPAN(32, unsigned long)
+IMPLEMENT_READ_RGBA_SPAN(32, unsigned long)
+IMPLEMENT_WRITE_RGBA_PIXELS(32, unsigned long)
+IMPLEMENT_WRITE_MONO_RGBA_PIXELS(32, unsigned long)
+IMPLEMENT_READ_RGBA_PIXELS(32, unsigned long)
+
+
+/**********************************************************************/
+/*****              Miscellaneous device driver funcs             *****/
+/**********************************************************************/
+
+static GLboolean set_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bit)
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    GLboolean    ok      = GL_TRUE;
+
+    if (bit == DD_FRONT_LEFT_BIT)
+        context->Buffer->Active = context->Buffer->Screen;
+
+    else if (bit == DD_BACK_LEFT)
+        {
+        if (context->Buffer->Background)
+            context->Buffer->Active = context->Buffer->Background;
+        else
+            ok = GL_FALSE;
+        }
+
+    else
+        ok = GL_FALSE;
+
+    return ok;
+    }
+
+
+static void get_buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
+    {
+       AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+
+    *width  = context->Buffer->Width;
+    *height = context->Buffer->Height;
+    }
+
+
+/**
+ * We only implement this function as a mechanism to check if the
+ * framebuffer size has changed (and update corresponding state).
+ */
+static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+   /* poll for window size change and realloc software Z/stencil/etc if needed */
+   GLuint newWidth, newHeight;
+   GLframebuffer *buffer = ctx->WinSysDrawBuffer;
+   get_buffer_size( &newWidth, &newHeight );
+   if (buffer->Width != newWidth || buffer->Height != newHeight) {
+      _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
+   }
+
+}
+
+
+/**********************************************************************/
+/**********************************************************************/
+
+static void setup_dd_pointers(GLcontext *ctx)
+       {
+       AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+
+       /* Initialize all the pointers in the driver struct. Do this whenever */
+       /* a new context is made current or we change buffers via set_buffer! */
+
+    ctx->Driver.UpdateState   = setup_dd_pointers;
+    ctx->Driver.SetBuffer     = set_buffer;
+    ctx->Driver.GetBufferSize = get_buffer_size;
+    ctx->Driver.Viewport      = viewport;
+
+    ctx->Driver.Color               = set_color_generic;
+    ctx->Driver.ClearColor          = clear_color_generic;
+    ctx->Driver.Clear               = clear_generic;
+    ctx->Driver.WriteRGBASpan       = write_rgba_span_generic;
+    ctx->Driver.WriteRGBSpan        = write_rgb_span_generic;
+    ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_generic;
+    ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_generic;
+    ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_generic;
+    ctx->Driver.ReadRGBASpan        = read_rgba_span_generic;
+    ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_generic;
+
+    if (context->Buffer->Active != screen)
+        {
+        switch (context->Visual->Depth)
+            {
+            case 15:
+                ctx->Driver.WriteRGBASpan       = write_rgba_span_15;
+                ctx->Driver.WriteRGBSpan        = write_rgb_span_15;
+                ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_15;
+                ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_15;
+                ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_15;
+                ctx->Driver.ReadRGBASpan        = read_rgba_span_15;
+                ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_15;
+                break;
+
+            case 16:
+                ctx->Driver.WriteRGBASpan       = write_rgba_span_16;
+                ctx->Driver.WriteRGBSpan        = write_rgb_span_16;
+                ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_16;
+                ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_16;
+                ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_16;
+                ctx->Driver.ReadRGBASpan        = read_rgba_span_16;
+                ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_16;
+                break;
+
+            case 32:
+                ctx->Driver.WriteRGBASpan       = write_rgba_span_32;
+                ctx->Driver.WriteRGBSpan        = write_rgb_span_32;
+                ctx->Driver.WriteMonoRGBASpan   = write_mono_rgba_span_32;
+                ctx->Driver.WriteRGBAPixels     = write_rgba_pixels_32;
+                ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_32;
+                ctx->Driver.ReadRGBASpan        = read_rgba_span_32;
+                ctx->Driver.ReadRGBAPixels      = read_rgba_pixels_32;
+                break;
+            }
+        }
+       }
+
+
+/**********************************************************************/
+/*****                AMesa Public API Functions                  *****/
+/**********************************************************************/
+
+
+AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth,
+                              GLint depthSize, GLint stencilSize, GLint accumSize)
+       {
+       AMesaVisual visual;
+    GLbyte      redBits, greenBits, blueBits;
+
+    visual = (AMesaVisual)calloc(1, sizeof(struct amesa_visual));
+       if (!visual)
+       return NULL;
+
+    switch (depth)
+        {
+        case 15:
+            redBits   = 5;
+            greenBits = 5;
+            blueBits  = 5;
+            break;
+
+        case 16:
+            redBits   = 5;
+            greenBits = 6;
+            blueBits  = 5;
+            break;
+
+        case 24: case 32:
+            redBits   = 8;
+            greenBits = 8;
+            blueBits  = 8;
+            break;
+
+        default:
+            free(visual);
+            return NULL;
+        }
+
+    visual->DBFlag   = dbFlag;
+    visual->Depth    = depth;
+    visual->GLVisual = _mesa_create_visual(GL_TRUE,    /* rgb mode       */
+                                           dbFlag,     /* db_flag        */
+                                           GL_FALSE,   /* stereo         */
+                                           redBits, greenBits, blueBits, 8,
+                                           0,          /* index bits     */
+                                           depthSize,  /* depth bits     */
+                                           stencilSize,/* stencil bits   */
+                                           accumSize,  /* accum bits     */
+                                           accumSize,  /* accum bits     */
+                                           accumSize,  /* accum bits     */
+                                           accumSize,  /* accum bits     */
+                                           1 );
+    if (!visual->GLVisual)
+        {
+        free(visual);
+        return NULL;
+        }
+
+       return visual;
+       }
+
+
+void AMesaDestroyVisual(AMesaVisual visual)
+       {
+           _mesa_destroy_visual(visual->GLVisual);
+           free(visual);
+       }
+
+
+AMesaBuffer AMesaCreateBuffer(AMesaVisual visual,
+                                                         GLint width, GLint height)
+       {
+       AMesaBuffer buffer;
+
+    buffer = (AMesaBuffer)calloc(1, sizeof(struct amesa_buffer));
+       if (!buffer)
+       return NULL;
+
+       buffer->Screen     = NULL;
+       buffer->Background = NULL;
+       buffer->Active     = NULL;
+       buffer->Width      = width;
+       buffer->Height     = height;
+
+       if (visual->DBFlag)
+               {
+               buffer->Background = create_bitmap_ex(visual->Depth, width, height);
+               if (!buffer->Background)
+                       {
+                       free(buffer);
+                       return NULL;
+                       }
+               }
+
+    buffer->GLBuffer = _mesa_create_framebuffer(visual->GLVisual);
+    if (!buffer->GLBuffer)
+        {
+        if (buffer->Background) destroy_bitmap(buffer->Background);
+        free(buffer);
+        return NULL;
+        }
+
+       return buffer;
+       }
+
+
+void AMesaDestroyBuffer(AMesaBuffer buffer)
+{
+   if (buffer->Screen)     destroy_bitmap(buffer->Screen);
+   if (buffer->Background) destroy_bitmap(buffer->Background);
+   _mesa_unreference_framebuffer(&buffer->GLBuffer);
+   free(buffer);
+}
+
+
+AMesaContext AMesaCreateContext(AMesaVisual visual,
+                                AMesaContext share)
+{
+       AMesaContext context;
+       GLboolean    direct = GL_FALSE;
+
+       context = (AMesaContext)calloc(1, sizeof(struct amesa_context));
+       if (!context)
+               return NULL;
+
+       context->Visual       = visual;
+       context->Buffer           = NULL;
+       context->ClearColor   = 0;
+       context->CurrentColor = 0;
+       context->GLContext    = _mesa_create_context(visual->GLVisual,
+                                              share ? share->GLContext : NULL,
+                                               (void *) context, GL_FALSE );
+       if (!context->GLContext)
+        {
+               free(context);
+               return NULL;
+        }
+
+       return context;
+}
+
+
+void AMesaDestroyContext(AMesaContext context)
+{
+   _mesa_destroy_context(context->GLContext);
+   free(context);
+}
+
+
+GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer)
+{
+   if (context && buffer) {
+      set_color_depth(context->Visual->Depth);
+      if (set_gfx_mode(GFX_AUTODETECT, buffer->Width, buffer->Height, 0, 0) != 0)
+         return GL_FALSE;
+
+      context->Buffer = buffer;
+      buffer->Screen  = screen;
+      buffer->Active  = buffer->Background ? buffer->Background : screen;
+        
+      setup_dd_pointers(context->GLContext);
+      _mesa_make_current(context->GLContext, buffer->GLBuffer);
+   }
+   else {
       /* XXX I don't think you want to destroy anything here! */
-      destroy_bitmap(context->Buffer->Screen);\r
-      context->Buffer->Screen = NULL;\r
-      context->Buffer->Active = NULL;\r
-      context->Buffer         = NULL;\r
-      _mesa_make_current(NULL, NULL);\r
-   }\r
-\r
-   return GL_TRUE;\r
-}\r
-\r
-\r
-void AMesaSwapBuffers(AMesaBuffer buffer)\r
-{\r
-   if (buffer->Background) {\r
-      blit(buffer->Background, buffer->Screen,\r
-           0, 0, 0, 0,\r
-           buffer->Width, buffer->Height);\r
-   }\r
-}\r
+      destroy_bitmap(context->Buffer->Screen);
+      context->Buffer->Screen = NULL;
+      context->Buffer->Active = NULL;
+      context->Buffer         = NULL;
+      _mesa_make_current(NULL, NULL);
+   }
+
+   return GL_TRUE;
+}
+
+
+void AMesaSwapBuffers(AMesaBuffer buffer)
+{
+   if (buffer->Background) {
+      blit(buffer->Background, buffer->Screen,
+           0, 0, 0, 0,
+           buffer->Width, buffer->Height);
+   }
+}
index 3998fc19d7bc0d424c5ca9b395c61599acc329a6..bd8b5eb49ddc7c5dcc7e3895a5ce81b1beb3ea3b 100644 (file)
-/*\r
- * Mesa 3-D graphics library\r
- * Version:  3.0\r
- * Copyright (C) 1995-1998  Brian Paul\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Library General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Library General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Library General Public\r
- * License along with this library; if not, write to the Free\r
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
- */\r
-\r
-\r
-#define DESTINATION(BMP, X, Y, TYPE)                                \\r
-    ({                                                              \\r
-    BITMAP *_bmp = BMP;                                             \\r
-                                                                    \\r
-    (TYPE*)(_bmp->line[_bmp->h - (Y) - 1]) + (X);                   \\r
-    })\r
-\r
-\r
-#define IMPLEMENT_WRITE_RGBA_SPAN(DEPTH, TYPE)                                                   \\r
-static void write_rgba_span_##DEPTH (const GLcontext *ctx,                                       \\r
-                                     GLuint n, GLint x, GLint y,                                 \\r
-                                     const GLubyte rgba[][4],                                    \\r
-                                     const GLubyte mask[])                                       \\r
-    {                                                                                            \\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                       \\r
-    TYPE              *d = DESTINATION(context->Buffer->Active, x, y, TYPE);                     \\r
-                                                                                                 \\r
-    if (mask)                                                                                    \\r
-        {                                                                                        \\r
-        while (n--)                                                                              \\r
-            {                                                                                    \\r
-            if (mask[0]) d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]);  \\r
-            d++; rgba++; mask++;                                                                 \\r
-            }                                                                                    \\r
-        }                                                                                        \\r
-    else                                                                                         \\r
-        {                                                                                        \\r
-        while (n--)                                                                              \\r
-            {                                                                                    \\r
-            d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]);               \\r
-            d++; rgba++;                                                                         \\r
-            }                                                                                    \\r
-        }                                                                                        \\r
-    }\r
-\r
-\r
-#define IMPLEMENT_WRITE_RGB_SPAN(DEPTH, TYPE)                                                    \\r
-static void write_rgb_span_##DEPTH (const GLcontext *ctx,                                        \\r
-                                    GLuint n, GLint x, GLint y,                                  \\r
-                                    const GLubyte rgb[][3],                                      \\r
-                                    const GLubyte mask[])                                        \\r
-    {                                                                                            \\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                       \\r
-    TYPE              *d = DESTINATION(context->Buffer->Active, x, y, TYPE);                     \\r
-                                                                                                 \\r
-    if (mask)                                                                                    \\r
-        {                                                                                        \\r
-        while (n--)                                                                              \\r
-            {                                                                                    \\r
-            if (mask[0]) d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]);     \\r
-            d++; rgb++; mask++;                                                                  \\r
-            }                                                                                    \\r
-        }                                                                                        \\r
-    else                                                                                         \\r
-        {                                                                                        \\r
-        while (n--)                                                                              \\r
-            {                                                                                    \\r
-            d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]);                  \\r
-            d++; rgb++;                                                                          \\r
-            }                                                                                    \\r
-        }                                                                                        \\r
-    }\r
-\r
-\r
-#define IMPLEMENT_WRITE_MONO_RGBA_SPAN(DEPTH, TYPE)                                              \\r
-static void write_mono_rgba_span_##DEPTH (const GLcontext *ctx,                                  \\r
-                                          GLuint n, GLint x, GLint y,                            \\r
-                                          const GLubyte mask[])                                  \\r
-    {                                                                                            \\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                       \\r
-    TYPE           color = context->CurrentColor;                                                \\r
-    TYPE              *d = DESTINATION(context->Buffer->Active, x, y, TYPE);                     \\r
-                                                                                                 \\r
-    while (n--)                                                                                  \\r
-        {                                                                                        \\r
-        if (mask[0]) d[0] = color;                                                               \\r
-        d++; mask++;                                                                             \\r
-        }                                                                                        \\r
-    }\r
-\r
-\r
-#define IMPLEMENT_READ_RGBA_SPAN(DEPTH, TYPE)                           \\r
-static void read_rgba_span_##DEPTH (const GLcontext *ctx,                              \\r
-                                    GLuint n, GLint x, GLint y,                        \\r
-                                    GLubyte rgba[][4])                                 \\r
-    {                                                                                                                                  \\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                             \\r
-    BITMAP          *bmp = context->Buffer->Active;                     \\r
-    TYPE              *d = DESTINATION(bmp, x, y, TYPE);                \\r
-                                                                        \\r
-    while (n--)                                                         \\r
-        {                                                               \\r
-        rgba[0][RCOMP] = getr##DEPTH(d[0]);                             \\r
-        rgba[0][GCOMP] = getg##DEPTH(d[0]);                             \\r
-        rgba[0][BCOMP] = getb##DEPTH(d[0]);                             \\r
-        rgba[0][ACOMP] = 255;                                           \\r
-                                                                        \\r
-        d++; rgba++;                                                    \\r
-        }                                                               \\r
-    }\r
-\r
-\r
-#define IMPLEMENT_WRITE_RGBA_PIXELS(DEPTH, TYPE)                                                                                 \\r
-static void write_rgba_pixels_##DEPTH (const GLcontext *ctx,                                                                     \\r
-                                       GLuint n,                                                                                 \\r
-                                       const GLint x[],                                                                          \\r
-                                       const GLint y[],                                                                          \\r
-                                       const GLubyte rgba[][4],                                                                  \\r
-                                       const GLubyte mask[])                                                                     \\r
-    {                                                                                                                            \\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                                                       \\r
-    BITMAP          *bmp = context->Buffer->Active;                                                                              \\r
-                                                                                                                                 \\r
-    while (n--)                                                                                                                  \\r
-        {                                                                                                                        \\r
-        if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]);       \\r
-        rgba++; x++; y++; mask++;                                                                                                \\r
-        }                                                                                                                        \\r
-    }\r
-\r
-\r
-\r
-#define IMPLEMENT_WRITE_MONO_RGBA_PIXELS(DEPTH, TYPE)                                                                            \\r
-static void write_mono_rgba_pixels_##DEPTH (const GLcontext *ctx,                                                                \\r
-                                            GLuint n,                                                                            \\r
-                                            const GLint x[],                                                                     \\r
-                                            const GLint y[],                                                                     \\r
-                                            const GLubyte mask[])                                                                \\r
-    {                                                                                                                            \\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                                                       \\r
-    TYPE          color  = context->CurrentColor;                                                                                \\r
-    BITMAP          *bmp = context->Buffer->Active;                                                                              \\r
-                                                                                                                                 \\r
-    while (n--)                                                                                                                  \\r
-        {                                                                                                                        \\r
-        if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = color;                                                                \\r
-        x++; y++; mask++;                                                                                                        \\r
-        }                                                                                                                        \\r
-    }\r
-\r
-\r
-#define IMPLEMENT_READ_RGBA_PIXELS(DEPTH, TYPE)                         \\r
-static void read_rgba_pixels_##DEPTH (const GLcontext *ctx,                            \\r
-                                         GLuint n,                                                     \\r
-                                         const GLint x[],                                      \\r
-                                         const GLint y[],                                      \\r
-                                         GLubyte rgba[][4],                            \\r
-                                         const GLubyte mask[])                         \\r
-    {                                                                                                                                  \\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                             \\r
-    BITMAP          *bmp = context->Buffer->Active;                     \\r
-                                                                        \\r
-    while (n--)                                                         \\r
-        {                                                               \\r
-        if (mask[0])                                                    \\r
-            {                                                           \\r
-            int color = *DESTINATION(bmp, x[0], y[0], TYPE);            \\r
-                                                                        \\r
-            rgba[0][RCOMP] = getr##DEPTH(color);                        \\r
-            rgba[0][GCOMP] = getg##DEPTH(color);                        \\r
-            rgba[0][BCOMP] = getb##DEPTH(color);                        \\r
-            rgba[0][ACOMP] = 255;                                       \\r
-            }                                                           \\r
-                                                                        \\r
-        x++; y++; rgba++; mask++;                                       \\r
-        }                                                               \\r
-    }\r
-\r
+/*
+ * 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.
+ */
+
+
+#define DESTINATION(BMP, X, Y, TYPE)                                \
+    ({                                                              \
+    BITMAP *_bmp = BMP;                                             \
+                                                                    \
+    (TYPE*)(_bmp->line[_bmp->h - (Y) - 1]) + (X);                   \
+    })
+
+
+#define IMPLEMENT_WRITE_RGBA_SPAN(DEPTH, TYPE)                                                   \
+static void write_rgba_span_##DEPTH (const GLcontext *ctx,                                       \
+                                     GLuint n, GLint x, GLint y,                                 \
+                                     const GLubyte rgba[][4],                                    \
+                                     const GLubyte mask[])                                       \
+    {                                                                                            \
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                       \
+    TYPE              *d = DESTINATION(context->Buffer->Active, x, y, TYPE);                     \
+                                                                                                 \
+    if (mask)                                                                                    \
+        {                                                                                        \
+        while (n--)                                                                              \
+            {                                                                                    \
+            if (mask[0]) d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]);  \
+            d++; rgba++; mask++;                                                                 \
+            }                                                                                    \
+        }                                                                                        \
+    else                                                                                         \
+        {                                                                                        \
+        while (n--)                                                                              \
+            {                                                                                    \
+            d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]);               \
+            d++; rgba++;                                                                         \
+            }                                                                                    \
+        }                                                                                        \
+    }
+
+
+#define IMPLEMENT_WRITE_RGB_SPAN(DEPTH, TYPE)                                                    \
+static void write_rgb_span_##DEPTH (const GLcontext *ctx,                                        \
+                                    GLuint n, GLint x, GLint y,                                  \
+                                    const GLubyte rgb[][3],                                      \
+                                    const GLubyte mask[])                                        \
+    {                                                                                            \
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                       \
+    TYPE              *d = DESTINATION(context->Buffer->Active, x, y, TYPE);                     \
+                                                                                                 \
+    if (mask)                                                                                    \
+        {                                                                                        \
+        while (n--)                                                                              \
+            {                                                                                    \
+            if (mask[0]) d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]);     \
+            d++; rgb++; mask++;                                                                  \
+            }                                                                                    \
+        }                                                                                        \
+    else                                                                                         \
+        {                                                                                        \
+        while (n--)                                                                              \
+            {                                                                                    \
+            d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]);                  \
+            d++; rgb++;                                                                          \
+            }                                                                                    \
+        }                                                                                        \
+    }
+
+
+#define IMPLEMENT_WRITE_MONO_RGBA_SPAN(DEPTH, TYPE)                                              \
+static void write_mono_rgba_span_##DEPTH (const GLcontext *ctx,                                  \
+                                          GLuint n, GLint x, GLint y,                            \
+                                          const GLubyte mask[])                                  \
+    {                                                                                            \
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                       \
+    TYPE           color = context->CurrentColor;                                                \
+    TYPE              *d = DESTINATION(context->Buffer->Active, x, y, TYPE);                     \
+                                                                                                 \
+    while (n--)                                                                                  \
+        {                                                                                        \
+        if (mask[0]) d[0] = color;                                                               \
+        d++; mask++;                                                                             \
+        }                                                                                        \
+    }
+
+
+#define IMPLEMENT_READ_RGBA_SPAN(DEPTH, TYPE)                           \
+static void read_rgba_span_##DEPTH (const GLcontext *ctx,                              \
+                                    GLuint n, GLint x, GLint y,                        \
+                                    GLubyte rgba[][4])                                 \
+    {                                                                                                                                  \
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                             \
+    BITMAP          *bmp = context->Buffer->Active;                     \
+    TYPE              *d = DESTINATION(bmp, x, y, TYPE);                \
+                                                                        \
+    while (n--)                                                         \
+        {                                                               \
+        rgba[0][RCOMP] = getr##DEPTH(d[0]);                             \
+        rgba[0][GCOMP] = getg##DEPTH(d[0]);                             \
+        rgba[0][BCOMP] = getb##DEPTH(d[0]);                             \
+        rgba[0][ACOMP] = 255;                                           \
+                                                                        \
+        d++; rgba++;                                                    \
+        }                                                               \
+    }
+
+
+#define IMPLEMENT_WRITE_RGBA_PIXELS(DEPTH, TYPE)                                                                                 \
+static void write_rgba_pixels_##DEPTH (const GLcontext *ctx,                                                                     \
+                                       GLuint n,                                                                                 \
+                                       const GLint x[],                                                                          \
+                                       const GLint y[],                                                                          \
+                                       const GLubyte rgba[][4],                                                                  \
+                                       const GLubyte mask[])                                                                     \
+    {                                                                                                                            \
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                                                       \
+    BITMAP          *bmp = context->Buffer->Active;                                                                              \
+                                                                                                                                 \
+    while (n--)                                                                                                                  \
+        {                                                                                                                        \
+        if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]);       \
+        rgba++; x++; y++; mask++;                                                                                                \
+        }                                                                                                                        \
+    }
+
+
+
+#define IMPLEMENT_WRITE_MONO_RGBA_PIXELS(DEPTH, TYPE)                                                                            \
+static void write_mono_rgba_pixels_##DEPTH (const GLcontext *ctx,                                                                \
+                                            GLuint n,                                                                            \
+                                            const GLint x[],                                                                     \
+                                            const GLint y[],                                                                     \
+                                            const GLubyte mask[])                                                                \
+    {                                                                                                                            \
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                                                                       \
+    TYPE          color  = context->CurrentColor;                                                                                \
+    BITMAP          *bmp = context->Buffer->Active;                                                                              \
+                                                                                                                                 \
+    while (n--)                                                                                                                  \
+        {                                                                                                                        \
+        if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = color;                                                                \
+        x++; y++; mask++;                                                                                                        \
+        }                                                                                                                        \
+    }
+
+
+#define IMPLEMENT_READ_RGBA_PIXELS(DEPTH, TYPE)                         \
+static void read_rgba_pixels_##DEPTH (const GLcontext *ctx,                            \
+                                         GLuint n,                                                     \
+                                         const GLint x[],                                      \
+                                         const GLint y[],                                      \
+                                         GLubyte rgba[][4],                            \
+                                         const GLubyte mask[])                         \
+    {                                                                                                                                  \
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);                             \
+    BITMAP          *bmp = context->Buffer->Active;                     \
+                                                                        \
+    while (n--)                                                         \
+        {                                                               \
+        if (mask[0])                                                    \
+            {                                                           \
+            int color = *DESTINATION(bmp, x[0], y[0], TYPE);            \
+                                                                        \
+            rgba[0][RCOMP] = getr##DEPTH(color);                        \
+            rgba[0][GCOMP] = getg##DEPTH(color);                        \
+            rgba[0][BCOMP] = getb##DEPTH(color);                        \
+            rgba[0][ACOMP] = 255;                                       \
+            }                                                           \
+                                                                        \
+        x++; y++; rgba++; mask++;                                       \
+        }                                                               \
+    }
+
index cbdf5ff2b3ad18e41917ed8e4efdd28accfa2a1b..4c8af9b95cfd64d8879bc4eadeba251589f4d1b2 100644 (file)
-/*\r
- * Mesa 3-D graphics library\r
- * Version:  3.0\r
- * Copyright (C) 1995-1998  Brian Paul\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Library General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Library General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Library General Public\r
- * License along with this library; if not, write to the Free\r
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
- */\r
-\r
-static void clear_color_generic(GLcontext *ctx, const GLfloat color[4])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    GLubyte r, g, b;\r
-    CLAMPED_FLOAT_TO_UBYTE(r, color[0]);\r
-    CLAMPED_FLOAT_TO_UBYTE(g, color[1]);\r
-    CLAMPED_FLOAT_TO_UBYTE(b, color[2]);\r
-    context->ClearColor = makecol(r, g, b);\r
-    }\r
-\r
-\r
-static void set_color_generic(GLcontext *ctx,\r
-                              GLubyte red,  GLubyte green,\r
-                              GLubyte blue, GLubyte alpha)\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-\r
-    context->CurrentColor = makecol(red, green, blue);\r
-    }\r
-\r
-\r
-static GLbitfield clear_generic(GLcontext *ctx,\r
-                                GLbitfield mask, GLboolean all,\r
-                                GLint x, GLint y,\r
-                                GLint width, GLint height)\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-\r
-    if (mask & GL_COLOR_BUFFER_BIT)\r
-        {\r
-        if (all)\r
-            clear_to_color(context->Buffer->Active, context->ClearColor);\r
-        else\r
-            rect(context->Buffer->Active,\r
-                 x, y, x+width-1, y+height-1,\r
-                 context->ClearColor);\r
-        }\r
-\r
-    return mask & (~GL_COLOR_BUFFER_BIT);\r
-    }\r
-\r
-\r
-static void write_rgba_span_generic(const GLcontext *ctx,\r
-                                    GLuint n, GLint x, GLint y,\r
-                                    const GLubyte rgba[][4],\r
-                                    const GLubyte mask[])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    BITMAP          *bmp = context->Buffer->Active;\r
-\r
-    y = FLIP(context, y);\r
-\r
-    if (mask)\r
-        {\r
-        while (n--)\r
-            {\r
-            if (mask[0]) putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));\r
-            x++; mask++; rgba++;\r
-            }\r
-        }\r
-    else\r
-        {\r
-        while (n--)\r
-            {\r
-            putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));\r
-            x++; rgba++;\r
-            }\r
-        }\r
-    }\r
-\r
-\r
-static void write_rgb_span_generic(const GLcontext *ctx,\r
-                                   GLuint n, GLint x, GLint y,\r
-                                   const GLubyte rgb[][3],\r
-                                   const GLubyte mask[])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    BITMAP          *bmp = context->Buffer->Active;\r
-\r
-    y = FLIP(context, y);\r
-\r
-    if (mask)\r
-        {\r
-        while(n--)\r
-            {\r
-            if (mask[0]) putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));\r
-            x++; mask++; rgb++;\r
-            }\r
-        }\r
-    else\r
-        {\r
-        while (n--)\r
-            {\r
-            putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));\r
-            x++; rgb++;\r
-            }\r
-        }\r
-    }\r
-\r
-\r
-static void write_mono_rgba_span_generic(const GLcontext *ctx,\r
-                                         GLuint n, GLint x, GLint y,\r
-                                         const GLubyte mask[])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    BITMAP          *bmp = context->Buffer->Active;\r
-    int            color = context->CurrentColor;\r
-\r
-    y = FLIP(context, y);\r
-\r
-    if (mask)\r
-        {\r
-        while(n--)\r
-            {\r
-            if (mask[0]) putpixel(bmp, x, y, color);\r
-            x++; mask++;\r
-            }\r
-        }\r
-    else\r
-        {\r
-        while(n--)\r
-            {\r
-            putpixel(bmp, x, y, color);\r
-            x++;\r
-            }\r
-        }\r
-    }\r
-\r
-\r
-static void read_rgba_span_generic(const GLcontext *ctx,\r
-                                   GLuint n, GLint x, GLint y,\r
-                                   GLubyte rgba[][4])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    BITMAP          *bmp = context->Buffer->Active;\r
-\r
-    y = FLIP(context, y);\r
-\r
-    while (n--)\r
-        {\r
-        int color = getpixel(bmp, x, y);\r
-\r
-        rgba[0][RCOMP] = getr(color);\r
-        rgba[0][GCOMP] = getg(color);\r
-        rgba[0][BCOMP] = getb(color);\r
-        rgba[0][ACOMP] = 255;\r
-\r
-        x++; rgba++;\r
-        }\r
-    }\r
-\r
-\r
-static void write_rgba_pixels_generic(const GLcontext *ctx,\r
-                                      GLuint n,\r
-                                      const GLint x[],\r
-                                      const GLint y[],\r
-                                      const GLubyte rgba[][4],\r
-                                      const GLubyte mask[])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    BITMAP          *bmp = context->Buffer->Active;\r
-\r
-    while (n--)\r
-        {\r
-        if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));\r
-        x++; y++; mask++;\r
-        }\r
-    }\r
-\r
-\r
-static void write_mono_rgba_pixels_generic(const GLcontext *ctx,\r
-                                           GLuint n,\r
-                                           const GLint x[],\r
-                                           const GLint y[],\r
-                                           const GLubyte mask[])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    BITMAP          *bmp = context->Buffer->Active;\r
-    int            color = context->CurrentColor;\r
-\r
-    while (n--)\r
-        {\r
-        if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), color);\r
-        x++; y++; mask++;\r
-        }\r
-    }\r
-\r
-\r
-static void read_rgba_pixels_generic(const GLcontext *ctx,\r
-                                     GLuint n,\r
-                                     const GLint x[],\r
-                                     const GLint y[],\r
-                                     GLubyte rgba[][4],\r
-                                     const GLubyte mask[])\r
-    {\r
-    AMesaContext context = (AMesaContext)(ctx->DriverCtx);\r
-    BITMAP          *bmp = context->Buffer->Active;\r
-\r
-    while (n--)\r
-        {\r
-        if (mask[0])\r
-            {\r
-            int color = getpixel(bmp, x[0], FLIP(context, y[0]));\r
-\r
-            rgba[0][RCOMP] = getr(color);\r
-            rgba[0][GCOMP] = getg(color);\r
-            rgba[0][BCOMP] = getb(color);\r
-            rgba[0][ACOMP] = 255;\r
-            }\r
-\r
-        x++; y++; mask++; rgba++;\r
-        }\r
-    }\r
-\r
+/*
+ * 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.
+ */
+
+static void clear_color_generic(GLcontext *ctx, const GLfloat color[4])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    GLubyte r, g, b;
+    CLAMPED_FLOAT_TO_UBYTE(r, color[0]);
+    CLAMPED_FLOAT_TO_UBYTE(g, color[1]);
+    CLAMPED_FLOAT_TO_UBYTE(b, color[2]);
+    context->ClearColor = makecol(r, g, b);
+    }
+
+
+static void set_color_generic(GLcontext *ctx,
+                              GLubyte red,  GLubyte green,
+                              GLubyte blue, GLubyte alpha)
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+
+    context->CurrentColor = makecol(red, green, blue);
+    }
+
+
+static GLbitfield clear_generic(GLcontext *ctx,
+                                GLbitfield mask, GLboolean all,
+                                GLint x, GLint y,
+                                GLint width, GLint height)
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+
+    if (mask & GL_COLOR_BUFFER_BIT)
+        {
+        if (all)
+            clear_to_color(context->Buffer->Active, context->ClearColor);
+        else
+            rect(context->Buffer->Active,
+                 x, y, x+width-1, y+height-1,
+                 context->ClearColor);
+        }
+
+    return mask & (~GL_COLOR_BUFFER_BIT);
+    }
+
+
+static void write_rgba_span_generic(const GLcontext *ctx,
+                                    GLuint n, GLint x, GLint y,
+                                    const GLubyte rgba[][4],
+                                    const GLubyte mask[])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    BITMAP          *bmp = context->Buffer->Active;
+
+    y = FLIP(context, y);
+
+    if (mask)
+        {
+        while (n--)
+            {
+            if (mask[0]) putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
+            x++; mask++; rgba++;
+            }
+        }
+    else
+        {
+        while (n--)
+            {
+            putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
+            x++; rgba++;
+            }
+        }
+    }
+
+
+static void write_rgb_span_generic(const GLcontext *ctx,
+                                   GLuint n, GLint x, GLint y,
+                                   const GLubyte rgb[][3],
+                                   const GLubyte mask[])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    BITMAP          *bmp = context->Buffer->Active;
+
+    y = FLIP(context, y);
+
+    if (mask)
+        {
+        while(n--)
+            {
+            if (mask[0]) putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));
+            x++; mask++; rgb++;
+            }
+        }
+    else
+        {
+        while (n--)
+            {
+            putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));
+            x++; rgb++;
+            }
+        }
+    }
+
+
+static void write_mono_rgba_span_generic(const GLcontext *ctx,
+                                         GLuint n, GLint x, GLint y,
+                                         const GLubyte mask[])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    BITMAP          *bmp = context->Buffer->Active;
+    int            color = context->CurrentColor;
+
+    y = FLIP(context, y);
+
+    if (mask)
+        {
+        while(n--)
+            {
+            if (mask[0]) putpixel(bmp, x, y, color);
+            x++; mask++;
+            }
+        }
+    else
+        {
+        while(n--)
+            {
+            putpixel(bmp, x, y, color);
+            x++;
+            }
+        }
+    }
+
+
+static void read_rgba_span_generic(const GLcontext *ctx,
+                                   GLuint n, GLint x, GLint y,
+                                   GLubyte rgba[][4])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    BITMAP          *bmp = context->Buffer->Active;
+
+    y = FLIP(context, y);
+
+    while (n--)
+        {
+        int color = getpixel(bmp, x, y);
+
+        rgba[0][RCOMP] = getr(color);
+        rgba[0][GCOMP] = getg(color);
+        rgba[0][BCOMP] = getb(color);
+        rgba[0][ACOMP] = 255;
+
+        x++; rgba++;
+        }
+    }
+
+
+static void write_rgba_pixels_generic(const GLcontext *ctx,
+                                      GLuint n,
+                                      const GLint x[],
+                                      const GLint y[],
+                                      const GLubyte rgba[][4],
+                                      const GLubyte mask[])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    BITMAP          *bmp = context->Buffer->Active;
+
+    while (n--)
+        {
+        if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
+        x++; y++; mask++;
+        }
+    }
+
+
+static void write_mono_rgba_pixels_generic(const GLcontext *ctx,
+                                           GLuint n,
+                                           const GLint x[],
+                                           const GLint y[],
+                                           const GLubyte mask[])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    BITMAP          *bmp = context->Buffer->Active;
+    int            color = context->CurrentColor;
+
+    while (n--)
+        {
+        if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), color);
+        x++; y++; mask++;
+        }
+    }
+
+
+static void read_rgba_pixels_generic(const GLcontext *ctx,
+                                     GLuint n,
+                                     const GLint x[],
+                                     const GLint y[],
+                                     GLubyte rgba[][4],
+                                     const GLubyte mask[])
+    {
+    AMesaContext context = (AMesaContext)(ctx->DriverCtx);
+    BITMAP          *bmp = context->Buffer->Active;
+
+    while (n--)
+        {
+        if (mask[0])
+            {
+            int color = getpixel(bmp, x[0], FLIP(context, y[0]));
+
+            rgba[0][RCOMP] = getr(color);
+            rgba[0][GCOMP] = getg(color);
+            rgba[0][BCOMP] = getb(color);
+            rgba[0][ACOMP] = 255;
+            }
+
+        x++; y++; mask++; rgba++;
+        }
+    }
+
index cd95ef0f1eecb55f3c7ee6ecad2d2010d9b4682e..80ee91d9222fb6a3429b2efc0b0e651b756615df 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                       Build 5   */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "D3DHAL.h"\r
-/*===========================================================================*/\r
-/* Macros.                                                                   */\r
-/*===========================================================================*/\r
-#define SRCBLEND_MAP(gl,d3d,fall)      if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwSrcBlendCaps & d3d ) \\r
-                                   { \\r
-                                                   sprintf( buffer, "SRC Blend: %s -> %s", # gl, # d3d ); \\r
-                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \\r
-                                     pShared->dwSrcBlendCaps[index] = d3d; \\r
-                                                    } \\r
-                                                       else \\r
-                                   { \\r
-                                                   sprintf( buffer, "SRC Blend: %s -> %s", # gl, # fall ); \\r
-                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \\r
-                                     pShared->dwSrcBlendCaps[index] = fall; \\r
-                                                       }\r
-#define DSTBLEND_MAP(gl,d3d,fall)      if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwDestBlendCaps & d3d ) \\r
-                                   { \\r
-                                                   sprintf( buffer, "DST Blend: %s -> %s", # gl, # d3d ); \\r
-                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \\r
-                                     pShared->dwDestBlendCaps[index] = d3d; \\r
-                                                    } \\r
-                                                       else \\r
-                                   { \\r
-                                                   sprintf( buffer, "DST Blend: %s -> %s", # gl, # fall ); \\r
-                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \\r
-                                     pShared->dwDestBlendCaps[index] = fall; \\r
-                                                       }\r
-\r
-/*===========================================================================*/\r
-/*  I use this function to handle the fact that the D3D texture blending and */\r
-/* OpenGL texture blending functions don't map one to one.  Also there is the*/\r
-/* problem with cards not supporting all the D3D functions. So I use the CAPS*/\r
-/* of the card to make a table of functions that will have defaults for the  */\r
-/* unsupported functions.                                                    */\r
-/*  So first I fill the table with the fallback function then I check to see */\r
-/* if the card supports the requested function.  If it does I replace the    */\r
-/* default thats already in the array.  Now order does matter as I used an   */\r
-/* enum type in D3DShared.h so that the mapping would be a little easier.    */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void AlphaBlendTableHAL( PMESAD3DHAL pHAL )\r
-{\r
-  PMESAD3DSHARED       pShared = &pHAL->shared;\r
-  int                  index;\r
-  char                 buffer[128];\r
-\r
-  DPF(( DBG_FUNC, "AlphaBlendTableHAL();" ));\r
-\r
-  /* Make the fallback for the Source blend. */\r
-  for( index = 0; index < 14; index++ )\r
-  {\r
-    switch( index )\r
-    {\r
-      case s_zero:\r
-        SRCBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );\r
-          break;\r
-      case s_one:\r
-        SRCBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );\r
-          break;\r
-      case s_dst_color:\r
-        SRCBLEND_MAP( GL_DST_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case s_one_minus_dst_color:\r
-        SRCBLEND_MAP( GL_ONE_MINUS_DST_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case s_src_alpha:\r
-        SRCBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case s_one_minus_src_alpha:\r
-        SRCBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case s_dst_alpha:\r
-        SRCBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case s_one_minus_dst_alpha:\r
-        SRCBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case s_src_alpha_saturate:\r
-        SRCBLEND_MAP( GL_SRC_ALPHA_SATURATE, D3DBLEND_SRCALPHASAT, D3DBLEND_ONE );\r
-          break;\r
-      case s_constant_color:\r
-        SRCBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case s_one_minus_constant_color:\r
-        SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case s_constant_alpha:\r
-        SRCBLEND_MAP( GL_CONSTANT_ALPHA, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case s_one_minus_constant_alpha:\r
-        SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-    }\r
-  }\r
-\r
-  /* Make the fallback for the Destination blend. */\r
-  for( index = 0; index < 14; index++ )\r
-  {\r
-    switch( index )\r
-    {\r
-      case d_zero:\r
-        DSTBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );\r
-          break;\r
-      case d_one:\r
-        DSTBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );\r
-          break;\r
-      case d_src_color:\r
-        DSTBLEND_MAP( GL_SRC_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case d_one_minus_src_color:\r
-        DSTBLEND_MAP( GL_ONE_MINUS_SRC_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case d_src_alpha:\r
-        DSTBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case d_one_minus_src_alpha:\r
-        DSTBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case d_dst_alpha:\r
-        DSTBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case d_one_minus_dst_alpha:\r
-        DSTBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case d_constant_color:\r
-        DSTBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case d_one_minus_constant_color:\r
-        DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );\r
-          break;\r
-      case d_constant_alpha:\r
-        DSTBLEND_MAP( GL_CONSTANT_ALPHAR, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-      case d_one_minus_constant_alpha:\r
-        DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );\r
-          break;\r
-    }\r
-  }\r
-\r
-  /* Make the fallbacks for the texture functions. */\r
-  for( index = 0; index < 4; index++ )\r
-  {\r
-    switch( index )\r
-    {\r
-      case d3dtblend_decal:\r
-          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )\r
-          {\r
-               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_DECAL" )); \r
-               pShared->dwTexFunc[index] = D3DTBLEND_DECAL; \r
-          }\r
-        else\r
-          {\r
-               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_MODULATE" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_MODULATE; \r
-               }\r
-               else\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_ADD" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; \r
-               }\r
-          }\r
-          break;\r
-      case d3dtblend_decalalpha:\r
-          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECALALPHA )\r
-          {\r
-               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_DECALALPHA" )); \r
-               pShared->dwTexFunc[index] = D3DTBLEND_DECALALPHA; \r
-          }\r
-        else\r
-          {\r
-               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPA -> D3DTBLEND_DECAL" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_DECAL; \r
-               }\r
-               else\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_ADD" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; \r
-               }\r
-          }\r
-          break;\r
-    case d3dtblend_modulate:\r
-          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )\r
-          {\r
-               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATE" )); \r
-               pShared->dwTexFunc[index] = D3DTBLEND_MODULATE; \r
-          }\r
-        else\r
-          {\r
-               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATEALPHA" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA; \r
-               }\r
-               else    if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_DECAL" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_DECAL; \r
-               }\r
-               else\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_ADD" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; \r
-               }\r
-          }\r
-          break;\r
-    case d3dtblend_modulatealpha:\r
-          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )\r
-          {\r
-               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATEALPHA" )); \r
-               pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA; \r
-          }\r
-        else\r
-          {\r
-               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATE" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;\r
-               }\r
-               else    if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_DECALE" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_DECAL; \r
-               }\r
-               else\r
-               {\r
-                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_ADD" )); \r
-                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; \r
-               }\r
-          }\r
-          break;\r
-    }\r
-  }\r
-}\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                       Build 5   */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "D3DHAL.h"
+/*===========================================================================*/
+/* Macros.                                                                   */
+/*===========================================================================*/
+#define SRCBLEND_MAP(gl,d3d,fall)      if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwSrcBlendCaps & d3d ) \
+                                   { \
+                                                   sprintf( buffer, "SRC Blend: %s -> %s", # gl, # d3d ); \
+                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
+                                     pShared->dwSrcBlendCaps[index] = d3d; \
+                                                    } \
+                                                       else \
+                                   { \
+                                                   sprintf( buffer, "SRC Blend: %s -> %s", # gl, # fall ); \
+                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
+                                     pShared->dwSrcBlendCaps[index] = fall; \
+                                                       }
+#define DSTBLEND_MAP(gl,d3d,fall)      if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwDestBlendCaps & d3d ) \
+                                   { \
+                                                   sprintf( buffer, "DST Blend: %s -> %s", # gl, # d3d ); \
+                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
+                                     pShared->dwDestBlendCaps[index] = d3d; \
+                                                    } \
+                                                       else \
+                                   { \
+                                                   sprintf( buffer, "DST Blend: %s -> %s", # gl, # fall ); \
+                                     DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
+                                     pShared->dwDestBlendCaps[index] = fall; \
+                                                       }
+
+/*===========================================================================*/
+/*  I use this function to handle the fact that the D3D texture blending and */
+/* OpenGL texture blending functions don't map one to one.  Also there is the*/
+/* problem with cards not supporting all the D3D functions. So I use the CAPS*/
+/* of the card to make a table of functions that will have defaults for the  */
+/* unsupported functions.                                                    */
+/*  So first I fill the table with the fallback function then I check to see */
+/* if the card supports the requested function.  If it does I replace the    */
+/* default thats already in the array.  Now order does matter as I used an   */
+/* enum type in D3DShared.h so that the mapping would be a little easier.    */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void AlphaBlendTableHAL( PMESAD3DHAL pHAL )
+{
+  PMESAD3DSHARED       pShared = &pHAL->shared;
+  int                  index;
+  char                 buffer[128];
+
+  DPF(( DBG_FUNC, "AlphaBlendTableHAL();" ));
+
+  /* Make the fallback for the Source blend. */
+  for( index = 0; index < 14; index++ )
+  {
+    switch( index )
+    {
+      case s_zero:
+        SRCBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );
+          break;
+      case s_one:
+        SRCBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );
+          break;
+      case s_dst_color:
+        SRCBLEND_MAP( GL_DST_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );
+          break;
+      case s_one_minus_dst_color:
+        SRCBLEND_MAP( GL_ONE_MINUS_DST_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );
+          break;
+      case s_src_alpha:
+        SRCBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );
+          break;
+      case s_one_minus_src_alpha:
+        SRCBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );
+          break;
+      case s_dst_alpha:
+        SRCBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );
+          break;
+      case s_one_minus_dst_alpha:
+        SRCBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );
+          break;
+      case s_src_alpha_saturate:
+        SRCBLEND_MAP( GL_SRC_ALPHA_SATURATE, D3DBLEND_SRCALPHASAT, D3DBLEND_ONE );
+          break;
+      case s_constant_color:
+        SRCBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );
+          break;
+      case s_one_minus_constant_color:
+        SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );
+          break;
+      case s_constant_alpha:
+        SRCBLEND_MAP( GL_CONSTANT_ALPHA, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );
+          break;
+      case s_one_minus_constant_alpha:
+        SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );
+          break;
+    }
+  }
+
+  /* Make the fallback for the Destination blend. */
+  for( index = 0; index < 14; index++ )
+  {
+    switch( index )
+    {
+      case d_zero:
+        DSTBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );
+          break;
+      case d_one:
+        DSTBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );
+          break;
+      case d_src_color:
+        DSTBLEND_MAP( GL_SRC_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );
+          break;
+      case d_one_minus_src_color:
+        DSTBLEND_MAP( GL_ONE_MINUS_SRC_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );
+          break;
+      case d_src_alpha:
+        DSTBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );
+          break;
+      case d_one_minus_src_alpha:
+        DSTBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );
+          break;
+      case d_dst_alpha:
+        DSTBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );
+          break;
+      case d_one_minus_dst_alpha:
+        DSTBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );
+          break;
+      case d_constant_color:
+        DSTBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );
+          break;
+      case d_one_minus_constant_color:
+        DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );
+          break;
+      case d_constant_alpha:
+        DSTBLEND_MAP( GL_CONSTANT_ALPHAR, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );
+          break;
+      case d_one_minus_constant_alpha:
+        DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );
+          break;
+    }
+  }
+
+  /* Make the fallbacks for the texture functions. */
+  for( index = 0; index < 4; index++ )
+  {
+    switch( index )
+    {
+      case d3dtblend_decal:
+          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
+          {
+               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_DECAL" )); 
+               pShared->dwTexFunc[index] = D3DTBLEND_DECAL; 
+          }
+        else
+          {
+               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_MODULATE" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_MODULATE; 
+               }
+               else
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_ADD" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; 
+               }
+          }
+          break;
+      case d3dtblend_decalalpha:
+          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECALALPHA )
+          {
+               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_DECALALPHA" )); 
+               pShared->dwTexFunc[index] = D3DTBLEND_DECALALPHA; 
+          }
+        else
+          {
+               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPA -> D3DTBLEND_DECAL" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_DECAL; 
+               }
+               else
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_ADD" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; 
+               }
+          }
+          break;
+    case d3dtblend_modulate:
+          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
+          {
+               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATE" )); 
+               pShared->dwTexFunc[index] = D3DTBLEND_MODULATE; 
+          }
+        else
+          {
+               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATEALPHA" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA; 
+               }
+               else    if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_DECAL" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_DECAL; 
+               }
+               else
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_ADD" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; 
+               }
+          }
+          break;
+    case d3dtblend_modulatealpha:
+          if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )
+          {
+               DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATEALPHA" )); 
+               pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA; 
+          }
+        else
+          {
+               if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATE" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;
+               }
+               else    if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_DECALE" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_DECAL; 
+               }
+               else
+               {
+                 DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_ADD" )); 
+                 pShared->dwTexFunc[index] = D3DTBLEND_ADD; 
+               }
+          }
+          break;
+    }
+  }
+}
+
index 5295520d7be025dba3f9e3819c012bf51faf23b6..2496d164e5cbc0e21f083ea84b81d9647dddafcc 100644 (file)
@@ -1,68 +1,68 @@
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#ifndef _D3D_HAL_INC\r
-#define _D3D_HAL_INC\r
-   \r
-/*===========================================================================*/\r
-/* Includes.                                                                 */\r
-/*===========================================================================*/\r
-#include <windows.h>\r
-#include <ddraw.h>\r
-#include <d3d.h>\r
-#include <stdlib.h>\r
-#include <time.h>\r
-#include "D3DShared.h"\r
-#include "D3DTextureMgr.h"\r
-#include "Debug.h"\r
-/*===========================================================================*/\r
-/* Defines.                                                                  */\r
-/*===========================================================================*/\r
-#define        DX_RESTORE(ps)                  if ( (ps) && (ps)->IsLost() ) (ps)->Restore();\r
-/*===========================================================================*/\r
-/* Type defines.                                                             */\r
-/*===========================================================================*/\r
-typedef struct _d3d_hal_struct\r
-{\r
-  MESAD3DSHARED                shared;\r
-\r
-  GUID                         guid;\r
-  LPDIRECTDRAW                 lpDD;\r
-  LPDIRECTDRAW4                lpDD4;\r
-  LPDIRECT3D3                  lpD3D3;\r
-  LPDIRECT3DDEVICE3            lpD3DDevice;\r
-  D3DDEVICEDESC                D3DHWDevDesc;\r
-  LPDIRECTDRAWSURFACE4         lpDDSPrimary,\r
-                         lpDDSRender,\r
-                         lpDDSZbuffer;\r
-  LPDIRECT3DVIEWPORT3          lpViewport;\r
-  LPDIRECTDRAWCLIPPER  lpClipper;\r
-  DDPIXELFORMAT                ddpf,\r
-                         ddpfZBuffer;\r
-  PTM_OBJECT                   pTMList;\r
-\r
-} MESAD3DHAL, *PMESAD3DHAL;\r
-/*===========================================================================*/\r
-/* External function prototypes.                                             */\r
-/*===========================================================================*/\r
-extern BOOL InitTMgrHAL( PMESAD3DHAL pHAL );\r
-extern void TermTMgrHAL( PMESAD3DHAL pHAL );\r
-extern void AlphaBlendTableHAL( PMESAD3DHAL pHAL );\r
-\r
-extern void Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel );\r
-extern char *ErrorStringD3D( HRESULT hr );\r
-extern void  FatalShutDown( PMESAD3DHAL pHAL );\r
-/*===========================================================================*/\r
-/* Global variables.                                                         */\r
-/*===========================================================================*/\r
-extern char    *errorMsg;\r
-\r
-#endif\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#ifndef _D3D_HAL_INC
+#define _D3D_HAL_INC
+   
+/*===========================================================================*/
+/* Includes.                                                                 */
+/*===========================================================================*/
+#include <windows.h>
+#include <ddraw.h>
+#include <d3d.h>
+#include <stdlib.h>
+#include <time.h>
+#include "D3DShared.h"
+#include "D3DTextureMgr.h"
+#include "Debug.h"
+/*===========================================================================*/
+/* Defines.                                                                  */
+/*===========================================================================*/
+#define        DX_RESTORE(ps)                  if ( (ps) && (ps)->IsLost() ) (ps)->Restore();
+/*===========================================================================*/
+/* Type defines.                                                             */
+/*===========================================================================*/
+typedef struct _d3d_hal_struct
+{
+  MESAD3DSHARED                shared;
+
+  GUID                         guid;
+  LPDIRECTDRAW                 lpDD;
+  LPDIRECTDRAW4                lpDD4;
+  LPDIRECT3D3                  lpD3D3;
+  LPDIRECT3DDEVICE3            lpD3DDevice;
+  D3DDEVICEDESC                D3DHWDevDesc;
+  LPDIRECTDRAWSURFACE4         lpDDSPrimary,
+                         lpDDSRender,
+                         lpDDSZbuffer;
+  LPDIRECT3DVIEWPORT3          lpViewport;
+  LPDIRECTDRAWCLIPPER  lpClipper;
+  DDPIXELFORMAT                ddpf,
+                         ddpfZBuffer;
+  PTM_OBJECT                   pTMList;
+
+} MESAD3DHAL, *PMESAD3DHAL;
+/*===========================================================================*/
+/* External function prototypes.                                             */
+/*===========================================================================*/
+extern BOOL InitTMgrHAL( PMESAD3DHAL pHAL );
+extern void TermTMgrHAL( PMESAD3DHAL pHAL );
+extern void AlphaBlendTableHAL( PMESAD3DHAL pHAL );
+
+extern void Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel );
+extern char *ErrorStringD3D( HRESULT hr );
+extern void  FatalShutDown( PMESAD3DHAL pHAL );
+/*===========================================================================*/
+/* Global variables.                                                         */
+/*===========================================================================*/
+extern char    *errorMsg;
+
+#endif
+
index ba7891612e4965620fc9c3c8f27f3546ccc99c14..e21cd21e25000a7ba1d607f24e58da9cc12a03b9 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                       Build 5   */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "D3DHAL.h"\r
-/*===========================================================================*/\r
-/* Local function prototypes.                                                */\r
-/*===========================================================================*/\r
-static void    DestroyAllSurfaces( PMESAD3DHAL pHAL );\r
-static void    DestroyDevice( PMESAD3DHAL pHAL );\r
-static void    DestroyInterfaces( PMESAD3DHAL pHAL );\r
-\r
-HRESULT WINAPI   EnumSurfacesHook( LPDIRECTDRAWSURFACE4 lpDDS, LPDDSURFACEDESC2 lpDDSDesc, LPVOID pVoid );\r
-HRESULT CALLBACK EnumZBufferHook( DDPIXELFORMAT* pddpf, VOID *pVoid );\r
-HRESULT CALLBACK EnumDeviceHook( GUID FAR* lpGuid, LPSTR lpDesc, LPSTR lpName, LPD3DDEVICEDESC lpD3DHWDesc, LPD3DDEVICEDESC lpD3DHELDesc,  void *pVoid );\r
-/*===========================================================================*/\r
-/* Globals.                                                                  */\r
-/*===========================================================================*/\r
-//char         *errorMsg;\r
-/*===========================================================================*/\r
-/*  This function is responable for allocating the actual MESAD3DHAL struct. */\r
-/* Each Mesa context will have its own MESAD3DHAL struct so its like a mini  */\r
-/* context to some extent. All one time allocations/operations get done here.*/\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-extern "C" PMESAD3DSHARED InitHAL( HWND hwnd )\r
-{\r
-  PMESAD3DHAL  pHAL;\r
-  ULONG        rc;\r
-\r
-  DPF(( DBG_FUNC, "InitHAL();" ));\r
-  DPF(( DBG_CNTX_INFO, "hwnd: %d", hwnd ));\r
-\r
-  /* Allocate the structure and zero it out. */   \r
-  pHAL = (PMESAD3DHAL)ALLOC( sizeof(MESAD3DHAL) );\r
-  if ( pHAL == NULL )\r
-  {   \r
-    RIP( pHAL, "InitHAL->", "Memory Allocation" );\r
-    return (PMESAD3DSHARED)NULL;\r
-  }\r
-  memset( pHAL, 0, sizeof(MESAD3DHAL) );\r
-\r
-  /* Get the texture manager going. */\r
-  rc = InitTMgrHAL( pHAL );\r
-  if ( rc == FALSE )\r
-  {   \r
-    RIP( pHAL, "InitTMgrHAL->", "Failed" );\r
-    return (PMESAD3DSHARED)NULL;\r
-  }\r
-\r
-  /* Fill in the window parameters if we can. */\r
-  pHAL->shared.hwnd = hwnd;\r
-\r
-  /* Parse the user's enviroment variables to generate a debug mask. */\r
-  ReadDBGEnv();\r
-  \r
-  return (PMESAD3DSHARED)pHAL;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will unload all the resources that the MESAD3DHAL struct   */\r
-/* has bound to it.  The actual structure itself will be freed.              */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void TermHAL( PMESAD3DSHARED pShared )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-\r
-  DPF(( DBG_FUNC, "TermHAL();" ));\r
-\r
-  /* Check for an empty wrapper structure. */\r
-  if ( pHAL == NULL )\r
-    return;\r
-\r
-  /* Kill this texture manager. */\r
-  TermTMgrHAL( pHAL );\r
-\r
-  /* Kill any DDraw stuff if exists. */\r
-  DestroyDevice( pHAL );\r
-  DestroyAllSurfaces( pHAL );\r
-  DestroyInterfaces( pHAL );\r
-\r
-  FREE( pHAL );\r
-}\r
-/*===========================================================================*/\r
-/*  This function is used to init and resize the rendering surface as the two*/\r
-/* are almost the same.  First the device and all the surfaces are destoryed */\r
-/* if they already exist.  Next we create a OffScreen rendering surface and  */\r
-/* save some pixelformat info to do color convertions. Next we start to take */\r
-/* care of getting the most out of the hardware. I use bHardware to determine*/\r
-/* the state of the device we found in the device enumeration.  The enum proc*/\r
-/* will try for hardware first.  I next use a bForceSW to make the enum proc */\r
-/* choose a software device.  So I will try some combinations with HW first  */\r
-/* until I feel I have to set the bForceSW and call this function again.  If */\r
-/* this function is called with no width or height then use the internals.   */\r
-/*   NOTE:  The worst case is that all will be in SW (RGBDevice) and really  */\r
-/*         I should forget the whole thing and fall back to a DDraw span type*/\r
-/*         rendering but what is the point.  This way I always know I have a */\r
-/*         D3DDevice and that makes things easier.  I do impliment the span  */\r
-/*         rendering function for stuff that I haven't done support for such */\r
-/*         as points and lines.                                              */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE                                                       */\r
-/*===========================================================================*/\r
-extern "C" BOOL        CreateHAL( PMESAD3DSHARED pShared )\r
-{\r
-  PMESAD3DHAL          pHAL = (PMESAD3DHAL)pShared;\r
-  DDSURFACEDESC2       ddsd2;\r
-  D3DDEVICEDESC        D3DSWDevDesc;\r
-  DDSCAPS2             ddscaps;\r
-  DWORD                dwCoopFlags,\r
-                    dwWidth,\r
-                    dwHeight;\r
-  ULONG                rc;\r
-\r
-  DPF(( DBG_FUNC, "CreateHAL();" ));\r
-\r
-#define InitDDSD2(f)      memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); \\r
-                          ddsd2.dwSize  = sizeof( DDSURFACEDESC2 ); \\r
-                          ddsd2.dwFlags = f;\r
-\r
-  if ( pHAL == NULL )\r
-    return FALSE;\r
-\r
-  /* Use the internal rectangle struct. */\r
-  dwWidth  = pShared->rectW.right - pShared->rectW.left;\r
-  dwHeight = pShared->rectW.bottom - pShared->rectW.top;\r
-\r
-  DPF(( DBG_CNTX_INFO, "Width: %d Height: %d", dwWidth, dwHeight ));\r
-\r
-  /* The dimensions might still be the same so just leave. */\r
-  if ( (dwWidth == pShared->dwWidth) && (dwHeight == pShared->dwHeight) )\r
-  {\r
-    DPF(( DBG_CNTX_WARN, "Context size hasn't changed" ));\r
-    return TRUE;\r
-  }\r
-\r
-  /* If one of the dimensions are zero then leave. WM_SIZE should get us back here. */\r
-  if ( (dwWidth == 0) || (dwHeight == 0) )\r
-    return TRUE;\r
-\r
-  /* Save the renders dimensions. */\r
-  pShared->dwWidth  = dwWidth;\r
-  pShared->dwHeight = dwHeight;\r
-\r
-  DPF(( DBG_CNTX_INFO, "Creating Context:\n cx:%d cy:%d", pShared->dwWidth, pShared->dwHeight ));\r
-\r
-  /*=================================*/\r
-  /* Create all required interfaces. */\r
-  /*=================================*/\r
-\r
-  /* Kill any DDraw stuff if exists. */\r
-  DestroyDevice( pHAL );\r
-  DestroyAllSurfaces( pHAL );\r
-  DestroyInterfaces( pHAL );\r
-\r
-  /* Create a instance of DDraw using the Primary display driver. */\r
-  rc = DirectDrawCreate( NULL, &pHAL->lpDD, NULL );\r
-  if( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "DirectDrawCreate->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Get the DDraw4 interface. */\r
-  rc = pHAL->lpDD->QueryInterface( IID_IDirectDraw4, (void **)&pHAL->lpDD4 );\r
-  if( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "QueryInterface (IID_IDirectDraw4) ->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Get the Direct3D3 interface. */\r
-  rc = pHAL->lpDD4->QueryInterface( IID_IDirect3D3, (void **)&pHAL->lpD3D3 );\r
-  if( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "QueryInterface (IID_IDirect3D3) ->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Set the Cooperative level. NOTE: we need to know if we are FS at this point.*/\r
-  dwCoopFlags = (pShared->bWindow == TRUE) ? DDSCL_NORMAL : (DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);\r
-  rc = pHAL->lpDD4->SetCooperativeLevel( pShared->hwnd, dwCoopFlags );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "SetCooperativeLevel->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /*==================================================================*/\r
-  /* Get the best device we can and note whether its hardware or not. */\r
-  /*==================================================================*/\r
-  pShared->bForceSW = FALSE;\r
-  pHAL->lpD3D3->EnumDevices( EnumDeviceHook, (void *)pHAL );\r
-  pShared->bHardware = IsEqualIID( pHAL->guid, IID_IDirect3DHALDevice );\r
-  DPF(( DBG_CNTX_INFO, "bHardware: %s", (pShared->bHardware) ? "TRUE" : "FALSE" ));\r
-  DPF(( DBG_CNTX_INFO, "bWindowed: %s", (pShared->bWindow) ? "TRUE" : "FALSE" ));\r
-\r
-  /*========================================================================*/\r
-  /* HARDWARE was found.                                                    */\r
-  /*========================================================================*/\r
-  if ( pShared->bHardware == TRUE )\r
-  {\r
-    /*===================================*/\r
-    /* HARDWARE -> Z-BUFFER.             */\r
-    /*===================================*/\r
-\r
-    /* Get a Z-Buffer pixelformat. */\r
-    memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );\r
-    ddsd2.dwSize = sizeof( DDSURFACEDESC2 );\r
-    rc = pHAL->lpD3D3->EnumZBufferFormats( pHAL->guid, EnumZBufferHook, (VOID*)&ddsd2.ddpfPixelFormat );\r
-    if ( FAILED(rc) )\r
-    {\r
-        RIP( pHAL, "EnumZBufferFormatsl->", ErrorStringD3D(rc) );\r
-        return FALSE;\r
-    }\r
-        \r
-    /* Setup our request structure for the Z-buffer surface. */\r
-    ddsd2.dwFlags        = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;\r
-    ddsd2.ddsCaps.dwCaps = DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY;\r
-    ddsd2.dwWidth        = dwWidth;\r
-    ddsd2.dwHeight       = dwHeight;\r
-    rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSZbuffer, NULL );\r
-    if ( !FAILED(rc) )\r
-    {\r
-        DPF(( DBG_CNTX_INFO, "HW ZBuffer" ));\r
-\r
-        /*===================================*/\r
-        /* HARDWARE -> Z-BUFFER -> FLIPABLE  */\r
-        /*===================================*/\r
-        if ( pShared->bWindow == FALSE )\r
-        {\r
-          InitDDSD2( DDSD_CAPS | DDSD_BACKBUFFERCOUNT );\r
-          ddsd2.dwBackBufferCount = 1;\r
-          ddsd2.ddsCaps.dwCaps    = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;\r
-          rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );\r
-          if ( FAILED(rc) )\r
-          {    \r
-               /* Make sure we try the next fall back. */\r
-               DPF(( DBG_CNTX_WARN, "HW Flip/Complex not available" ));\r
-               pHAL->lpDDSPrimary = NULL;\r
-          }\r
-          else\r
-          {\r
-               /* Get the back buffer that was created. */\r
-               ddscaps.dwCaps = DDSCAPS_BACKBUFFER;\r
-               rc = pHAL->lpDDSPrimary->GetAttachedSurface( &ddscaps, &pHAL->lpDDSRender );\r
-               if ( FAILED(rc) )\r
-               {       \r
-                 DPF(( DBG_CNTX_WARN, "GetAttachedSurface failed -> HW Flip/Complex" ));\r
-                 \r
-                 /* Make sure we try the next fall back. */\r
-                 pHAL->lpDDSPrimary->Release();\r
-                 pHAL->lpDDSPrimary = NULL;\r
-               }       \r
-               else\r
-               {\r
-                 /*  I have had problems when a complex surface comes back  */\r
-                 /* with the back buffer being created in SW.  Not sure why */\r
-                 /* or how this is possable but I'm checking for it here.   */\r
-                 memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); \r
-                 ddsd2.dwSize = sizeof( DDSURFACEDESC2 );\r
-                 DX_RESTORE( pHAL->lpDDSRender );\r
-                 rc = pHAL->lpDDSRender->GetSurfaceDesc( &ddsd2 );\r
-                 if ( FAILED(rc) )\r
-                 {\r
-                   RIP( pHAL, "GetSurfaceDesc (RENDER) ->", ErrorStringD3D(rc) );\r
-                   return FALSE;\r
-                 }\r
-\r
-                 /* If the surface is in VID then we are happy with are Flipable. */\r
-                 if ( ddsd2.ddsCaps.dwCaps & DDSCAPS_LOCALVIDMEM )\r
-                 {\r
-                   pShared->bFlipable = TRUE;\r
-                   DPF(( DBG_CNTX_INFO, "HW Flip/Complex!" ));\r
-                 }\r
-                 else\r
-                 {\r
-                   /* Kill this setup. */\r
-                   pHAL->lpDDSPrimary->Release();\r
-                   pHAL->lpDDSPrimary = NULL;\r
-                 }\r
-               }\r
-          }\r
-        }\r
-\r
-        /*===================================*/\r
-        /* HARDWARE -> Z-BUFFER -> BLT       */\r
-        /*===================================*/\r
-        if ( pHAL->lpDDSPrimary == NULL )\r
-        {\r
-          pShared->bFlipable = FALSE;\r
-\r
-          /* Create the Primary (front buffer). */\r
-          InitDDSD2( DDSD_CAPS );\r
-          ddsd2.ddsCaps.dwCaps  = DDSCAPS_PRIMARYSURFACE;\r
-          rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );\r
-          if ( FAILED(rc) )\r
-          {\r
-               /* This is an error as we should be able to do this at minimum. */\r
-               RIP( pHAL, "CreateSurface (PRIMARY) ->", ErrorStringD3D(rc) );\r
-               return FALSE;\r
-          }\r
-\r
-          /* Create the Render (back buffer). */\r
-          InitDDSD2( DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT );\r
-          ddsd2.dwWidth            = dwWidth;\r
-          ddsd2.dwHeight           = dwHeight;\r
-          ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;\r
-          rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSRender, NULL );\r
-          if ( FAILED(rc) )\r
-          {\r
-               DPF(( DBG_CNTX_WARN, "Failed HW Offscreen surface" ));\r
-\r
-               /* Make sure we try the next fall back. */\r
-               pHAL->lpDDSPrimary->Release();\r
-               pHAL->lpDDSPrimary = NULL;\r
-          }\r
-          else\r
-          {\r
-               /*  Might as well check here too see if this surface is in */\r
-               /* hardware.  If nothing else just to be consistant.       */\r
-               memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); \r
-               ddsd2.dwSize = sizeof( DDSURFACEDESC2 );\r
-               DX_RESTORE( pHAL->lpDDSRender );\r
-               rc = pHAL->lpDDSRender->GetSurfaceDesc( &ddsd2 );\r
-               if ( FAILED(rc) )\r
-               {\r
-                 RIP( pHAL, "GetSurfaceDesc (RENDER) ->", ErrorStringD3D(rc) );\r
-                 return FALSE;\r
-               }\r
-\r
-               /* If the surface is in VID then we are happy. */\r
-               if ( ddsd2.ddsCaps.dwCaps & DDSCAPS_LOCALVIDMEM )\r
-               {\r
-                 /*  Create a clipper object so that DDraw will be able to blt windows that */\r
-                 /* have been clipped by the screen or other windows.                       */\r
-                 pHAL->lpDD4->CreateClipper( 0, &pHAL->lpClipper, NULL );\r
-                 pHAL->lpClipper->SetHWnd( 0, pShared->hwnd );\r
-                 pHAL->lpDDSPrimary->SetClipper( pHAL->lpClipper );\r
-                 pHAL->lpClipper->Release();\r
-                 DPF(( DBG_CNTX_INFO, "HW RENDER surface" ));\r
-               }\r
-               else\r
-               {\r
-                 /* Kill this setup. */\r
-                 pHAL->lpDDSRender->Release();\r
-                 pHAL->lpDDSRender = NULL;\r
-                 pHAL->lpDDSPrimary->Release();\r
-                 pHAL->lpDDSPrimary = NULL;\r
-               }\r
-          }\r
-        }      \r
-\r
-        /*===================================*/\r
-        /* Create D3DDEVICE -> HARDWARE.     */\r
-        /*===================================*/\r
-        if ( pHAL->lpDDSZbuffer && pHAL->lpDDSPrimary && pHAL->lpDDSRender )\r
-        {\r
-          DX_RESTORE( pHAL->lpDDSRender );\r
-          DX_RESTORE( pHAL->lpDDSZbuffer );\r
-\r
-          rc = pHAL->lpDDSRender->AddAttachedSurface( pHAL->lpDDSZbuffer );\r
-          if ( FAILED(rc) )\r
-          {\r
-               RIP( pHAL, "AddAttachedSurface (ZBUFFER) ->", ErrorStringD3D(rc) );\r
-               return FALSE;\r
-          }\r
-\r
-          rc = pHAL->lpD3D3->CreateDevice( IID_IDirect3DHALDevice, pHAL->lpDDSRender, &pHAL->lpD3DDevice, NULL );\r
-          if ( rc != D3D_OK )\r
-          {\r
-               DPF(( DBG_CNTX_WARN, "Failed HW Device" ));\r
-               pHAL->lpD3DDevice = NULL;\r
-          }\r
-          else\r
-          {\r
-               DPF(( DBG_CNTX_INFO, "HW Device" ));\r
-          }\r
-        }\r
-    }  \r
-  }\r
-      \r
-  /*========================================================================*/\r
-  /* SOFTWARE fallback.                                                     */\r
-  /*========================================================================*/\r
-  if ( pHAL->lpD3DDevice == NULL )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "SW fallback :(" ));\r
-\r
-    /* Make sure we have no surfaces allocated.  Just incase. */\r
-    DestroyAllSurfaces( pHAL );\r
-\r
-    /* Get a software device. */\r
-    pShared->bFlipable = FALSE;\r
-    pShared->bForceSW = TRUE;\r
-    pHAL->lpD3D3->EnumDevices( EnumDeviceHook, (void *)pHAL );\r
-    pShared->bHardware = IsEqualIID( pHAL->guid, IID_IDirect3DHALDevice );\r
-\r
-     /*===================================*/\r
-    /* SOFTWARE -> Z-BUFFER.             */\r
-    /*===================================*/\r
-\r
-    /*===================================*/\r
-    /* SOFTWARE -> Z-BUFFER -> FLIPABLE  */\r
-    /*===================================*/\r
-    if ( pShared->bWindow == FALSE )\r
-    {\r
-        InitDDSD2( DDSD_CAPS | DDSD_BACKBUFFERCOUNT );\r
-        ddsd2.dwBackBufferCount = 1;\r
-        ddsd2.ddsCaps.dwCaps    = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;\r
-        ddsd2.ddpfPixelFormat.dwSize  = sizeof( DDPIXELFORMAT );\r
-        ddsd2.ddpfPixelFormat.dwFlags = (DDPF_RGB | DDPF_ALPHAPIXELS);\r
-        rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );\r
-        if ( FAILED(rc) )\r
-        {      \r
-          DPF(( DBG_CNTX_WARN, "Failed SW Flip/Complex" ));\r
-\r
-          /* Make sure we try the next fall back. */\r
-          pHAL->lpDDSPrimary = NULL;\r
-        }\r
-        else\r
-        {\r
-          ddscaps.dwCaps = DDSCAPS_BACKBUFFER;\r
-          rc = pHAL->lpDDSPrimary->GetAttachedSurface( &ddscaps, &pHAL->lpDDSRender );\r
-          if ( FAILED(rc) )\r
-          {    \r
-               /* Make sure we try the next fall back. */\r
-               DPF(( DBG_CNTX_WARN, "GetAttachedSurface failed -> SW Flip/Complex" ));\r
-               pHAL->lpDDSPrimary->Release();\r
-               pHAL->lpDDSPrimary = NULL;\r
-          }    \r
-          else\r
-          {\r
-               DPF(( DBG_CNTX_INFO, "SW Flip/Complex" ));\r
-               pShared->bFlipable = TRUE;\r
-          }\r
-        }\r
-    }          \r
-\r
-    /*===================================*/\r
-    /* SOFTWARE -> Z-BUFFER -> BLT       */\r
-    /*===================================*/\r
-    if ( pHAL->lpDDSPrimary == NULL )\r
-    {\r
-        /* Create the Primary (front buffer). */\r
-        InitDDSD2( DDSD_CAPS );\r
-        ddsd2.ddsCaps.dwCaps  = DDSCAPS_PRIMARYSURFACE;\r
-        rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );\r
-        if ( FAILED(rc) )\r
-        {\r
-          /* This is an error as we should be able to do this at minimum. */\r
-          RIP( pHAL, "CreateSurface (PRIMARY) ->", ErrorStringD3D(rc) );\r
-          return FALSE;\r
-        }\r
-\r
-        /* Create the Render (back buffer). */\r
-        InitDDSD2( DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT );\r
-        ddsd2.dwWidth                                  = dwWidth;\r
-        ddsd2.dwHeight                         = dwHeight;\r
-        ddsd2.ddsCaps.dwCaps                   = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;\r
-        ddsd2.ddpfPixelFormat.dwSize   = sizeof( DDPIXELFORMAT );\r
-        ddsd2.ddpfPixelFormat.dwFlags  = (DDPF_RGB | DDPF_ALPHAPIXELS);\r
-        rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSRender, NULL );\r
-        if ( FAILED(rc) )\r
-        {\r
-          /* That was our last hope. */\r
-          RIP( pHAL, "CreateSurface (RENDER) ->", ErrorStringD3D(rc) );\r
-          return FALSE;\r
-        }\r
-        else\r
-        {\r
-          DPF(( DBG_CNTX_INFO, "SW RENDER surface" ));\r
-\r
-          /*  Create a clipper object so that DDraw will be able to blt windows that */\r
-          /* have been clipped by the screen or other windows.                       */\r
-          pHAL->lpDD4->CreateClipper( 0, &pHAL->lpClipper, NULL );\r
-          pHAL->lpClipper->SetHWnd( 0, pShared->hwnd );\r
-          pHAL->lpDDSPrimary->SetClipper( pHAL->lpClipper );\r
-          pHAL->lpClipper->Release();\r
-        }\r
-    }          \r
-       \r
-    /*===================================*/\r
-    /* Create D3DDEVICE -> SOFTWARE.     */\r
-    /*===================================*/\r
-    if ( pHAL->lpDDSPrimary && pHAL->lpDDSRender )\r
-    {\r
-        DX_RESTORE( pHAL->lpDDSRender );\r
-        rc = pHAL->lpD3D3->CreateDevice( IID_IDirect3DRGBDevice, pHAL->lpDDSRender, &pHAL->lpD3DDevice, NULL );\r
-        if ( rc != D3D_OK )\r
-        {\r
-          /* That was our last hope. */\r
-          RIP( pHAL, "CreateDevice (IID_IDirect3DRGBDevice) ->", ErrorStringD3D(rc) );\r
-          return FALSE;\r
-        }\r
-        \r
-        DPF(( DBG_CNTX_INFO, "SW Device" ));\r
-    }  \r
-  }\r
-\r
-  /*==============================================================================*/\r
-  /* Get a copy of the render pixelformat so that wgl.c can call GetPixelInfoD3D. */\r
-  /*==============================================================================*/\r
-  memset( &pHAL->ddpf, 0, sizeof(DDPIXELFORMAT) );\r
-  pHAL->ddpf.dwSize = sizeof( DDPIXELFORMAT );\r
-  rc = pHAL->lpDDSRender->GetPixelFormat( &pHAL->ddpf );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "GetPixelFormat ->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-  DebugPixelFormat( "Using OFFSCREEN", &pHAL->ddpf );\r
-  DebugPixelFormat( "Using ZBUFFER", &ddsd2.ddpfPixelFormat );\r
-\r
-  /* Get a copy of what the D3DDevice supports for later use. */\r
-  memset( &D3DSWDevDesc, 0, sizeof(D3DDEVICEDESC) );\r
-  memset( &pHAL->D3DHWDevDesc, 0, sizeof(D3DDEVICEDESC) );\r
-  D3DSWDevDesc.dwSize       = sizeof( D3DDEVICEDESC );\r
-  pHAL->D3DHWDevDesc.dwSize = sizeof( D3DDEVICEDESC );\r
-  rc = pHAL->lpD3DDevice->GetCaps( &pHAL->D3DHWDevDesc, &D3DSWDevDesc );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "GetCaps ->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Get a copy of the pixel convertion stuff for direct buffer access. */\r
-  Solve8BitChannelPixelFormat( &pHAL->ddpf, &pShared->pixel );\r
-  AlphaBlendTableHAL( pHAL );\r
-\r
-  /* We must prime the Begin/End scene for SwapBuffers to work. */\r
-  rc = pHAL->lpD3DDevice->BeginScene();   \r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-#undef InitDDSD2\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will make sure a viewport is created and set for the device*/\r
-/* in the supplied structure.  If a rect is supplied then it will be used for*/\r
-/* the viewport otherwise the current setting in the strucute will be used.  */\r
-/* Note that the rect is relative to the window.  So left/top must be 0,0 to */\r
-/* use the whole window else there is scissoring going down.                 */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-extern "C" BOOL SetViewportHAL( PMESAD3DSHARED pShared, RECT *pRect, float minZ, float maxZ  )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-  D3DVIEWPORT2 vdData;\r
-  ULONG                rc;\r
-  POINT                pt;\r
-\r
-  DPF(( DBG_FUNC, "SetViewportHAL();" ));\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( !pHAL || !pHAL->lpDDSPrimary || !pHAL->lpD3DDevice )\r
-  {\r
-    DPF(( DBG_CNTX_WARN, "SetViewport() -> NULL Pointer" ));\r
-    return FALSE;\r
-  }\r
-\r
-  /* TODO: this is just a temp fix to stop redundant changes. */\r
-  if ( pRect &&\r
-         (pShared->rectV.left   == pRect->left)    &&\r
-         (pShared->rectV.right  == pRect->right)   &&\r
-         (pShared->rectV.top    == pRect->top)     &&\r
-         (pShared->rectV.bottom == pRect->bottom) )\r
-  {\r
-    DPF(( DBG_CNTX_WARN, "Redundant viewport" ));\r
-    return TRUE;\r
-  }\r
-\r
-  DPF(( DBG_CNTX_INFO, "Current Viewport:" ));\r
-  DPF(( DBG_CNTX_INFO, "x: %d y: %d", pShared->rectV.left, pShared->rectV.top ));\r
-  DPF(( DBG_CNTX_INFO, "cx: %d cy: %d", (pShared->rectV.right-pShared->rectV.left), (pShared->rectV.bottom-pShared->rectV.top) ));\r
-  DPF(( DBG_CNTX_INFO, "New Viewport:" ));\r
-  DPF(( DBG_CNTX_INFO, "x: %d y: %d", pRect->left, pRect->top ));\r
-  DPF(( DBG_CNTX_INFO, "cx: %d cy: %d", (pRect->right-pRect->left), (pRect->bottom-pRect->top) ));\r
-\r
-  /* Update the current viewport rect if one is supplied. */\r
-  if ( pRect )      \r
-    memcpy( &pShared->rectV, pRect, sizeof(RECT) );\r
-        \r
-  /* Build the request structure. */\r
-  memset( &vdData, 0, sizeof(D3DVIEWPORT2) );\r
-  vdData.dwSize   = sizeof(D3DVIEWPORT2);  \r
-  vdData.dwX      = pShared->rectV.left;\r
-  vdData.dwY      = pShared->rectV.top;\r
-  vdData.dwWidth  = (pShared->rectV.right - pShared->rectV.left);\r
-  vdData.dwHeight = (pShared->rectV.bottom - pShared->rectV.top);\r
-\r
-  if ( !vdData.dwWidth || !vdData.dwHeight )\r
-  {\r
-    GetClientRect( pShared->hwnd, &pShared->rectW );\r
-    pt.x = pt.y = 0;\r
-    ClientToScreen( pShared->hwnd, &pt );\r
-    OffsetRect( &pShared->rectW, pt.x, pt.y);\r
-    vdData.dwX      = pShared->rectW.left;\r
-    vdData.dwY      = pShared->rectW.top;\r
-    vdData.dwWidth  = (pShared->rectW.right - pShared->rectW.left);\r
-    vdData.dwHeight = (pShared->rectW.bottom - pShared->rectW.top);\r
-    memcpy( &pShared->rectV, &pShared->rectW, sizeof(RECT) );\r
-  }\r
-\r
-  // The dvClipX, dvClipY, dvClipWidth, dvClipHeight, dvMinZ, \r
-  // and dvMaxZ members define the non-normalized post-perspective \r
-  // 3-D view volume which is visible to the viewer. In most cases, \r
-  // dvClipX is set to -1.0 and dvClipY is set to the inverse of \r
-  // the viewport's aspect ratio on the target surface, which can be \r
-  // calculated by dividing the dwHeight member by dwWidth. Similarly, \r
-  // the dvClipWidth member is typically 2.0 and dvClipHeight is set \r
-  // to twice the aspect ratio set in dwClipY. The dvMinZ and dvMaxZ \r
-  // are usually set to 0.0 and 1.0.\r
-  vdData.dvClipX      = -1.0f;\r
-  vdData.dvClipWidth  = 2.0f;\r
-  vdData.dvClipY      = 1.0f;\r
-  vdData.dvClipHeight = 2.0f;\r
-  vdData.dvMaxZ       = maxZ;\r
-  vdData.dvMinZ       = minZ;\r
-\r
-  DPF(( DBG_CNTX_INFO, "zMin: %f zMax: %f", minZ, maxZ ));\r
-\r
-  /*  I'm going to destroy the viewport everytime as when we size we will */\r
-  /* have a new D3DDevice.  As this area doesn't need to be fast...       */\r
-  if ( pHAL->lpViewport )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "DeleteViewport" ));\r
-\r
-    pHAL->lpD3DDevice->DeleteViewport( pHAL->lpViewport );\r
-    rc = pHAL->lpViewport->Release();\r
-    pHAL->lpViewport = NULL;\r
-  }\r
-\r
-  rc = pHAL->lpD3D3->CreateViewport( &pHAL->lpViewport, NULL );\r
-  if ( rc != D3D_OK )\r
-  {\r
-    DPF(( DBG_CNTX_ERROR, "CreateViewport Failed" ));\r
-    return FALSE;\r
-  }\r
-\r
-  /* Update the device with the new viewport. */\r
-  pHAL->lpD3DDevice->AddViewport( pHAL->lpViewport );\r
-  pHAL->lpViewport->SetViewport2( &vdData );\r
-  pHAL->lpD3DDevice->SetCurrentViewport( pHAL->lpViewport );\r
-\r
-  return TRUE; \r
-}\r
-/*===========================================================================*/\r
-/*                                                                           */\r
-/*                                                                           */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-HRESULT WINAPI EnumSurfacesHook( LPDIRECTDRAWSURFACE4 lpDDS, LPDDSURFACEDESC2 lpDDSDesc, LPVOID pVoid )\r
-{\r
-  DDSURFACEDESC2 *pddsd2 = (DDSURFACEDESC2 *)pVoid;\r
-\r
-  DPF(( DBG_FUNC, "EnumSurfacesHook();" ));\r
-\r
-  if ( (lpDDSDesc->ddpfPixelFormat.dwFlags == pddsd2->ddpfPixelFormat.dwFlags) && (lpDDSDesc->ddsCaps.dwCaps == pddsd2->ddsCaps.dwCaps) )\r
-  {\r
-    /* Save the pixelformat now so that we know we have one. */\r
-    memcpy( pddsd2, lpDDSDesc, sizeof(DDSURFACEDESC2) );\r
-\r
-    return D3DENUMRET_CANCEL;\r
-  }\r
-\r
-  return D3DENUMRET_OK;\r
-}\r
-/*===========================================================================*/\r
-/*  This is the callback proc to get a Z-Buffer.  Thats it.                  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-HRESULT CALLBACK  EnumZBufferHook( DDPIXELFORMAT* pddpf, VOID *pVoid )\r
-{\r
-  DDPIXELFORMAT  *pddpfChoice = (DDPIXELFORMAT *)pVoid;\r
-\r
-  DPF(( DBG_FUNC, "EnumZBufferHook();" ));\r
-\r
-  /* If this is ANY type of depth-buffer, stop. */\r
-  if( pddpf->dwFlags == DDPF_ZBUFFER )\r
-  {\r
-    /* Save the pixelformat now so that we know we have one. */\r
-    memcpy( pddpfChoice, pddpf, sizeof(DDPIXELFORMAT) );\r
-\r
-    /* I feel if the hardware supports this low then lets use it.  Could get ugly. */\r
-    if( pddpf->dwZBufferBitDepth >= 8 )\r
-    {\r
-        return D3DENUMRET_CANCEL;\r
-    }\r
-  }\r
\r
-   return D3DENUMRET_OK;\r
-}\r
-/*===========================================================================*/\r
-/*  This function handles the callback for the D3DDevice enumeration.  Good  */\r
-/* god who's idea was this?  The D3D wrapper has two variable related to what*/\r
-/* kind of device we want and have.  First we have a Bool that is set if we  */\r
-/* have allocated a HW device.  We always look for the HW device first.  The */\r
-/* other variable is used to force SW.  If we have run into a case that we   */\r
-/* want to fallback to SW then we set this.  We will fallback if we cannot   */\r
-/* texture in video memory (among others).                                   */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-HRESULT CALLBACK  EnumDeviceHook( GUID FAR* lpGuid, LPSTR lpDesc, LPSTR lpName, LPD3DDEVICEDESC lpD3DHWDesc, LPD3DDEVICEDESC lpD3DHELDesc,  void *pVoid )\r
-{\r
-  PMESAD3DHAL          pHAL = (PMESAD3DHAL)pVoid;\r
-  LPD3DDEVICEDESC   pChoice = lpD3DHWDesc;\r
-\r
-  DPF(( DBG_FUNC, "EnumDeviceHook();" ));\r
-\r
-  /* Determine if which device description is valid. */\r
-  if ( pChoice->dcmColorModel == 0 )\r
-    pChoice = lpD3DHELDesc;\r
-\r
-  /* Make sure we always have a GUID. */\r
-  memcpy( &pHAL->guid, lpGuid, sizeof(GUID) );\r
-\r
-  /* This controls whether we will except HW or not. */\r
-  if ( pHAL->shared.bForceSW == TRUE )\r
-  {\r
-    return (pChoice == lpD3DHELDesc) ? D3DENUMRET_CANCEL : D3DENUMRET_OK;\r
-  }\r
-\r
-  /* Always try for hardware. */\r
-  if ( pChoice == lpD3DHWDesc )\r
-  {\r
-    return D3DENUMRET_CANCEL;\r
-  }\r
-\r
-  return D3DENUMRET_OK;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will destroy any and all surfaces that this context has    */\r
-/* allocated.  If there is a clipper object then it will also be destoryed as*/\r
-/* it is part of the Primary Surface.                                        */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void DestroyAllSurfaces( PMESAD3DHAL pHAL )\r
-{\r
-  LONG refCount;\r
-\r
-  DPF(( DBG_FUNC, "DestroyAllSurfaces();" ));\r
-\r
-  DX_RESTORE( pHAL->lpDDSPrimary );\r
-  DX_RESTORE( pHAL->lpDDSRender );\r
-  DX_RESTORE( pHAL->lpDDSZbuffer);\r
-\r
-  if ( pHAL->lpDDSRender )\r
-  {\r
-    pHAL->lpDDSRender->Unlock( NULL );\r
-\r
-    /* If this isn't a Flipable surface then we must clean up the render. */\r
-    if ( pHAL->shared.bFlipable == FALSE)\r
-    {\r
-        if ( pHAL->lpDDSZbuffer )\r
-        {\r
-          DPF(( DBG_CNTX_INFO, "Remove attached surfaces from RENDER" ));\r
-          pHAL->lpDDSRender->DeleteAttachedSurface( 0, NULL );\r
-        }\r
-\r
-        DPF(( DBG_CNTX_INFO, "Release RENDER" ));\r
-        refCount = pHAL->lpDDSRender->Release();\r
-        pHAL->lpDDSRender = NULL;\r
-    }\r
-  }\r
-\r
-  if ( pHAL->lpDDSZbuffer )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "Release ZBuffer" ));\r
-    pHAL->lpDDSZbuffer->Unlock( NULL );\r
-    refCount = pHAL->lpDDSZbuffer->Release();\r
-    pHAL->lpDDSZbuffer = NULL;\r
-  }\r
-\r
-  if ( pHAL->lpClipper )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "Release Clipper" ));\r
-    refCount = pHAL->lpClipper->Release();\r
-    pHAL->lpClipper = NULL;\r
-  }\r
-\r
-  if ( pHAL->lpDDSPrimary )\r
-  {\r
-    pHAL->lpDDSPrimary->Unlock( NULL );\r
-\r
-    DPF(( DBG_CNTX_INFO, "Release PRIMARY" ));\r
-    refCount = pHAL->lpDDSPrimary->Release();\r
-    pHAL->lpDDSPrimary = NULL;\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This function will destroy the current D3DDevice and any resources that  */\r
-/* belong to it.                                                             */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void DestroyDevice( PMESAD3DHAL pHAL )\r
-{\r
-  LONG refCount;\r
-\r
-  DPF(( DBG_FUNC, "DestroyDevice();" ));\r
-\r
-  /* Kill the D3D stuff if exists. */\r
-  if ( pHAL->lpViewport )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "Delete Viewport" ));\r
-    pHAL->lpD3DDevice->DeleteViewport( pHAL->lpViewport );\r
-\r
-    DPF(( DBG_CNTX_INFO, "Release Viewport" ));\r
-    refCount = pHAL->lpViewport->Release();\r
-    pHAL->lpViewport = NULL;\r
-  }\r
-\r
-  if ( pHAL->lpD3DDevice != NULL )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "Release D3DDevice" ));\r
-    refCount = pHAL->lpD3DDevice->EndScene();  \r
-    refCount = pHAL->lpD3DDevice->Release();\r
-    pHAL->lpD3DDevice = NULL;\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This function will destroy the current D3DDevice and any resources that  */\r
-/* belong to it.                                                             */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void DestroyInterfaces( PMESAD3DHAL pHAL )\r
-{\r
-  LONG refCount;\r
-\r
-  DPF(( DBG_FUNC, "DestroyInterfaces();" ));\r
-\r
-  if ( pHAL->lpD3D3 != NULL )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "Release Direct3D3" ));\r
-    refCount = pHAL->lpD3D3->Release();\r
-    pHAL->lpD3D3 = NULL;\r
-  }\r
-\r
-  if ( pHAL->lpDD4 != NULL )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "Release DDraw4" ));\r
-    refCount = pHAL->lpDD4->Release();\r
-    pHAL->lpDD4 = NULL;\r
-  }\r
-\r
-  if ( pHAL->lpDD != NULL )\r
-  {\r
-    DPF(( DBG_CNTX_INFO, "Release DDraw" ));\r
-    refCount = pHAL->lpDD->Release();\r
-    pHAL->lpDD = NULL;\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This function will first send (not post) a message to the client window  */\r
-/* that this context is using.  The client will respond by unbinding itself  */\r
-/* and binding the 'default' context.  This allows the API to be supported   */\r
-/* until the window can be destroyed.  Finally we post the quit message to   */\r
-/* the client in hopes to end the application.                               */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void  FatalShutDown( PMESAD3DHAL pHAL )\r
-{\r
-  /* Whip this baby in too try and support the API until we die... */\r
-  if ( pHAL )\r
-    SendMessage( pHAL->shared.hwnd, UM_FATALSHUTDOWN, 0L, 0L );\r
-\r
-  /* Close the client application down. */\r
-  PostQuitMessage( 0 );\r
-}\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                       Build 5   */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "D3DHAL.h"
+/*===========================================================================*/
+/* Local function prototypes.                                                */
+/*===========================================================================*/
+static void    DestroyAllSurfaces( PMESAD3DHAL pHAL );
+static void    DestroyDevice( PMESAD3DHAL pHAL );
+static void    DestroyInterfaces( PMESAD3DHAL pHAL );
+
+HRESULT WINAPI   EnumSurfacesHook( LPDIRECTDRAWSURFACE4 lpDDS, LPDDSURFACEDESC2 lpDDSDesc, LPVOID pVoid );
+HRESULT CALLBACK EnumZBufferHook( DDPIXELFORMAT* pddpf, VOID *pVoid );
+HRESULT CALLBACK EnumDeviceHook( GUID FAR* lpGuid, LPSTR lpDesc, LPSTR lpName, LPD3DDEVICEDESC lpD3DHWDesc, LPD3DDEVICEDESC lpD3DHELDesc,  void *pVoid );
+/*===========================================================================*/
+/* Globals.                                                                  */
+/*===========================================================================*/
+//char         *errorMsg;
+/*===========================================================================*/
+/*  This function is responable for allocating the actual MESAD3DHAL struct. */
+/* Each Mesa context will have its own MESAD3DHAL struct so its like a mini  */
+/* context to some extent. All one time allocations/operations get done here.*/
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+extern "C" PMESAD3DSHARED InitHAL( HWND hwnd )
+{
+  PMESAD3DHAL  pHAL;
+  ULONG        rc;
+
+  DPF(( DBG_FUNC, "InitHAL();" ));
+  DPF(( DBG_CNTX_INFO, "hwnd: %d", hwnd ));
+
+  /* Allocate the structure and zero it out. */   
+  pHAL = (PMESAD3DHAL)ALLOC( sizeof(MESAD3DHAL) );
+  if ( pHAL == NULL )
+  {   
+    RIP( pHAL, "InitHAL->", "Memory Allocation" );
+    return (PMESAD3DSHARED)NULL;
+  }
+  memset( pHAL, 0, sizeof(MESAD3DHAL) );
+
+  /* Get the texture manager going. */
+  rc = InitTMgrHAL( pHAL );
+  if ( rc == FALSE )
+  {   
+    RIP( pHAL, "InitTMgrHAL->", "Failed" );
+    return (PMESAD3DSHARED)NULL;
+  }
+
+  /* Fill in the window parameters if we can. */
+  pHAL->shared.hwnd = hwnd;
+
+  /* Parse the user's enviroment variables to generate a debug mask. */
+  ReadDBGEnv();
+  
+  return (PMESAD3DSHARED)pHAL;
+}
+/*===========================================================================*/
+/*  This function will unload all the resources that the MESAD3DHAL struct   */
+/* has bound to it.  The actual structure itself will be freed.              */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void TermHAL( PMESAD3DSHARED pShared )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+
+  DPF(( DBG_FUNC, "TermHAL();" ));
+
+  /* Check for an empty wrapper structure. */
+  if ( pHAL == NULL )
+    return;
+
+  /* Kill this texture manager. */
+  TermTMgrHAL( pHAL );
+
+  /* Kill any DDraw stuff if exists. */
+  DestroyDevice( pHAL );
+  DestroyAllSurfaces( pHAL );
+  DestroyInterfaces( pHAL );
+
+  FREE( pHAL );
+}
+/*===========================================================================*/
+/*  This function is used to init and resize the rendering surface as the two*/
+/* are almost the same.  First the device and all the surfaces are destoryed */
+/* if they already exist.  Next we create a OffScreen rendering surface and  */
+/* save some pixelformat info to do color convertions. Next we start to take */
+/* care of getting the most out of the hardware. I use bHardware to determine*/
+/* the state of the device we found in the device enumeration.  The enum proc*/
+/* will try for hardware first.  I next use a bForceSW to make the enum proc */
+/* choose a software device.  So I will try some combinations with HW first  */
+/* until I feel I have to set the bForceSW and call this function again.  If */
+/* this function is called with no width or height then use the internals.   */
+/*   NOTE:  The worst case is that all will be in SW (RGBDevice) and really  */
+/*         I should forget the whole thing and fall back to a DDraw span type*/
+/*         rendering but what is the point.  This way I always know I have a */
+/*         D3DDevice and that makes things easier.  I do impliment the span  */
+/*         rendering function for stuff that I haven't done support for such */
+/*         as points and lines.                                              */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE                                                       */
+/*===========================================================================*/
+extern "C" BOOL        CreateHAL( PMESAD3DSHARED pShared )
+{
+  PMESAD3DHAL          pHAL = (PMESAD3DHAL)pShared;
+  DDSURFACEDESC2       ddsd2;
+  D3DDEVICEDESC        D3DSWDevDesc;
+  DDSCAPS2             ddscaps;
+  DWORD                dwCoopFlags,
+                    dwWidth,
+                    dwHeight;
+  ULONG                rc;
+
+  DPF(( DBG_FUNC, "CreateHAL();" ));
+
+#define InitDDSD2(f)      memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); \
+                          ddsd2.dwSize  = sizeof( DDSURFACEDESC2 ); \
+                          ddsd2.dwFlags = f;
+
+  if ( pHAL == NULL )
+    return FALSE;
+
+  /* Use the internal rectangle struct. */
+  dwWidth  = pShared->rectW.right - pShared->rectW.left;
+  dwHeight = pShared->rectW.bottom - pShared->rectW.top;
+
+  DPF(( DBG_CNTX_INFO, "Width: %d Height: %d", dwWidth, dwHeight ));
+
+  /* The dimensions might still be the same so just leave. */
+  if ( (dwWidth == pShared->dwWidth) && (dwHeight == pShared->dwHeight) )
+  {
+    DPF(( DBG_CNTX_WARN, "Context size hasn't changed" ));
+    return TRUE;
+  }
+
+  /* If one of the dimensions are zero then leave. WM_SIZE should get us back here. */
+  if ( (dwWidth == 0) || (dwHeight == 0) )
+    return TRUE;
+
+  /* Save the renders dimensions. */
+  pShared->dwWidth  = dwWidth;
+  pShared->dwHeight = dwHeight;
+
+  DPF(( DBG_CNTX_INFO, "Creating Context:\n cx:%d cy:%d", pShared->dwWidth, pShared->dwHeight ));
+
+  /*=================================*/
+  /* Create all required interfaces. */
+  /*=================================*/
+
+  /* Kill any DDraw stuff if exists. */
+  DestroyDevice( pHAL );
+  DestroyAllSurfaces( pHAL );
+  DestroyInterfaces( pHAL );
+
+  /* Create a instance of DDraw using the Primary display driver. */
+  rc = DirectDrawCreate( NULL, &pHAL->lpDD, NULL );
+  if( FAILED(rc) )
+  {
+    RIP( pHAL, "DirectDrawCreate->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Get the DDraw4 interface. */
+  rc = pHAL->lpDD->QueryInterface( IID_IDirectDraw4, (void **)&pHAL->lpDD4 );
+  if( FAILED(rc) )
+  {
+    RIP( pHAL, "QueryInterface (IID_IDirectDraw4) ->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Get the Direct3D3 interface. */
+  rc = pHAL->lpDD4->QueryInterface( IID_IDirect3D3, (void **)&pHAL->lpD3D3 );
+  if( FAILED(rc) )
+  {
+    RIP( pHAL, "QueryInterface (IID_IDirect3D3) ->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Set the Cooperative level. NOTE: we need to know if we are FS at this point.*/
+  dwCoopFlags = (pShared->bWindow == TRUE) ? DDSCL_NORMAL : (DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
+  rc = pHAL->lpDD4->SetCooperativeLevel( pShared->hwnd, dwCoopFlags );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "SetCooperativeLevel->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /*==================================================================*/
+  /* Get the best device we can and note whether its hardware or not. */
+  /*==================================================================*/
+  pShared->bForceSW = FALSE;
+  pHAL->lpD3D3->EnumDevices( EnumDeviceHook, (void *)pHAL );
+  pShared->bHardware = IsEqualIID( pHAL->guid, IID_IDirect3DHALDevice );
+  DPF(( DBG_CNTX_INFO, "bHardware: %s", (pShared->bHardware) ? "TRUE" : "FALSE" ));
+  DPF(( DBG_CNTX_INFO, "bWindowed: %s", (pShared->bWindow) ? "TRUE" : "FALSE" ));
+
+  /*========================================================================*/
+  /* HARDWARE was found.                                                    */
+  /*========================================================================*/
+  if ( pShared->bHardware == TRUE )
+  {
+    /*===================================*/
+    /* HARDWARE -> Z-BUFFER.             */
+    /*===================================*/
+
+    /* Get a Z-Buffer pixelformat. */
+    memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );
+    ddsd2.dwSize = sizeof( DDSURFACEDESC2 );
+    rc = pHAL->lpD3D3->EnumZBufferFormats( pHAL->guid, EnumZBufferHook, (VOID*)&ddsd2.ddpfPixelFormat );
+    if ( FAILED(rc) )
+    {
+        RIP( pHAL, "EnumZBufferFormatsl->", ErrorStringD3D(rc) );
+        return FALSE;
+    }
+        
+    /* Setup our request structure for the Z-buffer surface. */
+    ddsd2.dwFlags        = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+    ddsd2.ddsCaps.dwCaps = DDSCAPS_ZBUFFER | DDSCAPS_VIDEOMEMORY;
+    ddsd2.dwWidth        = dwWidth;
+    ddsd2.dwHeight       = dwHeight;
+    rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSZbuffer, NULL );
+    if ( !FAILED(rc) )
+    {
+        DPF(( DBG_CNTX_INFO, "HW ZBuffer" ));
+
+        /*===================================*/
+        /* HARDWARE -> Z-BUFFER -> FLIPABLE  */
+        /*===================================*/
+        if ( pShared->bWindow == FALSE )
+        {
+          InitDDSD2( DDSD_CAPS | DDSD_BACKBUFFERCOUNT );
+          ddsd2.dwBackBufferCount = 1;
+          ddsd2.ddsCaps.dwCaps    = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
+          rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );
+          if ( FAILED(rc) )
+          {    
+               /* Make sure we try the next fall back. */
+               DPF(( DBG_CNTX_WARN, "HW Flip/Complex not available" ));
+               pHAL->lpDDSPrimary = NULL;
+          }
+          else
+          {
+               /* Get the back buffer that was created. */
+               ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
+               rc = pHAL->lpDDSPrimary->GetAttachedSurface( &ddscaps, &pHAL->lpDDSRender );
+               if ( FAILED(rc) )
+               {       
+                 DPF(( DBG_CNTX_WARN, "GetAttachedSurface failed -> HW Flip/Complex" ));
+                 
+                 /* Make sure we try the next fall back. */
+                 pHAL->lpDDSPrimary->Release();
+                 pHAL->lpDDSPrimary = NULL;
+               }       
+               else
+               {
+                 /*  I have had problems when a complex surface comes back  */
+                 /* with the back buffer being created in SW.  Not sure why */
+                 /* or how this is possable but I'm checking for it here.   */
+                 memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); 
+                 ddsd2.dwSize = sizeof( DDSURFACEDESC2 );
+                 DX_RESTORE( pHAL->lpDDSRender );
+                 rc = pHAL->lpDDSRender->GetSurfaceDesc( &ddsd2 );
+                 if ( FAILED(rc) )
+                 {
+                   RIP( pHAL, "GetSurfaceDesc (RENDER) ->", ErrorStringD3D(rc) );
+                   return FALSE;
+                 }
+
+                 /* If the surface is in VID then we are happy with are Flipable. */
+                 if ( ddsd2.ddsCaps.dwCaps & DDSCAPS_LOCALVIDMEM )
+                 {
+                   pShared->bFlipable = TRUE;
+                   DPF(( DBG_CNTX_INFO, "HW Flip/Complex!" ));
+                 }
+                 else
+                 {
+                   /* Kill this setup. */
+                   pHAL->lpDDSPrimary->Release();
+                   pHAL->lpDDSPrimary = NULL;
+                 }
+               }
+          }
+        }
+
+        /*===================================*/
+        /* HARDWARE -> Z-BUFFER -> BLT       */
+        /*===================================*/
+        if ( pHAL->lpDDSPrimary == NULL )
+        {
+          pShared->bFlipable = FALSE;
+
+          /* Create the Primary (front buffer). */
+          InitDDSD2( DDSD_CAPS );
+          ddsd2.ddsCaps.dwCaps  = DDSCAPS_PRIMARYSURFACE;
+          rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );
+          if ( FAILED(rc) )
+          {
+               /* This is an error as we should be able to do this at minimum. */
+               RIP( pHAL, "CreateSurface (PRIMARY) ->", ErrorStringD3D(rc) );
+               return FALSE;
+          }
+
+          /* Create the Render (back buffer). */
+          InitDDSD2( DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT );
+          ddsd2.dwWidth            = dwWidth;
+          ddsd2.dwHeight           = dwHeight;
+          ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
+          rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSRender, NULL );
+          if ( FAILED(rc) )
+          {
+               DPF(( DBG_CNTX_WARN, "Failed HW Offscreen surface" ));
+
+               /* Make sure we try the next fall back. */
+               pHAL->lpDDSPrimary->Release();
+               pHAL->lpDDSPrimary = NULL;
+          }
+          else
+          {
+               /*  Might as well check here too see if this surface is in */
+               /* hardware.  If nothing else just to be consistant.       */
+               memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) ); 
+               ddsd2.dwSize = sizeof( DDSURFACEDESC2 );
+               DX_RESTORE( pHAL->lpDDSRender );
+               rc = pHAL->lpDDSRender->GetSurfaceDesc( &ddsd2 );
+               if ( FAILED(rc) )
+               {
+                 RIP( pHAL, "GetSurfaceDesc (RENDER) ->", ErrorStringD3D(rc) );
+                 return FALSE;
+               }
+
+               /* If the surface is in VID then we are happy. */
+               if ( ddsd2.ddsCaps.dwCaps & DDSCAPS_LOCALVIDMEM )
+               {
+                 /*  Create a clipper object so that DDraw will be able to blt windows that */
+                 /* have been clipped by the screen or other windows.                       */
+                 pHAL->lpDD4->CreateClipper( 0, &pHAL->lpClipper, NULL );
+                 pHAL->lpClipper->SetHWnd( 0, pShared->hwnd );
+                 pHAL->lpDDSPrimary->SetClipper( pHAL->lpClipper );
+                 pHAL->lpClipper->Release();
+                 DPF(( DBG_CNTX_INFO, "HW RENDER surface" ));
+               }
+               else
+               {
+                 /* Kill this setup. */
+                 pHAL->lpDDSRender->Release();
+                 pHAL->lpDDSRender = NULL;
+                 pHAL->lpDDSPrimary->Release();
+                 pHAL->lpDDSPrimary = NULL;
+               }
+          }
+        }      
+
+        /*===================================*/
+        /* Create D3DDEVICE -> HARDWARE.     */
+        /*===================================*/
+        if ( pHAL->lpDDSZbuffer && pHAL->lpDDSPrimary && pHAL->lpDDSRender )
+        {
+          DX_RESTORE( pHAL->lpDDSRender );
+          DX_RESTORE( pHAL->lpDDSZbuffer );
+
+          rc = pHAL->lpDDSRender->AddAttachedSurface( pHAL->lpDDSZbuffer );
+          if ( FAILED(rc) )
+          {
+               RIP( pHAL, "AddAttachedSurface (ZBUFFER) ->", ErrorStringD3D(rc) );
+               return FALSE;
+          }
+
+          rc = pHAL->lpD3D3->CreateDevice( IID_IDirect3DHALDevice, pHAL->lpDDSRender, &pHAL->lpD3DDevice, NULL );
+          if ( rc != D3D_OK )
+          {
+               DPF(( DBG_CNTX_WARN, "Failed HW Device" ));
+               pHAL->lpD3DDevice = NULL;
+          }
+          else
+          {
+               DPF(( DBG_CNTX_INFO, "HW Device" ));
+          }
+        }
+    }  
+  }
+      
+  /*========================================================================*/
+  /* SOFTWARE fallback.                                                     */
+  /*========================================================================*/
+  if ( pHAL->lpD3DDevice == NULL )
+  {
+    DPF(( DBG_CNTX_INFO, "SW fallback :(" ));
+
+    /* Make sure we have no surfaces allocated.  Just incase. */
+    DestroyAllSurfaces( pHAL );
+
+    /* Get a software device. */
+    pShared->bFlipable = FALSE;
+    pShared->bForceSW = TRUE;
+    pHAL->lpD3D3->EnumDevices( EnumDeviceHook, (void *)pHAL );
+    pShared->bHardware = IsEqualIID( pHAL->guid, IID_IDirect3DHALDevice );
+
+     /*===================================*/
+    /* SOFTWARE -> Z-BUFFER.             */
+    /*===================================*/
+
+    /*===================================*/
+    /* SOFTWARE -> Z-BUFFER -> FLIPABLE  */
+    /*===================================*/
+    if ( pShared->bWindow == FALSE )
+    {
+        InitDDSD2( DDSD_CAPS | DDSD_BACKBUFFERCOUNT );
+        ddsd2.dwBackBufferCount = 1;
+        ddsd2.ddsCaps.dwCaps    = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
+        ddsd2.ddpfPixelFormat.dwSize  = sizeof( DDPIXELFORMAT );
+        ddsd2.ddpfPixelFormat.dwFlags = (DDPF_RGB | DDPF_ALPHAPIXELS);
+        rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );
+        if ( FAILED(rc) )
+        {      
+          DPF(( DBG_CNTX_WARN, "Failed SW Flip/Complex" ));
+
+          /* Make sure we try the next fall back. */
+          pHAL->lpDDSPrimary = NULL;
+        }
+        else
+        {
+          ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
+          rc = pHAL->lpDDSPrimary->GetAttachedSurface( &ddscaps, &pHAL->lpDDSRender );
+          if ( FAILED(rc) )
+          {    
+               /* Make sure we try the next fall back. */
+               DPF(( DBG_CNTX_WARN, "GetAttachedSurface failed -> SW Flip/Complex" ));
+               pHAL->lpDDSPrimary->Release();
+               pHAL->lpDDSPrimary = NULL;
+          }    
+          else
+          {
+               DPF(( DBG_CNTX_INFO, "SW Flip/Complex" ));
+               pShared->bFlipable = TRUE;
+          }
+        }
+    }          
+
+    /*===================================*/
+    /* SOFTWARE -> Z-BUFFER -> BLT       */
+    /*===================================*/
+    if ( pHAL->lpDDSPrimary == NULL )
+    {
+        /* Create the Primary (front buffer). */
+        InitDDSD2( DDSD_CAPS );
+        ddsd2.ddsCaps.dwCaps  = DDSCAPS_PRIMARYSURFACE;
+        rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSPrimary, NULL );
+        if ( FAILED(rc) )
+        {
+          /* This is an error as we should be able to do this at minimum. */
+          RIP( pHAL, "CreateSurface (PRIMARY) ->", ErrorStringD3D(rc) );
+          return FALSE;
+        }
+
+        /* Create the Render (back buffer). */
+        InitDDSD2( DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT );
+        ddsd2.dwWidth                                  = dwWidth;
+        ddsd2.dwHeight                         = dwHeight;
+        ddsd2.ddsCaps.dwCaps                   = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
+        ddsd2.ddpfPixelFormat.dwSize   = sizeof( DDPIXELFORMAT );
+        ddsd2.ddpfPixelFormat.dwFlags  = (DDPF_RGB | DDPF_ALPHAPIXELS);
+        rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pHAL->lpDDSRender, NULL );
+        if ( FAILED(rc) )
+        {
+          /* That was our last hope. */
+          RIP( pHAL, "CreateSurface (RENDER) ->", ErrorStringD3D(rc) );
+          return FALSE;
+        }
+        else
+        {
+          DPF(( DBG_CNTX_INFO, "SW RENDER surface" ));
+
+          /*  Create a clipper object so that DDraw will be able to blt windows that */
+          /* have been clipped by the screen or other windows.                       */
+          pHAL->lpDD4->CreateClipper( 0, &pHAL->lpClipper, NULL );
+          pHAL->lpClipper->SetHWnd( 0, pShared->hwnd );
+          pHAL->lpDDSPrimary->SetClipper( pHAL->lpClipper );
+          pHAL->lpClipper->Release();
+        }
+    }          
+       
+    /*===================================*/
+    /* Create D3DDEVICE -> SOFTWARE.     */
+    /*===================================*/
+    if ( pHAL->lpDDSPrimary && pHAL->lpDDSRender )
+    {
+        DX_RESTORE( pHAL->lpDDSRender );
+        rc = pHAL->lpD3D3->CreateDevice( IID_IDirect3DRGBDevice, pHAL->lpDDSRender, &pHAL->lpD3DDevice, NULL );
+        if ( rc != D3D_OK )
+        {
+          /* That was our last hope. */
+          RIP( pHAL, "CreateDevice (IID_IDirect3DRGBDevice) ->", ErrorStringD3D(rc) );
+          return FALSE;
+        }
+        
+        DPF(( DBG_CNTX_INFO, "SW Device" ));
+    }  
+  }
+
+  /*==============================================================================*/
+  /* Get a copy of the render pixelformat so that wgl.c can call GetPixelInfoD3D. */
+  /*==============================================================================*/
+  memset( &pHAL->ddpf, 0, sizeof(DDPIXELFORMAT) );
+  pHAL->ddpf.dwSize = sizeof( DDPIXELFORMAT );
+  rc = pHAL->lpDDSRender->GetPixelFormat( &pHAL->ddpf );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "GetPixelFormat ->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+  DebugPixelFormat( "Using OFFSCREEN", &pHAL->ddpf );
+  DebugPixelFormat( "Using ZBUFFER", &ddsd2.ddpfPixelFormat );
+
+  /* Get a copy of what the D3DDevice supports for later use. */
+  memset( &D3DSWDevDesc, 0, sizeof(D3DDEVICEDESC) );
+  memset( &pHAL->D3DHWDevDesc, 0, sizeof(D3DDEVICEDESC) );
+  D3DSWDevDesc.dwSize       = sizeof( D3DDEVICEDESC );
+  pHAL->D3DHWDevDesc.dwSize = sizeof( D3DDEVICEDESC );
+  rc = pHAL->lpD3DDevice->GetCaps( &pHAL->D3DHWDevDesc, &D3DSWDevDesc );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "GetCaps ->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Get a copy of the pixel convertion stuff for direct buffer access. */
+  Solve8BitChannelPixelFormat( &pHAL->ddpf, &pShared->pixel );
+  AlphaBlendTableHAL( pHAL );
+
+  /* We must prime the Begin/End scene for SwapBuffers to work. */
+  rc = pHAL->lpD3DDevice->BeginScene();   
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+#undef InitDDSD2
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This function will make sure a viewport is created and set for the device*/
+/* in the supplied structure.  If a rect is supplied then it will be used for*/
+/* the viewport otherwise the current setting in the strucute will be used.  */
+/* Note that the rect is relative to the window.  So left/top must be 0,0 to */
+/* use the whole window else there is scissoring going down.                 */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+extern "C" BOOL SetViewportHAL( PMESAD3DSHARED pShared, RECT *pRect, float minZ, float maxZ  )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+  D3DVIEWPORT2 vdData;
+  ULONG                rc;
+  POINT                pt;
+
+  DPF(( DBG_FUNC, "SetViewportHAL();" ));
+
+  /* Make sure we have enough info. */
+  if ( !pHAL || !pHAL->lpDDSPrimary || !pHAL->lpD3DDevice )
+  {
+    DPF(( DBG_CNTX_WARN, "SetViewport() -> NULL Pointer" ));
+    return FALSE;
+  }
+
+  /* TODO: this is just a temp fix to stop redundant changes. */
+  if ( pRect &&
+         (pShared->rectV.left   == pRect->left)    &&
+         (pShared->rectV.right  == pRect->right)   &&
+         (pShared->rectV.top    == pRect->top)     &&
+         (pShared->rectV.bottom == pRect->bottom) )
+  {
+    DPF(( DBG_CNTX_WARN, "Redundant viewport" ));
+    return TRUE;
+  }
+
+  DPF(( DBG_CNTX_INFO, "Current Viewport:" ));
+  DPF(( DBG_CNTX_INFO, "x: %d y: %d", pShared->rectV.left, pShared->rectV.top ));
+  DPF(( DBG_CNTX_INFO, "cx: %d cy: %d", (pShared->rectV.right-pShared->rectV.left), (pShared->rectV.bottom-pShared->rectV.top) ));
+  DPF(( DBG_CNTX_INFO, "New Viewport:" ));
+  DPF(( DBG_CNTX_INFO, "x: %d y: %d", pRect->left, pRect->top ));
+  DPF(( DBG_CNTX_INFO, "cx: %d cy: %d", (pRect->right-pRect->left), (pRect->bottom-pRect->top) ));
+
+  /* Update the current viewport rect if one is supplied. */
+  if ( pRect )      
+    memcpy( &pShared->rectV, pRect, sizeof(RECT) );
+        
+  /* Build the request structure. */
+  memset( &vdData, 0, sizeof(D3DVIEWPORT2) );
+  vdData.dwSize   = sizeof(D3DVIEWPORT2);  
+  vdData.dwX      = pShared->rectV.left;
+  vdData.dwY      = pShared->rectV.top;
+  vdData.dwWidth  = (pShared->rectV.right - pShared->rectV.left);
+  vdData.dwHeight = (pShared->rectV.bottom - pShared->rectV.top);
+
+  if ( !vdData.dwWidth || !vdData.dwHeight )
+  {
+    GetClientRect( pShared->hwnd, &pShared->rectW );
+    pt.x = pt.y = 0;
+    ClientToScreen( pShared->hwnd, &pt );
+    OffsetRect( &pShared->rectW, pt.x, pt.y);
+    vdData.dwX      = pShared->rectW.left;
+    vdData.dwY      = pShared->rectW.top;
+    vdData.dwWidth  = (pShared->rectW.right - pShared->rectW.left);
+    vdData.dwHeight = (pShared->rectW.bottom - pShared->rectW.top);
+    memcpy( &pShared->rectV, &pShared->rectW, sizeof(RECT) );
+  }
+
+  // The dvClipX, dvClipY, dvClipWidth, dvClipHeight, dvMinZ, 
+  // and dvMaxZ members define the non-normalized post-perspective 
+  // 3-D view volume which is visible to the viewer. In most cases, 
+  // dvClipX is set to -1.0 and dvClipY is set to the inverse of 
+  // the viewport's aspect ratio on the target surface, which can be 
+  // calculated by dividing the dwHeight member by dwWidth. Similarly, 
+  // the dvClipWidth member is typically 2.0 and dvClipHeight is set 
+  // to twice the aspect ratio set in dwClipY. The dvMinZ and dvMaxZ 
+  // are usually set to 0.0 and 1.0.
+  vdData.dvClipX      = -1.0f;
+  vdData.dvClipWidth  = 2.0f;
+  vdData.dvClipY      = 1.0f;
+  vdData.dvClipHeight = 2.0f;
+  vdData.dvMaxZ       = maxZ;
+  vdData.dvMinZ       = minZ;
+
+  DPF(( DBG_CNTX_INFO, "zMin: %f zMax: %f", minZ, maxZ ));
+
+  /*  I'm going to destroy the viewport everytime as when we size we will */
+  /* have a new D3DDevice.  As this area doesn't need to be fast...       */
+  if ( pHAL->lpViewport )
+  {
+    DPF(( DBG_CNTX_INFO, "DeleteViewport" ));
+
+    pHAL->lpD3DDevice->DeleteViewport( pHAL->lpViewport );
+    rc = pHAL->lpViewport->Release();
+    pHAL->lpViewport = NULL;
+  }
+
+  rc = pHAL->lpD3D3->CreateViewport( &pHAL->lpViewport, NULL );
+  if ( rc != D3D_OK )
+  {
+    DPF(( DBG_CNTX_ERROR, "CreateViewport Failed" ));
+    return FALSE;
+  }
+
+  /* Update the device with the new viewport. */
+  pHAL->lpD3DDevice->AddViewport( pHAL->lpViewport );
+  pHAL->lpViewport->SetViewport2( &vdData );
+  pHAL->lpD3DDevice->SetCurrentViewport( pHAL->lpViewport );
+
+  return TRUE; 
+}
+/*===========================================================================*/
+/*                                                                           */
+/*                                                                           */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+HRESULT WINAPI EnumSurfacesHook( LPDIRECTDRAWSURFACE4 lpDDS, LPDDSURFACEDESC2 lpDDSDesc, LPVOID pVoid )
+{
+  DDSURFACEDESC2 *pddsd2 = (DDSURFACEDESC2 *)pVoid;
+
+  DPF(( DBG_FUNC, "EnumSurfacesHook();" ));
+
+  if ( (lpDDSDesc->ddpfPixelFormat.dwFlags == pddsd2->ddpfPixelFormat.dwFlags) && (lpDDSDesc->ddsCaps.dwCaps == pddsd2->ddsCaps.dwCaps) )
+  {
+    /* Save the pixelformat now so that we know we have one. */
+    memcpy( pddsd2, lpDDSDesc, sizeof(DDSURFACEDESC2) );
+
+    return D3DENUMRET_CANCEL;
+  }
+
+  return D3DENUMRET_OK;
+}
+/*===========================================================================*/
+/*  This is the callback proc to get a Z-Buffer.  Thats it.                  */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+HRESULT CALLBACK  EnumZBufferHook( DDPIXELFORMAT* pddpf, VOID *pVoid )
+{
+  DDPIXELFORMAT  *pddpfChoice = (DDPIXELFORMAT *)pVoid;
+
+  DPF(( DBG_FUNC, "EnumZBufferHook();" ));
+
+  /* If this is ANY type of depth-buffer, stop. */
+  if( pddpf->dwFlags == DDPF_ZBUFFER )
+  {
+    /* Save the pixelformat now so that we know we have one. */
+    memcpy( pddpfChoice, pddpf, sizeof(DDPIXELFORMAT) );
+
+    /* I feel if the hardware supports this low then lets use it.  Could get ugly. */
+    if( pddpf->dwZBufferBitDepth >= 8 )
+    {
+        return D3DENUMRET_CANCEL;
+    }
+  }
+   return D3DENUMRET_OK;
+}
+/*===========================================================================*/
+/*  This function handles the callback for the D3DDevice enumeration.  Good  */
+/* god who's idea was this?  The D3D wrapper has two variable related to what*/
+/* kind of device we want and have.  First we have a Bool that is set if we  */
+/* have allocated a HW device.  We always look for the HW device first.  The */
+/* other variable is used to force SW.  If we have run into a case that we   */
+/* want to fallback to SW then we set this.  We will fallback if we cannot   */
+/* texture in video memory (among others).                                   */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+HRESULT CALLBACK  EnumDeviceHook( GUID FAR* lpGuid, LPSTR lpDesc, LPSTR lpName, LPD3DDEVICEDESC lpD3DHWDesc, LPD3DDEVICEDESC lpD3DHELDesc,  void *pVoid )
+{
+  PMESAD3DHAL          pHAL = (PMESAD3DHAL)pVoid;
+  LPD3DDEVICEDESC   pChoice = lpD3DHWDesc;
+
+  DPF(( DBG_FUNC, "EnumDeviceHook();" ));
+
+  /* Determine if which device description is valid. */
+  if ( pChoice->dcmColorModel == 0 )
+    pChoice = lpD3DHELDesc;
+
+  /* Make sure we always have a GUID. */
+  memcpy( &pHAL->guid, lpGuid, sizeof(GUID) );
+
+  /* This controls whether we will except HW or not. */
+  if ( pHAL->shared.bForceSW == TRUE )
+  {
+    return (pChoice == lpD3DHELDesc) ? D3DENUMRET_CANCEL : D3DENUMRET_OK;
+  }
+
+  /* Always try for hardware. */
+  if ( pChoice == lpD3DHWDesc )
+  {
+    return D3DENUMRET_CANCEL;
+  }
+
+  return D3DENUMRET_OK;
+}
+/*===========================================================================*/
+/*  This function will destroy any and all surfaces that this context has    */
+/* allocated.  If there is a clipper object then it will also be destoryed as*/
+/* it is part of the Primary Surface.                                        */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void DestroyAllSurfaces( PMESAD3DHAL pHAL )
+{
+  LONG refCount;
+
+  DPF(( DBG_FUNC, "DestroyAllSurfaces();" ));
+
+  DX_RESTORE( pHAL->lpDDSPrimary );
+  DX_RESTORE( pHAL->lpDDSRender );
+  DX_RESTORE( pHAL->lpDDSZbuffer);
+
+  if ( pHAL->lpDDSRender )
+  {
+    pHAL->lpDDSRender->Unlock( NULL );
+
+    /* If this isn't a Flipable surface then we must clean up the render. */
+    if ( pHAL->shared.bFlipable == FALSE)
+    {
+        if ( pHAL->lpDDSZbuffer )
+        {
+          DPF(( DBG_CNTX_INFO, "Remove attached surfaces from RENDER" ));
+          pHAL->lpDDSRender->DeleteAttachedSurface( 0, NULL );
+        }
+
+        DPF(( DBG_CNTX_INFO, "Release RENDER" ));
+        refCount = pHAL->lpDDSRender->Release();
+        pHAL->lpDDSRender = NULL;
+    }
+  }
+
+  if ( pHAL->lpDDSZbuffer )
+  {
+    DPF(( DBG_CNTX_INFO, "Release ZBuffer" ));
+    pHAL->lpDDSZbuffer->Unlock( NULL );
+    refCount = pHAL->lpDDSZbuffer->Release();
+    pHAL->lpDDSZbuffer = NULL;
+  }
+
+  if ( pHAL->lpClipper )
+  {
+    DPF(( DBG_CNTX_INFO, "Release Clipper" ));
+    refCount = pHAL->lpClipper->Release();
+    pHAL->lpClipper = NULL;
+  }
+
+  if ( pHAL->lpDDSPrimary )
+  {
+    pHAL->lpDDSPrimary->Unlock( NULL );
+
+    DPF(( DBG_CNTX_INFO, "Release PRIMARY" ));
+    refCount = pHAL->lpDDSPrimary->Release();
+    pHAL->lpDDSPrimary = NULL;
+  }
+}
+/*===========================================================================*/
+/*  This function will destroy the current D3DDevice and any resources that  */
+/* belong to it.                                                             */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void DestroyDevice( PMESAD3DHAL pHAL )
+{
+  LONG refCount;
+
+  DPF(( DBG_FUNC, "DestroyDevice();" ));
+
+  /* Kill the D3D stuff if exists. */
+  if ( pHAL->lpViewport )
+  {
+    DPF(( DBG_CNTX_INFO, "Delete Viewport" ));
+    pHAL->lpD3DDevice->DeleteViewport( pHAL->lpViewport );
+
+    DPF(( DBG_CNTX_INFO, "Release Viewport" ));
+    refCount = pHAL->lpViewport->Release();
+    pHAL->lpViewport = NULL;
+  }
+
+  if ( pHAL->lpD3DDevice != NULL )
+  {
+    DPF(( DBG_CNTX_INFO, "Release D3DDevice" ));
+    refCount = pHAL->lpD3DDevice->EndScene();  
+    refCount = pHAL->lpD3DDevice->Release();
+    pHAL->lpD3DDevice = NULL;
+  }
+}
+/*===========================================================================*/
+/*  This function will destroy the current D3DDevice and any resources that  */
+/* belong to it.                                                             */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void DestroyInterfaces( PMESAD3DHAL pHAL )
+{
+  LONG refCount;
+
+  DPF(( DBG_FUNC, "DestroyInterfaces();" ));
+
+  if ( pHAL->lpD3D3 != NULL )
+  {
+    DPF(( DBG_CNTX_INFO, "Release Direct3D3" ));
+    refCount = pHAL->lpD3D3->Release();
+    pHAL->lpD3D3 = NULL;
+  }
+
+  if ( pHAL->lpDD4 != NULL )
+  {
+    DPF(( DBG_CNTX_INFO, "Release DDraw4" ));
+    refCount = pHAL->lpDD4->Release();
+    pHAL->lpDD4 = NULL;
+  }
+
+  if ( pHAL->lpDD != NULL )
+  {
+    DPF(( DBG_CNTX_INFO, "Release DDraw" ));
+    refCount = pHAL->lpDD->Release();
+    pHAL->lpDD = NULL;
+  }
+}
+/*===========================================================================*/
+/*  This function will first send (not post) a message to the client window  */
+/* that this context is using.  The client will respond by unbinding itself  */
+/* and binding the 'default' context.  This allows the API to be supported   */
+/* until the window can be destroyed.  Finally we post the quit message to   */
+/* the client in hopes to end the application.                               */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void  FatalShutDown( PMESAD3DHAL pHAL )
+{
+  /* Whip this baby in too try and support the API until we die... */
+  if ( pHAL )
+    SendMessage( pHAL->shared.hwnd, UM_FATALSHUTDOWN, 0L, 0L );
+
+  /* Close the client application down. */
+  PostQuitMessage( 0 );
+}
+
index 074ceca816afd582fbf43ce9271d3c618e575f81..71a7cd8aedf211bfe3a9d9bdd24092970572a699 100644 (file)
@@ -1,84 +1,84 @@
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#ifndef D3D_MESA_H\r
-#define D3D_MESA_H\r
-/*===========================================================================*/\r
-/* Includes.                                                                 */\r
-/*===========================================================================*/\r
-#include <windows.h>\r
-#include <ddraw.h>\r
-#include <d3d.h>\r
-#include "matrix.h"\r
-#include "context.h"\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#ifndef D3D_MESA_H
+#define D3D_MESA_H
+/*===========================================================================*/
+/* Includes.                                                                 */
+/*===========================================================================*/
+#include <windows.h>
+#include <ddraw.h>
+#include <d3d.h>
+#include "matrix.h"
+#include "context.h"
 #include "mtypes.h"
-#include "vb.h"\r
-#include "D3DShared.h"\r
-#include "Debug.h"\r
-#include "NULLProcs.h"\r
-/*===========================================================================*/\r
-/* Macros.                                                                   */\r
-/*===========================================================================*/\r
-#define FLIP(h,y)                       (h-y)\r
-/*===========================================================================*/\r
-/* Magic numbers.                                                            */\r
-/*===========================================================================*/\r
-/*===========================================================================*/\r
-/* Type defines.                                                             */\r
-/*===========================================================================*/\r
-struct __extensions__\r
-{\r
-   PROC  proc;\r
-   char  *name;\r
-};\r
-\r
-typedef GLbitfield   (*ClearPROC)( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );\r
-typedef void         (*WSpanRGBPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );\r
-typedef void         (*WSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );\r
-typedef void         (*WSpanRGBAMonoPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );\r
-typedef void         (*WPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );\r
-typedef void         (*WPixelsRGBAMonoPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );\r
-typedef void         (*RSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );\r
-typedef void         (*RPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );\r
-\r
-typedef struct D3D_mesa_context \r
-{\r
-  PMESAD3DSHARED        pShared;\r
-\r
-  GLcontext             *gl_ctx;       /* The core GL/Mesa context */\r
-  GLvisual              *gl_visual;    /* Describes the buffers */\r
-  GLframebuffer *gl_buffer;    /* Depth, stencil, accum, etc buffers */\r
-\r
-  HDC                   hdc;\r
-  WNDPROC               hOldProc;\r
-\r
-  UCHAR                 rClear,         /* Current clear colors. */\r
-                   gClear,\r
-                   bClear,\r
-                   aClear,\r
-                   rCurrent,           /* Current rendering colors. */\r
-                   gCurrent,\r
-                   bCurrent,\r
-                   aCurrent;\r
-\r
-   struct D3D_mesa_context *next;\r
-\r
-} D3DMESACONTEXT, *PD3DMESACONTEXT;\r
-/*===========================================================================*/\r
-/* Extern function prototypes.                                               */\r
-/*===========================================================================*/\r
-extern void gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );\r
-/*===========================================================================*/\r
-/* Global variables.                                                         */\r
-/*===========================================================================*/\r
-extern D3DTLVERTEX   D3DTLVertices[(VB_MAX*6)];\r
-\r
-#endif\r
-\r
+#include "vb.h"
+#include "D3DShared.h"
+#include "Debug.h"
+#include "NULLProcs.h"
+/*===========================================================================*/
+/* Macros.                                                                   */
+/*===========================================================================*/
+#define FLIP(h,y)                       (h-y)
+/*===========================================================================*/
+/* Magic numbers.                                                            */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Type defines.                                                             */
+/*===========================================================================*/
+struct __extensions__
+{
+   PROC  proc;
+   char  *name;
+};
+
+typedef GLbitfield   (*ClearPROC)( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+typedef void         (*WSpanRGBPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );
+typedef void         (*WSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
+typedef void         (*WSpanRGBAMonoPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );
+typedef void         (*WPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
+typedef void         (*WPixelsRGBAMonoPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
+typedef void         (*RSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
+typedef void         (*RPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
+
+typedef struct D3D_mesa_context 
+{
+  PMESAD3DSHARED        pShared;
+
+  GLcontext             *gl_ctx;       /* The core GL/Mesa context */
+  GLvisual              *gl_visual;    /* Describes the buffers */
+  GLframebuffer *gl_buffer;    /* Depth, stencil, accum, etc buffers */
+
+  HDC                   hdc;
+  WNDPROC               hOldProc;
+
+  UCHAR                 rClear,         /* Current clear colors. */
+                   gClear,
+                   bClear,
+                   aClear,
+                   rCurrent,           /* Current rendering colors. */
+                   gCurrent,
+                   bCurrent,
+                   aCurrent;
+
+   struct D3D_mesa_context *next;
+
+} D3DMESACONTEXT, *PD3DMESACONTEXT;
+/*===========================================================================*/
+/* Extern function prototypes.                                               */
+/*===========================================================================*/
+extern void gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
+/*===========================================================================*/
+/* Global variables.                                                         */
+/*===========================================================================*/
+extern D3DTLVERTEX   D3DTLVertices[(VB_MAX*6)];
+
+#endif
+
index 004bb773603e812a38c80dc0c65addf20ae848e9..41e42ad94cef4e7334a596ed2c6e07b188a27d2c 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "D3DHAL.h"\r
-/*===========================================================================*/\r
-/*  This function clears the context bound to the supplied shared context.   */\r
-/* The function takes the D3D flags D3DCLEAR_TARGET, D3DCLEAR_STENCIL and    */\r
-/* D3DCLEAR_ZBUFFER.  Set bAll to TRUE for a full clear else supply the coord*/\r
-/* of the rect to be cleared relative to the window.  The color is always a  */\r
-/* 32bit value (RGBA).  Fill in the z-value and stencil if needed.           */\r
-/*                                                                           */\r
-/*  TODO: this can be redone to be called by Mesa directly.                  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void ClearHAL( PMESAD3DSHARED pShared, DWORD dwFlags, BOOL bAll, int x, int y, int cx, int cy, DWORD dwColor, float zv, DWORD dwStencil )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-  D3DRECT              d3dRect;\r
-\r
-#ifdef D3D_DEBUG\r
-  HRESULT              rc;\r
-\r
-  DPF(( DBG_FUNC, "CleaHAL();" ));\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( (pHAL == NULL) || (pHAL->lpViewport == NULL) )\r
-    return;\r
-#endif\r
-\r
-  if ( bAll )\r
-  {\r
-    /* I assume my viewport is valid. */\r
-    d3dRect.lX1 = pShared->rectV.left;\r
-    d3dRect.lY1 = pShared->rectV.top;\r
-    d3dRect.lX2 = pShared->rectV.right;\r
-    d3dRect.lY2 = pShared->rectV.bottom;\r
-  }\r
-  else\r
-  {\r
-    d3dRect.lX1 = pShared->rectV.left + x;\r
-    d3dRect.lY1 = pShared->rectV.top  + y;\r
-    d3dRect.lX2 = d3dRect.lX1 + cx;\r
-    d3dRect.lY2 = d3dRect.lY1 + cy;\r
-  }\r
-\r
-#ifdef D3D_DEBUG\r
-  rc = pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "Clear2 ->", ErrorStringD3D(rc) );\r
-  }\r
-#else\r
-  pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );\r
-#endif\r
-}\r
-/*===========================================================================*/\r
-/*  Well this is the guts of it all.  Here we rasterize the primitives that  */\r
-/* are in their final form.  OpenGL has done all the lighting, transfomations*/\r
-/* and clipping at this point.                                               */\r
-/*                                                                           */\r
-/* TODO:  I'm not sure if I want to bother to check for errors on this call. */\r
-/*       The overhead kills me...                                            */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-\r
-#ifdef D3D_DEBUG\r
-  HRESULT              rc;      \r
-\r
-  DPF(( DBG_FUNC, "DrawPrimitveHAL();" ));\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )\r
-    return;\r
-\r
-  DPF(( DBG_PRIM_INFO, "DP( %d )", dwCount ));\r
-\r
-  rc = pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,\r
-                                                                D3DFVF_TLVERTEX,\r
-                                                                (LPVOID)pVertices,\r
-                                                                dwCount, \r
-                                                                (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "DrawPrimitive ->", ErrorStringD3D(rc) );\r
-  }\r
-#else\r
-  pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,\r
-                                                        D3DFVF_TLVERTEX,\r
-                                                        (LPVOID)pVertices,\r
-                                                        dwCount, \r
-                                                        (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );\r
-#endif\r
-}\r
-/*===========================================================================*/\r
-/*  This call will handle the swapping of the buffers.  Now I didn't bother  */\r
-/* to support single buffered so this will be used for glFlush() as its all  */\r
-/* the same.  So first we do an EndScene as we are always considered to be in*/\r
-/* a BeginScene because when we leave we do a BeginScene.  Now note that when*/\r
-/* the context is created in the first place we do a BeginScene also just to */\r
-/* get things going.  The call will use either Flip/blt based on the type of */\r
-/* surface was created for rendering.                                        */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void SwapBuffersHAL( PMESAD3DSHARED pShared )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-\r
-#ifdef D3D_DEBUG\r
-  HRESULT              rc;      \r
-\r
-  DPF(( DBG_FUNC, "SwapBuffersHAL();" ));\r
-  DPF(( DBG_ALL_PROFILE, "=================SWAP===================" ));\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )\r
-    return;\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( pHAL->lpDDSPrimary != NULL )\r
-  {\r
-    rc = pHAL->lpD3DDevice->EndScene();   \r
-    if ( FAILED(rc) )\r
-    {\r
-        RIP( pHAL, "EndScene ->", ErrorStringD3D(rc) );\r
-    }\r
\r
-    if ( pShared->bFlipable )\r
-    {\r
-        DPF(( DBG_CNTX_PROFILE, "Swap->FLIP" ));\r
-        rc = pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );\r
-    }\r
-    else\r
-    {\r
-        DPF(( DBG_CNTX_PROFILE, "Swap->Blt" ));\r
-        rc = pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );\r
-    }\r
-    if ( FAILED(rc) )\r
-    {\r
-        RIP( pHAL, "Blt (RENDER/PRIMARY) ->", ErrorStringD3D(rc) );\r
-    }\r
-\r
-    rc = pHAL->lpD3DDevice->BeginScene(); \r
-    if ( FAILED(rc) )\r
-    {\r
-        RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );\r
-    }\r
-  }\r
-#else\r
-  pHAL->lpD3DDevice->EndScene();   \r
-\r
-  if ( pShared->bFlipable )\r
-    pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );\r
-  else\r
-    pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );\r
-\r
-  pHAL->lpD3DDevice->BeginScene(); \r
-\r
-#endif\r
-}\r
-/*===========================================================================*/\r
-/*  This function is a very thin wrapper for the D3D call 'SetRenderState'.  */\r
-/* Using this function requires all the types to be defined by including the */\r
-/* D3D header file.                                                          */\r
-/*                                                                           */\r
-/*  TODO:  would be much better to get ride of all these calls per VBRender. */\r
-/*        I feel I should get this call into SetRenderStates() the RenderVB. */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void SetStateHAL( PMESAD3DSHARED pShared, DWORD dwType, DWORD dwState )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-\r
-#ifdef D3D_DEBUG   \r
-  HRESULT              rc;\r
-\r
-  DPF(( DBG_FUNC, "SetStateHAL();" ));\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )\r
-    return;\r
-\r
-  rc = pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "SetRenderState ->", ErrorStringD3D(rc) );\r
-  }\r
-\r
-#else\r
-  pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );\r
-#endif\r
-}\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "D3DHAL.h"
+/*===========================================================================*/
+/*  This function clears the context bound to the supplied shared context.   */
+/* The function takes the D3D flags D3DCLEAR_TARGET, D3DCLEAR_STENCIL and    */
+/* D3DCLEAR_ZBUFFER.  Set bAll to TRUE for a full clear else supply the coord*/
+/* of the rect to be cleared relative to the window.  The color is always a  */
+/* 32bit value (RGBA).  Fill in the z-value and stencil if needed.           */
+/*                                                                           */
+/*  TODO: this can be redone to be called by Mesa directly.                  */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void ClearHAL( PMESAD3DSHARED pShared, DWORD dwFlags, BOOL bAll, int x, int y, int cx, int cy, DWORD dwColor, float zv, DWORD dwStencil )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+  D3DRECT              d3dRect;
+
+#ifdef D3D_DEBUG
+  HRESULT              rc;
+
+  DPF(( DBG_FUNC, "CleaHAL();" ));
+
+  /* Make sure we have enough info. */
+  if ( (pHAL == NULL) || (pHAL->lpViewport == NULL) )
+    return;
+#endif
+
+  if ( bAll )
+  {
+    /* I assume my viewport is valid. */
+    d3dRect.lX1 = pShared->rectV.left;
+    d3dRect.lY1 = pShared->rectV.top;
+    d3dRect.lX2 = pShared->rectV.right;
+    d3dRect.lY2 = pShared->rectV.bottom;
+  }
+  else
+  {
+    d3dRect.lX1 = pShared->rectV.left + x;
+    d3dRect.lY1 = pShared->rectV.top  + y;
+    d3dRect.lX2 = d3dRect.lX1 + cx;
+    d3dRect.lY2 = d3dRect.lY1 + cy;
+  }
+
+#ifdef D3D_DEBUG
+  rc = pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "Clear2 ->", ErrorStringD3D(rc) );
+  }
+#else
+  pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
+#endif
+}
+/*===========================================================================*/
+/*  Well this is the guts of it all.  Here we rasterize the primitives that  */
+/* are in their final form.  OpenGL has done all the lighting, transfomations*/
+/* and clipping at this point.                                               */
+/*                                                                           */
+/* TODO:  I'm not sure if I want to bother to check for errors on this call. */
+/*       The overhead kills me...                                            */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+
+#ifdef D3D_DEBUG
+  HRESULT              rc;      
+
+  DPF(( DBG_FUNC, "DrawPrimitveHAL();" ));
+
+  /* Make sure we have enough info. */
+  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
+    return;
+
+  DPF(( DBG_PRIM_INFO, "DP( %d )", dwCount ));
+
+  rc = pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
+                                                                D3DFVF_TLVERTEX,
+                                                                (LPVOID)pVertices,
+                                                                dwCount, 
+                                                                (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "DrawPrimitive ->", ErrorStringD3D(rc) );
+  }
+#else
+  pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
+                                                        D3DFVF_TLVERTEX,
+                                                        (LPVOID)pVertices,
+                                                        dwCount, 
+                                                        (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
+#endif
+}
+/*===========================================================================*/
+/*  This call will handle the swapping of the buffers.  Now I didn't bother  */
+/* to support single buffered so this will be used for glFlush() as its all  */
+/* the same.  So first we do an EndScene as we are always considered to be in*/
+/* a BeginScene because when we leave we do a BeginScene.  Now note that when*/
+/* the context is created in the first place we do a BeginScene also just to */
+/* get things going.  The call will use either Flip/blt based on the type of */
+/* surface was created for rendering.                                        */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void SwapBuffersHAL( PMESAD3DSHARED pShared )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+
+#ifdef D3D_DEBUG
+  HRESULT              rc;      
+
+  DPF(( DBG_FUNC, "SwapBuffersHAL();" ));
+  DPF(( DBG_ALL_PROFILE, "=================SWAP===================" ));
+
+  /* Make sure we have enough info. */
+  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
+    return;
+
+  /* Make sure we have enough info. */
+  if ( pHAL->lpDDSPrimary != NULL )
+  {
+    rc = pHAL->lpD3DDevice->EndScene();   
+    if ( FAILED(rc) )
+    {
+        RIP( pHAL, "EndScene ->", ErrorStringD3D(rc) );
+    }
+    if ( pShared->bFlipable )
+    {
+        DPF(( DBG_CNTX_PROFILE, "Swap->FLIP" ));
+        rc = pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
+    }
+    else
+    {
+        DPF(( DBG_CNTX_PROFILE, "Swap->Blt" ));
+        rc = pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
+    }
+    if ( FAILED(rc) )
+    {
+        RIP( pHAL, "Blt (RENDER/PRIMARY) ->", ErrorStringD3D(rc) );
+    }
+
+    rc = pHAL->lpD3DDevice->BeginScene(); 
+    if ( FAILED(rc) )
+    {
+        RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );
+    }
+  }
+#else
+  pHAL->lpD3DDevice->EndScene();   
+
+  if ( pShared->bFlipable )
+    pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
+  else
+    pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
+
+  pHAL->lpD3DDevice->BeginScene(); 
+
+#endif
+}
+/*===========================================================================*/
+/*  This function is a very thin wrapper for the D3D call 'SetRenderState'.  */
+/* Using this function requires all the types to be defined by including the */
+/* D3D header file.                                                          */
+/*                                                                           */
+/*  TODO:  would be much better to get ride of all these calls per VBRender. */
+/*        I feel I should get this call into SetRenderStates() the RenderVB. */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void SetStateHAL( PMESAD3DSHARED pShared, DWORD dwType, DWORD dwState )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+
+#ifdef D3D_DEBUG   
+  HRESULT              rc;
+
+  DPF(( DBG_FUNC, "SetStateHAL();" ));
+
+  /* Make sure we have enough info. */
+  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
+    return;
+
+  rc = pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "SetRenderState ->", ErrorStringD3D(rc) );
+  }
+
+#else
+  pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );
+#endif
+}
+
+
+
+
+
+
+
+
index e6ff8645611b67aaa3f3dddd36b228be630db340..39855b65fa95e28d7c082218b0bb0c79c34ce2dd 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "d3dText.h"\r
-\r
-/*=============================================================================\r
-\r
-       1     \r
-     ------\r
-    |      | \r
-  6 |      | 2\r
-    |  7   |\r
-     ------  \r
-    |      |\r
-  5 |      | 3\r
-    |      |\r
-     ------ \r
-       4 \r
-\r
-           TL_0                TR_0\r
-TLL            TL_1            TR_1    TRR\r
-\r
-MLL_0   ML_0           MR_0    MRR_0\r
-MLL_1   ML_1           MR_1    MRR_1\r
-\r
-BLL            BL_0            BR_0    BRR\r
-        BL_1           BR_1\r
-\r
-=============================================================================*/\r
-\r
-#define TLL            0\r
-#define TRR            1\r
-#define TL_0   2\r
-#define TL_1   3\r
-#define TR_0   4\r
-#define TR_1   5\r
-\r
-#define        MLL_0   6\r
-#define        MLL_1   7\r
-#define        MRR_0   8\r
-#define        MRR_1   9\r
-\r
-#define        ML_0    10\r
-#define        ML_1    11\r
-#define        MR_0    12\r
-#define        MR_1    13\r
-\r
-#define        BL_0    14\r
-#define        BL_1    15\r
-#define        BR_0    16\r
-#define        BR_1    17\r
-#define        BLL             18\r
-#define        BRR             19\r
-\r
-#define        BIT1    0x00000001\r
-#define        BIT2    0x00000002\r
-#define        BIT3    0x00000004\r
-#define        BIT4    0x00000008\r
-#define        BIT5    0x00000010\r
-#define        BIT6    0x00000020\r
-#define        BIT7    0x00000040\r
-\r
-#define TOP            BIT4\r
-#define MIDDLE         BIT7\r
-#define BOTTOM         BIT1\r
-#define TLEFT          BIT5\r
-#define BLEFT          BIT6\r
-#define LEFT           (TLEFT|BLEFT)\r
-#define TRIGHT         BIT3\r
-#define BRIGHT         BIT2\r
-#define RIGHT          (TRIGHT|BRIGHT)\r
-#define ALL            0xFFFFFFFF\r
-\r
-/*===========================================================================*/\r
-/*  This is the static array that will map the ASCII value of the character  */\r
-/* being draw to the bit mask that will be scan converted to the LED display.*/\r
-/*===========================================================================*/\r
-DWORD  textBitMasks[] = \r
-{\r
-  0xFFFFFFFF, // 000\r
-  0xFFFFFFFF, // 001\r
-  0xFFFFFFFF, // 002\r
-  0xFFFFFFFF, // 003  \r
-  0xFFFFFFFF, // 004\r
-  0xFFFFFFFF, // 005\r
-  0xFFFFFFFF, // 006\r
-  0xFFFFFFFF, // 007  \r
-  0xFFFFFFFF, // 008\r
-  0xFFFFFFFF, // 009\r
-  0xFFFFFFFF, // 010\r
-  0xFFFFFFFF, // 011\r
-  0xFFFFFFFF, // 012\r
-  0xFFFFFFFF, // 013\r
-  0xFFFFFFFF, // 014\r
-  0xFFFFFFFF, // 015\r
-  0xFFFFFFFF, // 016\r
-  0xFFFFFFFF, // 017\r
-  0xFFFFFFFF, // 018\r
-  0xFFFFFFFF, // 019\r
-  0xFFFFFFFF, // 020\r
-  0xFFFFFFFF, // 021\r
-  0xFFFFFFFF, // 022\r
-  0xFFFFFFFF, // 023 \r
-  0xFFFFFFFF, // 024\r
-  0xFFFFFFFF, // 025\r
-  0xFFFFFFFF, // 026\r
-  0xFFFFFFFF, // 027\r
-  0xFFFFFFFF, // 028\r
-  0xFFFFFFFF, // 029\r
-  0xFFFFFFFF, // 030\r
-  0XFFFFFFFF, // 031 \r
-  0x00000000, // 032 'SPC'\r
-  0xFFFFFFFF, // 033\r
-  0xFFFFFFFF, // 034\r
-  0xFFFFFFFF, // 035\r
-  0xFFFFFFFF, // 036\r
-  0xFFFFFFFF, // 037\r
-  0xFFFFFFFF, // 038\r
-  0xFFFFFFFF, // 039\r
-  0xFFFFFFFF, // 040\r
-  0xFFFFFFFF, // 041\r
-  0xFFFFFFFF, // 042\r
-  0xFFFFFFFF, // 043\r
-  0xFFFFFFFF, // 044\r
-  0xFFFFFFFF, // 045\r
-  0xFFFFFFFF, // 046\r
-  0xFFFFFFFF, // 047 \r
-  (ALL &~ MIDDLE),                     // 048  '0'\r
-  (RIGHT),                                     // 049  '1'\r
-  (ALL &~ TLEFT &~ BRIGHT), // 050     '2'\r
-  (ALL &~ LEFT),                       // 051  '3'\r
-  (TLEFT | MIDDLE | RIGHT), // 052     '4'\r
-  (ALL &~ TRIGHT &~ BLEFT), // 053     '5'\r
-  (ALL &~ TRIGHT),                     // 054  '6'\r
-  (TOP | RIGHT),                       // 055  '7'\r
-  (ALL),                                       // 056  '8'\r
-  (ALL &~ BOTTOM &~ BLEFT), // 057     '9'\r
-  0xFFFFFFFF, // 058\r
-  0xFFFFFFFF, // 059\r
-  0xFFFFFFFF, // 060\r
-  0XFFFFFFFF, // 061\r
-  0xFFFFFFFF, // 062\r
-  0xFFFFFFFF, // 063\r
-  0xFFFFFFFF, // 064\r
-  (ALL &~ BOTTOM),                     // 065  'A'\r
-  (ALL),                                       // 066  'B'\r
-  (TOP | LEFT | BOTTOM),       // 067  'C'\r
-  (ALL &~ MIDDLE),                     // 068  'D'\r
-  (ALL &~ RIGHT),                      // 069  'E'\r
-  (LEFT | TOP | MIDDLE),       // 070  'F'\r
-  0x00000000,                                  // 071  'G'\r
-  (ALL &~ TOP &~ BOTTOM),      // 072  'H'\r
-  (RIGHT),                                     // 073  'I'\r
-  (RIGHT | BOTTOM),                    // 074  'J'\r
-  0x00000000,                                  // 075  'K'\r
-  (LEFT | BOTTOM),                     // 076  'L'\r
-  0x00000000,                          // 088  'M'\r
-  0x00000000,                          // 089  'N'\r
-  (ALL &~ MIDDLE),             // 090  'O'\r
-  (ALL &~ BRIGHT &~ BOTTOM),// 091     'P'\r
-  0x00000000,                          // 092  'Q'\r
-  0x00000000,                          // 093  'R'\r
-  (ALL &~ TRIGHT &~ BLEFT),    // 094  'S'\r
-  0X00000000,                          // 095  'T'\r
-  (LEFT | RIGHT | BOTTOM),  // 096     'U'\r
-  0x00000000,                          // 097  'V'\r
-  0x00000000,                          // 098  'W'\r
-  0x00000000,                          // 099  'X'\r
-  0x00000000,                                  // 1000 'Z'\r
-  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 100 \r
-  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 104 \r
-  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 108 \r
-  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 112 \r
-  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 116 \r
-  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 120 \r
-  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF   // 124 \r
-};\r
-\r
-#define        CT      1.0f\r
-#define        CX      7.0f\r
-#define        CY      13.0f\r
-#define CM     ((CY-(CT*3.0f))/2.0f)\r
-\r
-float lCoords[][2] = \r
-{\r
-  /* Top outsides. */\r
-  { 0,                 (CY-CT) },              \r
-  { CX,                (CY-CT) },\r
-\r
-  /* Top Line. */\r
-  { CT,                CY },\r
-  { CT,                (CY-CT) },\r
-  { (CX-CT),   CY },\r
-  { (CX-CT),   (CY-CT) },\r
-\r
-  /* Middle outsides. */\r
-  { 0.0f,              (CT+CM+CT) },\r
-  { 0.0f,              (CT+CM) },\r
-  { CX,                        (CT+CM+CT) },\r
-  { CX,                        (CT+CM) },\r
-\r
-  /* Middle Line. */\r
-  { CT,                        (CT+CM+CT) },   \r
-  { CT,                        (CT+CM) },      \r
-  { (CX-CT),   (CT+CM+CT) },\r
-  { (CX-CT),   (CT+CM) },\r
-\r
-  /* Bottom line. */\r
-  { CT,                        CT },\r
-  { CT,                        0.0f },\r
-  { (CX-CT),   CT },\r
-  { (CX-CT),   0.0f },\r
-\r
-  /* Bottom outsides. */\r
-  { 0.0f,              CT},\r
-  { CX,                        CT }\r
-};\r
-\r
-static int     ConvertCharacter( char *c, int cIndex,  PD3DFONTMETRICS pfntMetrics );\r
-\r
-D3DTLVERTEX TextVertices[MAX_VERTICES];\r
-/*===========================================================================*/\r
-/*  When we attach I will zero out the whole D3D vertex buffer I'm using for */\r
-/* the text.  This way I don't need to set all the redundant values.  I also */\r
-/* set all the oow values to 1 as I will be doing direct rendering.          */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-extern "C" BOOL InitD3DText( void )\r
-{\r
-  int  index;\r
-\r
-  /* Set the D3D Vertex Buffer up once so we don't do redundant changes. */\r
-  memset( &TextVertices[0], 0, sizeof(TextVertices) );\r
-  for( index = 0; index < MAX_VERTICES; index++ )\r
-       TextVertices[index].rhw = D3DVAL( 1.0 );\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function takes a single character and draw it using the supplied    */\r
-/* fontmetrics structure.                                                    */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void d3dTextDrawString( char *pszString, int x, int y, PD3DFONTMETRICS pfntMetrics )\r
-{\r
-  int  cIndex,\r
-            nIndex,\r
-            index;\r
-  float        cWidth = CX,\r
-            cHeight = CY;\r
-\r
-  /*  Find the max width/height of a character and add the spacing so */\r
-  /* that we can use this value to calculate the x,y of the character.*/\r
-  cWidth  = (cWidth  * pfntMetrics->fntXScale)  + pfntMetrics->fntXSpacing;\r
-  cHeight = (cHeight * pfntMetrics->fntYScale) + pfntMetrics->fntYSpacing;\r
-\r
-  /* Walk the string.  This must be NULL terminated. */\r
-  for( cIndex = 0, nIndex = 0; *pszString; pszString++, cIndex = nIndex, x++ )\r
-  {\r
-       /* Convert the character and get the index into the text vertex buffer. */\r
-       nIndex = ConvertCharacter( &pszString[0], cIndex, pfntMetrics );\r
-       if ( (nIndex - cIndex) > 2 )\r
-    {\r
-         /* Modify the text vertex buffer based on the fntMetrics structure. */\r
-         for( index = cIndex; index < nIndex; index++ )\r
-         {\r
-               /* Scale the character. */\r
-               TextVertices[index].sx  *= pfntMetrics->fntXScale;\r
-               TextVertices[index].sy   *= pfntMetrics->fntYScale;\r
-               \r
-               /* Move the character. */\r
-               TextVertices[index].sx  += (cWidth*x);\r
-               TextVertices[index].sy   += (cHeight*y);\r
-\r
-               /* Set the color. */\r
-               TextVertices[index].color = pfntMetrics->dwColor;\r
-         }\r
-       }\r
-  }\r
-\r
-  if ( nIndex < 3 )\r
-       return;\r
-\r
-  /* Set the states that slim things down. */\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_CULLMODE,                   D3DCULL_NONE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_FILLMODE,                   D3DFILL_SOLID );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZENABLE,                    FALSE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZWRITEENABLE ,              FALSE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHATESTENABLE,    FALSE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHABLENDENABLE,   FALSE );\r
-\r
-  /* Blast them baby... */\r
-  pfntMetrics->lpD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST,\r
-                                                                                  D3DFVF_TLVERTEX,\r
-                                                                                  (LPVOID)&TextVertices[0],\r
-                                                                                  nIndex, \r
-                                                                                  (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );\r
-}\r
-/*===========================================================================*/\r
-/*  This function takes a single character and draw it directly to the screen*/\r
-/* unsing the supplied fntMetrics structure.  The character will be drawn at */\r
-/* the supplied x,y.  The x,y position is relative to the top left and uses  */\r
-/* the spacing in the fntMetrics structure.                                  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void d3dTextDrawCharacter( char *c, int x, int y, PD3DFONTMETRICS pfntMetrics )\r
-{\r
-  int  cIndex = 0,\r
-           index;\r
-  float        cWidth = CX,\r
-           cHeight = CY;\r
-\r
-  /* Convert the character and get the index into the text vertex buffer. */\r
-  cIndex = ConvertCharacter( c, 0, pfntMetrics );\r
-  if ( cIndex < 3 )\r
-       return;\r
-\r
-  /*  Find the max width/height of a character and add the spacing so */\r
-  /* that we can use this value to calculate the x,y of the character.*/\r
-  cWidth  = (cWidth  * pfntMetrics->fntXScale)  + pfntMetrics->fntXSpacing;\r
-  cHeight = (cHeight * pfntMetrics->fntYScale) + pfntMetrics->fntYSpacing;\r
-\r
-  /* Modify the text vertex buffer based on the fntMetrics structure. */\r
-  for( index = 0; index < cIndex; index++ )\r
-  {\r
-       /* Scale the character. */\r
-       TextVertices[index].sx  *= pfntMetrics->fntXScale;\r
-       TextVertices[index].sy   *= pfntMetrics->fntYScale;\r
-\r
-       /* Move the character. */\r
-       TextVertices[index].sx  += (cWidth*x);\r
-       TextVertices[index].sy   += (cHeight*y);\r
-\r
-       /* Set the color. */\r
-       TextVertices[index].color = pfntMetrics->dwColor;\r
-  }\r
\r
-\r
-  /* Set the states that slim things down. */\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_CULLMODE,                   D3DCULL_NONE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_FILLMODE,                   D3DFILL_SOLID );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZENABLE,                    FALSE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZWRITEENABLE ,              FALSE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHATESTENABLE,    FALSE );\r
-  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHABLENDENABLE,   FALSE );\r
-\r
-  /* Blast them baby... */\r
-  pfntMetrics->lpD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST,\r
-                                                                                  D3DFVF_TLVERTEX,\r
-                                                                                  (LPVOID)&TextVertices[0],\r
-                                                                                  cIndex, \r
-                                                                                  (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );\r
-}\r
-/*===========================================================================*/\r
-/*  This function takes a single character and draw it using the supplied    */\r
-/* fontmetrics structure.                                                    */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static int     ConvertCharacter( char *c, int cIndex,  PD3DFONTMETRICS pfntMetrics )\r
-{\r
-  DWORD        asciiChar = (int)(*c);\r
-\r
-  /* Handle the TOP line. */\r
-  if ( textBitMasks[asciiChar] & BIT1 )\r
-  { \r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TL_0][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_0][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_0][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_0][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TL_1][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_1][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TL_0][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_0][1] );\r
-  }\r
-\r
-  /* Handle the TOP/BOTTOM RIGHT lines. */\r
-  //  if ( textBitMasks[index] & (BIT2|BIT3) )\r
-  if ( 1 == 0 )\r
-  {\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TRR][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TRR][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[BRR][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[BRR][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[BRR][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[BRR][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[BR_0][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_0][1] );\r
-    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );\r
-    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );\r
-  }\r
-  else \r
-  {\r
-       if ( textBitMasks[asciiChar] & BIT2 )\r
-       {\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[TR_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TR_1][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[TRR][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TRR][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MRR_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MRR_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MRR_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MRR_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MR_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MR_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[TR_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TR_1][1] );\r
-       }\r
-       if ( textBitMasks[asciiChar] & BIT3 )\r
-       {\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MR_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MR_1][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MRR_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MRR_1][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[BRR][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BRR][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[BRR][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BRR][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[BR_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BR_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MR_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MR_1][1] );\r
-       }\r
-  }\r
-\r
-  /* Handle the TOP/BOTTOM LEFT lines. */\r
-  //  if ( textBitMasks[asciiChar] & (BIT5|BIT6) )\r
-  if ( 1 == 0 )\r
-  {\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[TLL][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[TL_1][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_1][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BLL][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BLL][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[TLL][1] );\r
-  }\r
-  else \r
-  {\r
-       if ( textBitMasks[asciiChar] & BIT5 )\r
-       {\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MLL_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MLL_1][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[ML_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[ML_1][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[BL_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BL_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[BL_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BL_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[BLL][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BLL][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MLL_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MLL_1][1] );\r
-       }\r
-       if ( textBitMasks[asciiChar] & BIT6 )\r
-       {\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[TLL][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TLL][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[TL_1][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TL_1][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[ML_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[ML_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[ML_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[ML_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[MLL_0][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MLL_0][1] );\r
-         TextVertices[cIndex].sx       = D3DVAL( lCoords[TLL][0] );\r
-         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TLL][1] );\r
-       }\r
-  }\r
-\r
-  /* Handle the MIDDLE line. */\r
-  if ( textBitMasks[asciiChar] & BIT7 )\r
-  {\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_0][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[MR_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_0][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_1][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_1][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[ML_1][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_1][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_0][1] );\r
-  }\r
-\r
-  /* Handle the BOTTOM line. */\r
-  if ( textBitMasks[asciiChar] & BIT4 )\r
-  {\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BR_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_0][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BR_1][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_1][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BR_1][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_1][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_1][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_1][1] );\r
-       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );\r
-       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );\r
-  }\r
-  \r
-  return cIndex;\r
-}\r
-\r
-#undef CM\r
-#undef CY\r
-#undef CX\r
-#undef CT\r
-\r
-#undef TLL\r
-#undef TRR\r
-#undef TL_0\r
-#undef TL_1\r
-#undef TR_0\r
-#undef TR_1\r
-\r
-#undef MLL_0\r
-#undef MLL_1\r
-#undef MRR_0\r
-#undef MRR_1\r
-\r
-#undef ML_0\r
-#undef ML_1\r
-#undef MR_0\r
-#undef MR_1\r
-\r
-#undef BL_0\r
-#undef BL_1\r
-#undef BR_0\r
-#undef BR_1\r
-#undef BLL\r
-#undef BRR\r
-\r
-#undef BIT1\r
-#undef BIT2\r
-#undef BIT3\r
-#undef BIT4\r
-#undef BIT5\r
-#undef BIT6\r
-#undef BIT7\r
-\r
-#undef TOP\r
-#undef MIDDLE\r
-#undef BOTTOM\r
-#undef TLEFT\r
-#undef BLEFT\r
-#undef LEFT\r
-#undef TRIGHT\r
-#undef BRIGHT\r
-#undef RIGHT\r
-#undef ALL\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "d3dText.h"
+
+/*=============================================================================
+
+       1     
+     ------
+    |      | 
+  6 |      | 2
+    |  7   |
+     ------  
+    |      |
+  5 |      | 3
+    |      |
+     ------ 
+       4 
+
+           TL_0                TR_0
+TLL            TL_1            TR_1    TRR
+
+MLL_0   ML_0           MR_0    MRR_0
+MLL_1   ML_1           MR_1    MRR_1
+
+BLL            BL_0            BR_0    BRR
+        BL_1           BR_1
+
+=============================================================================*/
+
+#define TLL            0
+#define TRR            1
+#define TL_0   2
+#define TL_1   3
+#define TR_0   4
+#define TR_1   5
+
+#define        MLL_0   6
+#define        MLL_1   7
+#define        MRR_0   8
+#define        MRR_1   9
+
+#define        ML_0    10
+#define        ML_1    11
+#define        MR_0    12
+#define        MR_1    13
+
+#define        BL_0    14
+#define        BL_1    15
+#define        BR_0    16
+#define        BR_1    17
+#define        BLL             18
+#define        BRR             19
+
+#define        BIT1    0x00000001
+#define        BIT2    0x00000002
+#define        BIT3    0x00000004
+#define        BIT4    0x00000008
+#define        BIT5    0x00000010
+#define        BIT6    0x00000020
+#define        BIT7    0x00000040
+
+#define TOP            BIT4
+#define MIDDLE         BIT7
+#define BOTTOM         BIT1
+#define TLEFT          BIT5
+#define BLEFT          BIT6
+#define LEFT           (TLEFT|BLEFT)
+#define TRIGHT         BIT3
+#define BRIGHT         BIT2
+#define RIGHT          (TRIGHT|BRIGHT)
+#define ALL            0xFFFFFFFF
+
+/*===========================================================================*/
+/*  This is the static array that will map the ASCII value of the character  */
+/* being draw to the bit mask that will be scan converted to the LED display.*/
+/*===========================================================================*/
+DWORD  textBitMasks[] = 
+{
+  0xFFFFFFFF, // 000
+  0xFFFFFFFF, // 001
+  0xFFFFFFFF, // 002
+  0xFFFFFFFF, // 003  
+  0xFFFFFFFF, // 004
+  0xFFFFFFFF, // 005
+  0xFFFFFFFF, // 006
+  0xFFFFFFFF, // 007  
+  0xFFFFFFFF, // 008
+  0xFFFFFFFF, // 009
+  0xFFFFFFFF, // 010
+  0xFFFFFFFF, // 011
+  0xFFFFFFFF, // 012
+  0xFFFFFFFF, // 013
+  0xFFFFFFFF, // 014
+  0xFFFFFFFF, // 015
+  0xFFFFFFFF, // 016
+  0xFFFFFFFF, // 017
+  0xFFFFFFFF, // 018
+  0xFFFFFFFF, // 019
+  0xFFFFFFFF, // 020
+  0xFFFFFFFF, // 021
+  0xFFFFFFFF, // 022
+  0xFFFFFFFF, // 023 
+  0xFFFFFFFF, // 024
+  0xFFFFFFFF, // 025
+  0xFFFFFFFF, // 026
+  0xFFFFFFFF, // 027
+  0xFFFFFFFF, // 028
+  0xFFFFFFFF, // 029
+  0xFFFFFFFF, // 030
+  0XFFFFFFFF, // 031 
+  0x00000000, // 032 'SPC'
+  0xFFFFFFFF, // 033
+  0xFFFFFFFF, // 034
+  0xFFFFFFFF, // 035
+  0xFFFFFFFF, // 036
+  0xFFFFFFFF, // 037
+  0xFFFFFFFF, // 038
+  0xFFFFFFFF, // 039
+  0xFFFFFFFF, // 040
+  0xFFFFFFFF, // 041
+  0xFFFFFFFF, // 042
+  0xFFFFFFFF, // 043
+  0xFFFFFFFF, // 044
+  0xFFFFFFFF, // 045
+  0xFFFFFFFF, // 046
+  0xFFFFFFFF, // 047 
+  (ALL &~ MIDDLE),                     // 048  '0'
+  (RIGHT),                                     // 049  '1'
+  (ALL &~ TLEFT &~ BRIGHT), // 050     '2'
+  (ALL &~ LEFT),                       // 051  '3'
+  (TLEFT | MIDDLE | RIGHT), // 052     '4'
+  (ALL &~ TRIGHT &~ BLEFT), // 053     '5'
+  (ALL &~ TRIGHT),                     // 054  '6'
+  (TOP | RIGHT),                       // 055  '7'
+  (ALL),                                       // 056  '8'
+  (ALL &~ BOTTOM &~ BLEFT), // 057     '9'
+  0xFFFFFFFF, // 058
+  0xFFFFFFFF, // 059
+  0xFFFFFFFF, // 060
+  0XFFFFFFFF, // 061
+  0xFFFFFFFF, // 062
+  0xFFFFFFFF, // 063
+  0xFFFFFFFF, // 064
+  (ALL &~ BOTTOM),                     // 065  'A'
+  (ALL),                                       // 066  'B'
+  (TOP | LEFT | BOTTOM),       // 067  'C'
+  (ALL &~ MIDDLE),                     // 068  'D'
+  (ALL &~ RIGHT),                      // 069  'E'
+  (LEFT | TOP | MIDDLE),       // 070  'F'
+  0x00000000,                                  // 071  'G'
+  (ALL &~ TOP &~ BOTTOM),      // 072  'H'
+  (RIGHT),                                     // 073  'I'
+  (RIGHT | BOTTOM),                    // 074  'J'
+  0x00000000,                                  // 075  'K'
+  (LEFT | BOTTOM),                     // 076  'L'
+  0x00000000,                          // 088  'M'
+  0x00000000,                          // 089  'N'
+  (ALL &~ MIDDLE),             // 090  'O'
+  (ALL &~ BRIGHT &~ BOTTOM),// 091     'P'
+  0x00000000,                          // 092  'Q'
+  0x00000000,                          // 093  'R'
+  (ALL &~ TRIGHT &~ BLEFT),    // 094  'S'
+  0X00000000,                          // 095  'T'
+  (LEFT | RIGHT | BOTTOM),  // 096     'U'
+  0x00000000,                          // 097  'V'
+  0x00000000,                          // 098  'W'
+  0x00000000,                          // 099  'X'
+  0x00000000,                                  // 1000 'Z'
+  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 100 
+  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 104 
+  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 108 
+  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 112 
+  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 116 
+  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,  // 120 
+  0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF   // 124 
+};
+
+#define        CT      1.0f
+#define        CX      7.0f
+#define        CY      13.0f
+#define CM     ((CY-(CT*3.0f))/2.0f)
+
+float lCoords[][2] = 
+{
+  /* Top outsides. */
+  { 0,                 (CY-CT) },              
+  { CX,                (CY-CT) },
+
+  /* Top Line. */
+  { CT,                CY },
+  { CT,                (CY-CT) },
+  { (CX-CT),   CY },
+  { (CX-CT),   (CY-CT) },
+
+  /* Middle outsides. */
+  { 0.0f,              (CT+CM+CT) },
+  { 0.0f,              (CT+CM) },
+  { CX,                        (CT+CM+CT) },
+  { CX,                        (CT+CM) },
+
+  /* Middle Line. */
+  { CT,                        (CT+CM+CT) },   
+  { CT,                        (CT+CM) },      
+  { (CX-CT),   (CT+CM+CT) },
+  { (CX-CT),   (CT+CM) },
+
+  /* Bottom line. */
+  { CT,                        CT },
+  { CT,                        0.0f },
+  { (CX-CT),   CT },
+  { (CX-CT),   0.0f },
+
+  /* Bottom outsides. */
+  { 0.0f,              CT},
+  { CX,                        CT }
+};
+
+static int     ConvertCharacter( char *c, int cIndex,  PD3DFONTMETRICS pfntMetrics );
+
+D3DTLVERTEX TextVertices[MAX_VERTICES];
+/*===========================================================================*/
+/*  When we attach I will zero out the whole D3D vertex buffer I'm using for */
+/* the text.  This way I don't need to set all the redundant values.  I also */
+/* set all the oow values to 1 as I will be doing direct rendering.          */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+extern "C" BOOL InitD3DText( void )
+{
+  int  index;
+
+  /* Set the D3D Vertex Buffer up once so we don't do redundant changes. */
+  memset( &TextVertices[0], 0, sizeof(TextVertices) );
+  for( index = 0; index < MAX_VERTICES; index++ )
+       TextVertices[index].rhw = D3DVAL( 1.0 );
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This function takes a single character and draw it using the supplied    */
+/* fontmetrics structure.                                                    */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void d3dTextDrawString( char *pszString, int x, int y, PD3DFONTMETRICS pfntMetrics )
+{
+  int  cIndex,
+            nIndex,
+            index;
+  float        cWidth = CX,
+            cHeight = CY;
+
+  /*  Find the max width/height of a character and add the spacing so */
+  /* that we can use this value to calculate the x,y of the character.*/
+  cWidth  = (cWidth  * pfntMetrics->fntXScale)  + pfntMetrics->fntXSpacing;
+  cHeight = (cHeight * pfntMetrics->fntYScale) + pfntMetrics->fntYSpacing;
+
+  /* Walk the string.  This must be NULL terminated. */
+  for( cIndex = 0, nIndex = 0; *pszString; pszString++, cIndex = nIndex, x++ )
+  {
+       /* Convert the character and get the index into the text vertex buffer. */
+       nIndex = ConvertCharacter( &pszString[0], cIndex, pfntMetrics );
+       if ( (nIndex - cIndex) > 2 )
+    {
+         /* Modify the text vertex buffer based on the fntMetrics structure. */
+         for( index = cIndex; index < nIndex; index++ )
+         {
+               /* Scale the character. */
+               TextVertices[index].sx  *= pfntMetrics->fntXScale;
+               TextVertices[index].sy   *= pfntMetrics->fntYScale;
+               
+               /* Move the character. */
+               TextVertices[index].sx  += (cWidth*x);
+               TextVertices[index].sy   += (cHeight*y);
+
+               /* Set the color. */
+               TextVertices[index].color = pfntMetrics->dwColor;
+         }
+       }
+  }
+
+  if ( nIndex < 3 )
+       return;
+
+  /* Set the states that slim things down. */
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_CULLMODE,                   D3DCULL_NONE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_FILLMODE,                   D3DFILL_SOLID );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZENABLE,                    FALSE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZWRITEENABLE ,              FALSE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHATESTENABLE,    FALSE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHABLENDENABLE,   FALSE );
+
+  /* Blast them baby... */
+  pfntMetrics->lpD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST,
+                                                                                  D3DFVF_TLVERTEX,
+                                                                                  (LPVOID)&TextVertices[0],
+                                                                                  nIndex, 
+                                                                                  (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
+}
+/*===========================================================================*/
+/*  This function takes a single character and draw it directly to the screen*/
+/* unsing the supplied fntMetrics structure.  The character will be drawn at */
+/* the supplied x,y.  The x,y position is relative to the top left and uses  */
+/* the spacing in the fntMetrics structure.                                  */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void d3dTextDrawCharacter( char *c, int x, int y, PD3DFONTMETRICS pfntMetrics )
+{
+  int  cIndex = 0,
+           index;
+  float        cWidth = CX,
+           cHeight = CY;
+
+  /* Convert the character and get the index into the text vertex buffer. */
+  cIndex = ConvertCharacter( c, 0, pfntMetrics );
+  if ( cIndex < 3 )
+       return;
+
+  /*  Find the max width/height of a character and add the spacing so */
+  /* that we can use this value to calculate the x,y of the character.*/
+  cWidth  = (cWidth  * pfntMetrics->fntXScale)  + pfntMetrics->fntXSpacing;
+  cHeight = (cHeight * pfntMetrics->fntYScale) + pfntMetrics->fntYSpacing;
+
+  /* Modify the text vertex buffer based on the fntMetrics structure. */
+  for( index = 0; index < cIndex; index++ )
+  {
+       /* Scale the character. */
+       TextVertices[index].sx  *= pfntMetrics->fntXScale;
+       TextVertices[index].sy   *= pfntMetrics->fntYScale;
+
+       /* Move the character. */
+       TextVertices[index].sx  += (cWidth*x);
+       TextVertices[index].sy   += (cHeight*y);
+
+       /* Set the color. */
+       TextVertices[index].color = pfntMetrics->dwColor;
+  }
+
+  /* Set the states that slim things down. */
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_CULLMODE,                   D3DCULL_NONE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_FILLMODE,                   D3DFILL_SOLID );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZENABLE,                    FALSE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ZWRITEENABLE ,              FALSE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHATESTENABLE,    FALSE );
+  pfntMetrics->lpD3DDevice->SetRenderState( D3DRENDERSTATE_ALPHABLENDENABLE,   FALSE );
+
+  /* Blast them baby... */
+  pfntMetrics->lpD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST,
+                                                                                  D3DFVF_TLVERTEX,
+                                                                                  (LPVOID)&TextVertices[0],
+                                                                                  cIndex, 
+                                                                                  (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
+}
+/*===========================================================================*/
+/*  This function takes a single character and draw it using the supplied    */
+/* fontmetrics structure.                                                    */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static int     ConvertCharacter( char *c, int cIndex,  PD3DFONTMETRICS pfntMetrics )
+{
+  DWORD        asciiChar = (int)(*c);
+
+  /* Handle the TOP line. */
+  if ( textBitMasks[asciiChar] & BIT1 )
+  { 
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TL_0][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_0][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_0][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_0][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TL_1][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_1][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TL_0][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_0][1] );
+  }
+
+  /* Handle the TOP/BOTTOM RIGHT lines. */
+  //  if ( textBitMasks[index] & (BIT2|BIT3) )
+  if ( 1 == 0 )
+  {
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TRR][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TRR][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[BRR][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[BRR][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[BRR][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[BRR][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[BR_0][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_0][1] );
+    TextVertices[cIndex].sx    = D3DVAL( lCoords[TR_1][0] );
+    TextVertices[cIndex++].sy= D3DVAL( lCoords[TR_1][1] );
+  }
+  else 
+  {
+       if ( textBitMasks[asciiChar] & BIT2 )
+       {
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[TR_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TR_1][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[TRR][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TRR][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MRR_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MRR_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MRR_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MRR_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MR_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MR_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[TR_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TR_1][1] );
+       }
+       if ( textBitMasks[asciiChar] & BIT3 )
+       {
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MR_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MR_1][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MRR_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MRR_1][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[BRR][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BRR][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[BRR][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BRR][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[BR_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BR_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MR_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MR_1][1] );
+       }
+  }
+
+  /* Handle the TOP/BOTTOM LEFT lines. */
+  //  if ( textBitMasks[asciiChar] & (BIT5|BIT6) )
+  if ( 1 == 0 )
+  {
+       TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[TLL][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[TL_1][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[TL_1][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BLL][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BLL][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[TLL][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[TLL][1] );
+  }
+  else 
+  {
+       if ( textBitMasks[asciiChar] & BIT5 )
+       {
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MLL_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MLL_1][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[ML_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[ML_1][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[BL_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BL_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[BL_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BL_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[BLL][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[BLL][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MLL_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MLL_1][1] );
+       }
+       if ( textBitMasks[asciiChar] & BIT6 )
+       {
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[TLL][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TLL][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[TL_1][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TL_1][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[ML_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[ML_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[ML_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[ML_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[MLL_0][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[MLL_0][1] );
+         TextVertices[cIndex].sx       = D3DVAL( lCoords[TLL][0] );
+         TextVertices[cIndex++].sy     = D3DVAL( lCoords[TLL][1] );
+       }
+  }
+
+  /* Handle the MIDDLE line. */
+  if ( textBitMasks[asciiChar] & BIT7 )
+  {
+       TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_0][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[MR_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_0][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_1][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[MR_1][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[MR_1][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[ML_1][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_1][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[ML_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[ML_0][1] );
+  }
+
+  /* Handle the BOTTOM line. */
+  if ( textBitMasks[asciiChar] & BIT4 )
+  {
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BR_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_0][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BR_1][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_1][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BR_1][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BR_1][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_1][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_1][1] );
+       TextVertices[cIndex].sx = D3DVAL( lCoords[BL_0][0] );
+       TextVertices[cIndex++].sy= D3DVAL( lCoords[BL_0][1] );
+  }
+  
+  return cIndex;
+}
+
+#undef CM
+#undef CY
+#undef CX
+#undef CT
+
+#undef TLL
+#undef TRR
+#undef TL_0
+#undef TL_1
+#undef TR_0
+#undef TR_1
+
+#undef MLL_0
+#undef MLL_1
+#undef MRR_0
+#undef MRR_1
+
+#undef ML_0
+#undef ML_1
+#undef MR_0
+#undef MR_1
+
+#undef BL_0
+#undef BL_1
+#undef BR_0
+#undef BR_1
+#undef BLL
+#undef BRR
+
+#undef BIT1
+#undef BIT2
+#undef BIT3
+#undef BIT4
+#undef BIT5
+#undef BIT6
+#undef BIT7
+
+#undef TOP
+#undef MIDDLE
+#undef BOTTOM
+#undef TLEFT
+#undef BLEFT
+#undef LEFT
+#undef TRIGHT
+#undef BRIGHT
+#undef RIGHT
+#undef ALL
index ac9d2621fcc62c9bdd36919ff3e9423773d972eb..a6600cab02c4caffdc2b9d513561e3aacf2d1895 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "D3DHAL.h"\r
-/*===========================================================================*/\r
-/* Local function prototypes.                                                */\r
-/*===========================================================================*/\r
-static void UpdateTexture( PTM_OBJECT pTMObj, BOOL bVideo, RECT *pRect, UCHAR *pixels );\r
-static BOOL LoadTextureInVideo( PMESAD3DHAL pHAL, PTM_OBJECT pTMObj );\r
-static BOOL FreeTextureMemory( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject );\r
-static BOOL DestroyTextureObject( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject );\r
-HRESULT CALLBACK EnumPFHook( LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext );\r
-/*===========================================================================*/\r
-/*  This function will simply set the top of stack to NULL.  I only used it  */\r
-/* just incase I want to add something later.                                */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE.                                                             */\r
-/*===========================================================================*/\r
-BOOL InitTMgrHAL( PMESAD3DHAL pHAL )\r
-{\r
-  DPF(( DBG_FUNC, "InitTMgrHAL();" ));\r
-\r
-  /* Be clean my friend. */\r
-  pHAL->pTMList = NULL;\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will walk the Texture Managers linked list and destroy all */\r
-/* surfaces (SYSTEM/VIDEO).  The texture objects themselves also will be     */\r
-/* freed.                                                                    */\r
-/*  NOTE: this is per/context.                                               */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void TermTMgrHAL( PMESAD3DHAL pHAL )\r
-{\r
-  DPF(( DBG_FUNC, "TermTMgrHAL();" ));\r
-\r
-  if ( pHAL && pHAL->pTMList )\r
-  {\r
-    /* Destroy the surface and remove the TMO from the stack. */\r
-    while( DestroyTextureObject(pHAL,NULL) );\r
-\r
-    /* Be clean my friend. */\r
-    pHAL->pTMList = NULL;\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This function is a HACK as I don't know how I can disable a texture with-*/\r
-/* out booting it out.  Is there know state change?                          */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void DisableTMgrHAL( PMESAD3DSHARED pShared )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-\r
-  DPF(( DBG_FUNC, "DisableTMgrHAL();" ));\r
-\r
-  /* Check too see that we have a valid context. */\r
-  if ( (pHAL == NULL) && (pHAL->lpD3DDevice != NULL)  ) \r
-  {\r
-    DPF(( DBG_TXT_WARN, "Null HAL/Direct3D Device!" ));\r
-    return;\r
-  }\r
-\r
-  // TODO: This is a hack to shut off textures.\r
-  pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-}\r
-/*===========================================================================*/\r
-/*  This function is the only entry into the TextureManager that Mesa/wgl    */\r
-/* will see.  It uses a dwAction to specify what we are doing.  I did this as*/\r
-/* depending on the cards resources the action taken can change.             */\r
-/*  When this function is called we will always search the Texture Managers  */\r
-/* linked list (per context remember) and try and find a structure that has  */\r
-/* the same dwName.  If we have a match we pull it out of the list and put it*/\r
-/* at the top of the list (TOL).  If we don't find one then we create a struc*/\r
-/* and put it a TOL.  This TOL idea makes for some caching as we will always */\r
-/* destroy Texture Surfaces from the bottom up...                            */\r
-/*  All texture objects at this point will create a texture surface in System*/\r
-/* memory (SMEM).  Then we will copy the Mesa texture into the surface using */\r
-/* the 'pixel' struc to get the translation info.  So now this means that all*/\r
-/* textures that Mesa gives me I will have a Surface with a copy.  If Mesa   */\r
-/* changes the texture the I update the surface in (SMEM).                   */\r
-/*  Now we have a texture struc and a Texture Surface in SMEM.  At this point*/\r
-/* we create another surface on the card (VMEM).  Finally we blt from the    */\r
-/* SMEM to the VMEM and set the texture as current.  Why do I need two? First*/\r
-/* this solves square textures.  If the cards CAPS is square textures only   */\r
-/* then I change the dimensions of the VMEM surface and the blt solves it for*/\r
-/* me.  Second it saves me from filling D3D textures over and over if the    */\r
-/* card needs to be creating and destroying surfaces because of low memory.  */\r
-/*  The surface in SMEM is expected to work always.  When a surface has to be*/\r
-/* created in VMEM then we put it in a loop that tries to create the surface.*/\r
-/* If we create the surface ok then we brake from the loop.  If we fail then */\r
-/* we will call 'FreeTextureMemory' that will return TRUE/FALSE as to whether*/\r
-/* memory was freed.  If memory was freed then we can try again. If no memory*/\r
-/* was freed then it just can't fit.                                         */\r
-/*  'FreeTextureMemory' will find the end of the list and start freeing VMEM */\r
-/* (never SMEM) surfaces that are not locked.                                */\r
-/*  BIND - when we bind and there is a texture struct with a texture surface */\r
-/* in VMEM then we just make it current.  If we have a struct and a surface  */\r
-/* in SMEM but no VMEM surface then we create the surface in VMEM and blt    */\r
-/* from the SMEM surface.  If we have nothing its just like a creation...    */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-extern "C" BOOL CreateTMgrHAL( PMESAD3DSHARED pShared, DWORD dwName, int level, DWORD dwRequestFlags, \r
-                                                RECT *rectDirty, DWORD dwWidth, DWORD dwHeight, DWORD dwAction, void *pPixels )\r
-{\r
-  PMESAD3DHAL          pHAL = (PMESAD3DHAL)pShared;\r
-  PTM_OBJECT           pTMObj,\r
-                    pTemp;\r
-  DDSURFACEDESC2       ddsd2;\r
-  HRESULT              rc;\r
-\r
-\r
-  DPF(( DBG_FUNC, "CreateTMgrHAL();" ));\r
-\r
-  DPF(( DBG_TXT_INFO, "Texture:" ));\r
-  DPF(( DBG_TXT_INFO, "cx: %d cy: %d", dwWidth, dwHeight ));\r
-  DPF(( DBG_TXT_INFO, "Rect:" ));\r
-  if ( rectDirty )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "x0: %d y0: %d", rectDirty->left, rectDirty->top ));\r
-    DPF(( DBG_TXT_INFO, "x1: %d y1: %d", rectDirty->right, rectDirty->bottom ));\r
-  }\r
-\r
-  /* Check too see that we have a valid context. */\r
-  if ( (pHAL == NULL) && (pHAL->lpD3DDevice != NULL)  ) \r
-  {\r
-    DPF(( DBG_TXT_WARN, "Null HAL/Direct3D Device!" ));\r
-    return FALSE;\r
-  }\r
-\r
-  /*=================================================*/\r
-  /* See if we can find this texture object by name. */\r
-  /*=================================================*/\r
-  for( pTMObj = pHAL->pTMList; pTMObj && (pTMObj->dwName != dwName); pTMObj = pTMObj->next );\r
-\r
-  /*=========================================================*/\r
-  /* Allocate a new object if we didn't get a matching name. */\r
-  /*=========================================================*/\r
-  if ( pTMObj == NULL )\r
-  {\r
-    pTMObj = (PTM_OBJECT)ALLOC( sizeof(TM_OBJECT) );\r
-    if ( pTMObj == NULL )\r
-        return FALSE;\r
-    memset( pTMObj, 0, sizeof(TM_OBJECT) );\r
-\r
-    /* Put the object at the beginning of the list. */\r
-    pTMObj->next = pHAL->pTMList;\r
-    if ( pTMObj->next )\r
-    {\r
-        pTemp = pTMObj->next;\r
-        pTemp->prev = pTMObj;\r
-    }\r
-    pHAL->pTMList = pTMObj;\r
-  }\r
-  else\r
-  {\r
-    /*===============================================================*/\r
-    /* Make some caching happen by pulling this object to the front. */ \r
-    /*===============================================================*/\r
-    if ( pHAL->pTMList != pTMObj )\r
-    {\r
-        /* Pull the object out of the list. */\r
-        if ( pTMObj->prev )\r
-        {\r
-          pTemp = pTMObj->prev;\r
-          pTemp->next = pTMObj->next;\r
-        }\r
-        if ( pTMObj->next )\r
-      {\r
-          pTemp = pTMObj->next;\r
-          pTemp->prev = pTMObj->prev;\r
-        }\r
-\r
-        pTMObj->prev = NULL;\r
-        pTMObj->next = NULL;\r
-\r
-        /* Put the object at the front of the list. */\r
-        pTMObj->next = pHAL->pTMList;\r
-        if ( pTMObj->next )\r
-      {\r
-          pTemp = pTMObj->next;\r
-          pTemp->prev = pTMObj;\r
-        }\r
-        pHAL->pTMList = pTMObj;\r
-    }\r
-  }\r
-\r
-  /*========================================================*/\r
-  /* If we are doing BIND and the texture is in VID memory. */\r
-  /*========================================================*/\r
-  if ( (dwAction == TM_ACTION_BIND) && pTMObj->lpDDS_Video  )\r
-  {\r
-    DPF(( DBG_TXT_PROFILE, "Cache HIT (%d)", dwName ));\r
-          \r
-    /* Make this the current texture. */\r
-    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );\r
-    if ( FAILED(rc) )\r
-    {\r
-        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));\r
-        pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-        return FALSE;\r
-    }  \r
-\r
-    return TRUE;\r
-  }    \r
-\r
-  /*=================================================================*/\r
-  /* If we are doing BIND and the texture is at least in SYS memory. */\r
-  /*=================================================================*/\r
-  if ( (dwAction == TM_ACTION_BIND) && pTMObj->lpDDS_System  )\r
-  {\r
-    DPF(( DBG_TXT_PROFILE, "Cache MISS (%d)", dwName ));\r
-\r
-    /* Create the texture on the card. */\r
-    rc = LoadTextureInVideo( pHAL, pTMObj );\r
-    if ( rc == FALSE )\r
-        return FALSE;\r
-          \r
-    /* Make this the current texture. */\r
-    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );\r
-    if ( FAILED(rc) )\r
-    {\r
-        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));\r
-        pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-        return FALSE;\r
-    }  \r
-\r
-    return TRUE;\r
-  }    \r
-\r
-  /*=========================================================*/\r
-  /* If we are doing UPDATE then try in VID first for speed. */\r
-  /*=========================================================*/\r
-  if ( (dwAction == TM_ACTION_UPDATE) && pTMObj->lpDDS_Video &&\r
-         !(pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY) )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Fix the SubTexture update Leigh!" ));\r
-\r
-    /* Update the texture on the card. */\r
-    UpdateTexture( pTMObj, TRUE, rectDirty, (UCHAR *)pPixels );\r
-\r
-    /* We updated the texture in VID so kill the SYS so we know its dirty. */\r
-    if ( pTMObj->lpDDS_System )\r
-    {\r
-        DPF(( DBG_TXT_INFO, "Release texture (SYS)" ));\r
-        DX_RESTORE( pTMObj->lpDDS_System );\r
-        pTMObj->lpDDS_System->Release();\r
-        pTMObj->lpDDS_System = NULL;\r
-    }\r
-\r
-    /* Make this the current texture. */\r
-    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );\r
-    if ( FAILED(rc) )\r
-    {\r
-        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));\r
-        pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-        return FALSE;\r
-    }  \r
-\r
-    return TRUE;\r
-  }\r
-\r
-  /*===========================================================*/\r
-  /* If we are doing UPDATE then try in SYS still gives speed. */\r
-  /*===========================================================*/\r
-  if ( (dwAction == TM_ACTION_UPDATE) && pTMObj->lpDDS_System )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Fix the SubTexture update Leigh!" ));\r
-\r
-    /* Update the texture in SYS. */\r
-    UpdateTexture( pTMObj, FALSE, NULL, (UCHAR *)pPixels );\r
-\r
-    /* We updated the SYS texture only so now blt to the VID. */\r
-    rc = LoadTextureInVideo( pHAL, pTMObj );\r
-    if ( rc == FALSE )\r
-        return FALSE;\r
-\r
-    /* Make this the current texture. */\r
-    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );\r
-    if ( FAILED(rc) )\r
-    {\r
-        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));\r
-        pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-        return FALSE;\r
-    }  \r
-\r
-    return TRUE;\r
-  }\r
-\r
-  /*  At this point we have a valid Texture Manager Object with updated */\r
-  /* links.  We now need to create or update a texture surface that is  */\r
-  /* in system memory.  Every texture has a copy in system so we can use*/\r
-  /* blt to solve problems with textures allocated on the card (square  */\r
-  /* only textures, pixelformats...).                                   */\r
-  \r
-  // TODO: make support for update also.  Dirty rectangle basicly...\r
-\r
-  /* Kill the interface if we have one no matter what. */\r
-  if ( pTMObj->lpD3DTexture2 )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release Texture2" ));\r
-    pTMObj->lpD3DTexture2->Release();\r
-    pTMObj->lpD3DTexture2 = NULL;\r
-  }    \r
-\r
-  /* Kill the system surface. TODO: should try to get the SubIMage going again */\r
-  if ( pTMObj->lpDDS_System )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release texture (SYS)" ));\r
-    DX_RESTORE( pTMObj->lpDDS_System );\r
-    pTMObj->lpDDS_System->Release();\r
-    pTMObj->lpDDS_System = NULL;\r
-  }\r
-\r
-  /* Kill the Video surface. TODO: need some reuse system... */\r
-  if ( pTMObj->lpDDS_Video )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release texture (VID)" ));\r
-    DX_RESTORE( pTMObj->lpDDS_Video );\r
-    pTMObj->lpDDS_Video->Release();\r
-    pTMObj->lpDDS_Video = NULL;\r
-  }\r
-\r
-  /*================================================================*/\r
-  /* Translate the the Mesa/OpenGL pixel channels to the D3D flags. */\r
-  /*================================================================*/\r
-  switch( dwRequestFlags )\r
-  {\r
-    case GL_ALPHA:\r
-        dwRequestFlags = DDPF_ALPHA; \r
-        DPF(( DBG_TXT_WARN, "GL_ALPHA not supported!)" ));\r
-        return FALSE;\r
-        \r
-    case GL_INTENSITY:\r
-    case GL_LUMINANCE:\r
-        DPF(( DBG_TXT_WARN, "GL_INTENSITY/GL_LUMINANCE not supported!)" ));\r
-        dwRequestFlags = DDPF_LUMINANCE; \r
-        return FALSE;\r
-        \r
-    case GL_LUMINANCE_ALPHA:\r
-        DPF(( DBG_TXT_WARN, "GL_LUMINANCE_ALPHA not supported!)" ));\r
-        dwRequestFlags = DDPF_LUMINANCE | DDPF_ALPHAPIXELS; \r
-        return FALSE;\r
-        \r
-    case GL_RGB:\r
-        DPF(( DBG_TXT_INFO, "Texture -> GL_RGB" ));\r
-        dwRequestFlags = DDPF_RGB; \r
-        break;\r
-\r
-    case GL_RGBA:\r
-        DPF(( DBG_TXT_INFO, "Texture -> GL_RGBA" ));\r
-        dwRequestFlags = DDPF_RGB | DDPF_ALPHAPIXELS; \r
-        break;\r
-  }\r
-\r
-  /*==============================*/\r
-  /* Populate the texture object. */\r
-  /*==============================*/\r
-  pTMObj->dwName      = dwName;\r
-  pTMObj->lpD3DDevice = pHAL->lpD3DDevice;\r
-  pTMObj->dwFlags     = dwRequestFlags;\r
-  if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Convert to Square..." ));\r
-    pTMObj->dwSHeight  = dwHeight;\r
-    pTMObj->dwSWidth   = dwWidth;\r
-\r
-    /* Shrink non-square textures. */\r
-    pTMObj->dwVHeight  = (dwHeight > dwWidth) ? dwWidth : dwHeight;\r
-    pTMObj->dwVWidth   = (dwHeight > dwWidth) ? dwWidth : dwHeight;\r
-  }\r
-  else\r
-  {\r
-    pTMObj->dwSHeight  = dwHeight;\r
-    pTMObj->dwSWidth   = dwWidth;\r
-    pTMObj->dwVHeight  = dwHeight;\r
-    pTMObj->dwVWidth   = dwWidth;\r
-  }\r
-\r
-  /*========================*/  \r
-  /* Create SYSTEM surface. */\r
-  /*========================*/\r
-\r
-  /*  Request a surface in system memory. */\r
-  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );\r
-  ddsd2.dwSize          = sizeof( DDSURFACEDESC2 );\r
-  ddsd2.dwWidth         = pTMObj->dwSWidth;\r
-  ddsd2.dwHeight        = pTMObj->dwSHeight;\r
-  ddsd2.dwFlags         = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;\r
-  ddsd2.ddsCaps.dwCaps  = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY;\r
-  ddsd2.ddsCaps.dwCaps2 = 0L;\r
-  memset( &ddsd2.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT) );\r
-  ddsd2.ddpfPixelFormat.dwSize  = sizeof( DDPIXELFORMAT );\r
-  ddsd2.ddpfPixelFormat.dwFlags = dwRequestFlags;\r
-  rc = pHAL->lpD3DDevice->EnumTextureFormats( EnumPFHook, &ddsd2.ddpfPixelFormat );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "EnumerTextureFormats (SYSTEM)->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Create the surface using the enumerated pixelformat. */\r
-  rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pTMObj->lpDDS_System, NULL );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "CreateSurface (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Solve the pixel mapping info using the surface pixelformat. */\r
-  Solve8BitChannelPixelFormat( &ddsd2.ddpfPixelFormat, &pTMObj->pixel );\r
-\r
-  /*===================================================================*/\r
-  /* Fill the texture using the PixelInfo structure to do the mapping. */\r
-  /*===================================================================*/\r
-  UpdateTexture( pTMObj, FALSE, NULL, (UCHAR *)pPixels );\r
-\r
-  /*=======================*/\r
-  /* Create VIDEO surface. */\r
-  /*=======================*/\r
-  rc = LoadTextureInVideo( pHAL, pTMObj );\r
-  if ( rc == FALSE )\r
-    return FALSE;\r
-\r
-  /* Make this the current texture. */\r
-  rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );\r
-  if ( FAILED(rc) )\r
-  {\r
-    DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));\r
-    pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-    return FALSE;\r
-  }\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will handle the creation and destruction of the texture    */\r
-/* surfaces on the card.  Using the dw'V'Width/Height dimensions the call    */\r
-/* try and create the texture on the card and keep using FreeTextureMemory   */\r
-/* until the surace can be created.  Once the surface is created we get the  */\r
-/* interface that we will use to make it the current texture.  I didn't put  */\r
-/* the code to make the texture current in this function as BIND needs to    */\r
-/* use the same code and this function doesn't always get called when we do a*/\r
-/* bind.                                                                     */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-static BOOL    LoadTextureInVideo( PMESAD3DHAL pHAL, PTM_OBJECT pTMObj )\r
-{\r
-  DDSURFACEDESC2       ddsd2;\r
-  HRESULT              rc;\r
-\r
-  DPF(( DBG_FUNC, "LoadTextureInVideo();" ));\r
-\r
-  /* Kill the interface if we have one no matter what. */\r
-  if ( pTMObj->lpD3DTexture2 )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release Texture2" ));\r
-    pTMObj->lpD3DTexture2->Release();\r
-    pTMObj->lpD3DTexture2 = NULL;\r
-  }    \r
-\r
-  /* Kill the Video surface. TODO: need some reuse system... */\r
-  if ( pTMObj->lpDDS_Video )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release texture (VID)" ));\r
-    DX_RESTORE( pTMObj->lpDDS_Video );\r
-    pTMObj->lpDDS_Video->Release();\r
-    pTMObj->lpDDS_Video = NULL;\r
-  }\r
-\r
-  /*  Request a surface in Video memory. */\r
-  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );\r
-  ddsd2.dwSize          = sizeof( DDSURFACEDESC2 );\r
-  ddsd2.dwWidth         = pTMObj->dwVWidth;\r
-  ddsd2.dwHeight        = pTMObj->dwVHeight;\r
-  ddsd2.dwFlags         = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;\r
-  ddsd2.ddsCaps.dwCaps  = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY;\r
-  ddsd2.ddsCaps.dwCaps2 = 0L;\r
-  memset( &ddsd2.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT) );\r
-  ddsd2.ddpfPixelFormat.dwSize  = sizeof( DDPIXELFORMAT );\r
-  ddsd2.ddpfPixelFormat.dwFlags = pTMObj->dwFlags;\r
-  rc = pHAL->lpD3DDevice->EnumTextureFormats( EnumPFHook, &ddsd2.ddpfPixelFormat );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "EnumerTextureFormats ->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Make sure we lock so we don't nuke this texture trying to free memory for it. */\r
-  pTMObj->bLock = TRUE;\r
-\r
-  /*  Start a loop that will free all textures until we have created the texture */\r
-  /* surface or we can't free up more memory.                                    */\r
-  do\r
-  {\r
-    /* Try to create the texture surface. */\r
-    rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pTMObj->lpDDS_Video, NULL );\r
-    if ( !FAILED(rc) )\r
-        break;\r
-\r
-    DPF(( DBG_TXT_INFO, "Free Texture Memory" ));\r
-\r
-    /* DestroyTexture will return TRUE if a surface was freed. */\r
-  } while( FreeTextureMemory(pHAL,NULL) );\r
-\r
-  /* Make sure we unlock or we won't be able to nuke the TMO later. */\r
-  pTMObj->bLock = FALSE;\r
-\r
-  /* Did we create a valid texture surface? */\r
-  if ( FAILED(rc) )\r
-  {\r
-    DPF(( DBG_TXT_WARN, "Failed to load texture" ));\r
-    pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-    return FALSE;\r
-  }\r
-\r
-  DX_RESTORE( pTMObj->lpDDS_System );\r
-  DX_RESTORE( pTMObj->lpDDS_Video );\r
-\r
-  DPF(( DBG_TXT_INFO, "Texture Blt SYSTEM -> VID" ));\r
-\r
-  /* Now blt the texture in system memory to the card. */\r
-  rc = pTMObj->lpDDS_Video->Blt( NULL, pTMObj->lpDDS_System, NULL, DDBLT_WAIT, NULL );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( pHAL, "Blt (TEXTURE) ->", ErrorStringD3D(rc) );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Get the Texture interface that is used to render with. */\r
-  pTMObj->lpDDS_Video->QueryInterface( IID_IDirect3DTexture2, (void **)&pTMObj->lpD3DTexture2 ); \r
-  if ( pTMObj->lpD3DTexture2 == NULL )\r
-  {\r
-    DPF(( DBG_TXT_WARN, "Failed QueryTextureInterface" ));\r
-    pHAL->lpD3DDevice->SetTexture( 0, NULL );\r
-    return FALSE;\r
-  }\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  If this function gets a texture object struc then we will try and free   */\r
-/* it.  If we get a NULL then we will search from the bottom up and free one */\r
-/* VMEM surface.  I can only free when the surface isn't locked and of course*/\r
-/* there must be a VMEM surface.  We never free SMEM surfaces as that isn't  */\r
-/* the point.                                                                */\r
-/* TODO: should have a pointer to the bottom of the stack really.            */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static BOOL FreeTextureMemory( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject )\r
-{\r
-  PTM_OBJECT   pCurrent;\r
-  BOOL         bFreed = FALSE;\r
-\r
-  DPF(( DBG_FUNC, "FreeTextureMemory();" ));\r
-  DPF(( DBG_TXT_WARN, "FREE TEXTURE!" ));\r
-\r
-  /* Just to be safe. */\r
-  if ( !pHAL || !pHAL->pTMList )\r
-  {\r
-    DPF(( DBG_TXT_WARN, "FreeTextureMemory() -> NULL pHAL/pHAL->pTMList" ));\r
-    return FALSE;\r
-  }\r
-\r
-  /* Free the last texture in the list. */\r
-  if ( pTMObject == NULL )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Free Last texture in cache" ));\r
-\r
-    /* Find the last texture object. */\r
-    for( pCurrent = pHAL->pTMList; pCurrent->next; pCurrent = pCurrent->next );\r
-\r
-    /* Now backup until we find a texture on the card. */\r
-    while( pCurrent && (pCurrent->lpDDS_Video == NULL) && (pCurrent->bLock == FALSE) )\r
-        pCurrent = pCurrent->prev;\r
-\r
-    /* Didn't find anything. */\r
-    if ( pCurrent == NULL )\r
-    {\r
-        DPF(( DBG_TXT_INFO, "No texture memory freed" ));\r
-        return FALSE;\r
-    }\r
-  }\r
-  else\r
-  {\r
-    /* See if we can find this texture object. */\r
-    for( pCurrent = pHAL->pTMList; pCurrent && (pCurrent != pTMObject); pCurrent = pCurrent->next );\r
-\r
-    /* Didn't find anything. */\r
-    if ( pCurrent == NULL )\r
-    {\r
-        DPF(( DBG_TXT_INFO, "Requested texture to be freed NOT FOUND" ));\r
-        return FALSE;\r
-    }\r
-  }\r
-\r
-  /* Can't free this baby. */\r
-  if ( pCurrent->bLock == TRUE )\r
-  {\r
-    DPF(( DBG_TXT_WARN, "Requested texture LOCKED" ));\r
-    return FALSE;\r
-  }\r
-\r
-  /* Free the texture memory. */\r
-  if ( pCurrent->lpD3DTexture2 )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release Texture2" ));\r
-    pCurrent->lpD3DTexture2->Release();\r
-    pCurrent->lpD3DTexture2 = NULL;\r
-    bFreed = TRUE;\r
-  }\r
-  if ( pCurrent->lpDDS_Video )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release texture (VID):" ));\r
-    DPF(( DBG_TXT_INFO, "dwName: %d", pCurrent->dwName ));\r
-    DPF(( DBG_TXT_INFO, "cx: %d, cy: %d", pCurrent->dwVWidth, pCurrent->dwVHeight ));\r
-    pCurrent->lpDDS_Video->Release();\r
-    pCurrent->lpDDS_Video = NULL;\r
-    bFreed = TRUE;\r
-  }\r
-  \r
-  return bFreed;\r
-}\r
-/*===========================================================================*/\r
-/*  This function searches the linked list of texture objects in the supplied*/\r
-/* D3Dwrapper structure.  If it finds a match it will free it and pull it out*/\r
-/* of the linked list.  The function works on the bases of a matching pointer*/\r
-/* to the object (not matching content).                                     */\r
-/*  If the function gets passed a NULL then we want to free the last texture */\r
-/* object in the list.  Used in a loop to destory all.                       */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-static BOOL DestroyTextureObject( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject )\r
-{\r
-  PTM_OBJECT   pCurrent;\r
-\r
-  DPF(( DBG_FUNC, "DestoryTextureObject();" ));\r
-\r
-  /* Just to be safe. */\r
-  if ( !pHAL || !pHAL->pTMList )\r
-  {\r
-    DPF(( DBG_TXT_WARN, "DestroyTextureObject() -> NULL pHAL/pHAL->pTMList" ));\r
-    return FALSE;\r
-  }\r
-\r
-  /* Free the last texture in the list. */\r
-  if ( pTMObject == NULL )\r
-  {\r
-    /* Find the last texture object. */\r
-    for( pCurrent = pHAL->pTMList; pCurrent->next; pCurrent = pCurrent->next );\r
-  }\r
-  else\r
-  {\r
-    /* See if we can find this texture object. */\r
-    for( pCurrent = pHAL->pTMList; pCurrent && (pCurrent != pTMObject); pCurrent = pCurrent->next );\r
-\r
-    /* Didn't find anything. */\r
-    if ( pCurrent == NULL )\r
-    {\r
-        DPF(( DBG_TXT_WARN, "No textures to be freed" ));\r
-        return FALSE;\r
-    }\r
-  }\r
-\r
-  /* Can't free this baby. */\r
-  if ( pCurrent->bLock == TRUE )\r
-  {\r
-    DPF(( DBG_TXT_WARN, "Requested texture to be freed LOCKED" ));\r
-    return FALSE;\r
-  }\r
-\r
-  /* Free the texture memory. */\r
-  if ( pCurrent->lpD3DTexture2 )\r
-  { \r
-    DPF(( DBG_TXT_INFO, "Release Texture2" ));\r
-    pCurrent->lpD3DTexture2->Release();\r
-    pCurrent->lpD3DTexture2 = NULL;\r
-  }\r
-  if ( pCurrent->lpDDS_Video )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release texture (VID):" ));\r
-    pCurrent->lpDDS_Video->Release();\r
-    pCurrent->lpDDS_Video = NULL;\r
-  }\r
-  if ( pCurrent->lpDDS_System )\r
-  {\r
-    DPF(( DBG_TXT_INFO, "Release texture (SYS):" ));\r
-    pCurrent->lpDDS_System->Release();\r
-    pCurrent->lpDDS_System = NULL;\r
-  }\r
-\r
-  /* Pull this texture out of the list. */\r
-  if ( pCurrent == pHAL->pTMList )\r
-    pHAL->pTMList = NULL;\r
-  if ( pCurrent->prev )\r
-    (pCurrent->prev)->next = pCurrent->next;\r
-  if ( pCurrent->next )\r
-    (pCurrent->next)->prev = pCurrent->prev;\r
-  FREE( pCurrent );\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function is the callback function that gets called when we are doing*/\r
-/* an enumeration of the texture formats supported by this device. The choice*/\r
-/* is made by checking to see if we have a match with the supplied D3D pixel-*/\r
-/* format.  So the enumeration has to pass a desired D3D PF as the user var. */\r
-/*===========================================================================*/\r
-/* RETURN: D3DENUMRET_OK, D3DENUMRET_CANCEL.                                 */\r
-/*===========================================================================*/\r
-static void UpdateTexture( PTM_OBJECT pTMObj, BOOL bVideo, RECT *pRect, UCHAR *pixels )\r
-{\r
-  LPDIRECTDRAWSURFACE4 lpDDS;\r
-  DDSURFACEDESC2               ddsd2;\r
-  DWORD                        srcPitch,\r
-                         dwHeight, \r
-                         dwWidth,\r
-                         dwCol,\r
-                         dwColor;\r
-  UCHAR                        *pSrc,\r
-                         *pSrcRow,\r
-                         *pDest,\r
-                         *pDestRow;\r
-  int                          rc;\r
-\r
-  // TODO:  Do I need to pass the h/w when its in the object!\r
-  DPF(( DBG_FUNC, "UpdateTexture();" ));\r
-\r
-  /* Get the surface pointer we are looking for. */\r
-  lpDDS = (bVideo) ? pTMObj->lpDDS_Video : pTMObj->lpDDS_System;\r
-\r
-  /*===================================================================*/\r
-  /* Fill the texture using the PixelInfo structure to do the mapping. */\r
-  /*===================================================================*/\r
-        \r
-  /* Get the surface pointer. */\r
-  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );\r
-  ddsd2.dwSize = sizeof(DDSURFACEDESC2);\r
-  rc = lpDDS->Lock( NULL, &ddsd2, DDLOCK_WAIT, NULL );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( NULL, "Lock (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) );\r
-    return;\r
-  }\r
-\r
-  /* For now we are only updating the system surface so use its dimensions. */\r
-  dwWidth  = (bVideo) ? pTMObj->dwVWidth : pTMObj->dwSWidth;\r
-  dwHeight = (bVideo) ? pTMObj->dwVHeight : pTMObj->dwSHeight;\r
-\r
-  /*  If we are updating the whole surface then the pDest/pSrc will */\r
-  /* always be the same.                                            */\r
-  if ( pRect == NULL )\r
-  {\r
-    pDest = (UCHAR *)ddsd2.lpSurface;\r
-    pSrc  = pixels;\r
-  }\r
-\r
-  /* Fill the texture surface based on the pixelformat flags. */\r
-  if ( pTMObj->dwFlags == (DDPF_RGB | DDPF_ALPHAPIXELS) )\r
-  {\r
-    srcPitch = dwWidth * 4;\r
-    if ( pRect )\r
-    {\r
-        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);\r
-        pSrc  = pixels + (pRect->top * dwWidth * 4) + (pRect->left * 4);\r
-        dwHeight = (pRect->bottom - pRect->top);\r
-        dwWidth = (pRect->right - pRect->left);\r
-    }\r
-\r
-    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )\r
-    {\r
-        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )\r
-      {\r
-          dwColor =  ( ((DWORD)(*(pSrc  ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );\r
-          dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.gScale)) << pTMObj->pixel.gShift );\r
-          dwColor |= ( ((DWORD)(*(pSrc+2) * pTMObj->pixel.bScale)) << pTMObj->pixel.bShift );\r
-          if ( pTMObj->pixel.aScale == -1.0 )\r
-               dwColor |= ( (*(pSrc+3) & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 );\r
-          else\r
-               dwColor |= ( ((DWORD)(*(pSrc+3) * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift );\r
-          memcpy( pDest, &dwColor, pTMObj->pixel.cb );\r
-          pDest += pTMObj->pixel.cb;\r
-          pSrc  += 4;\r
-        }\r
-    }\r
-  }\r
-  else if ( pTMObj->dwFlags == DDPF_RGB )\r
-  {\r
-    srcPitch = dwWidth * 3;\r
-    if ( pRect )\r
-    {\r
-        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);\r
-        pSrc  = pixels + (pRect->top * dwWidth * 3) + (pRect->left * 3);\r
-        dwHeight = (pRect->bottom - pRect->top);\r
-        dwWidth  = (pRect->right - pRect->left);\r
-    }\r
-\r
-    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )\r
-    {\r
-        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )\r
-      {\r
-          dwColor =  ( ((DWORD)(*(pSrc  ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );\r
-          dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.gScale)) << pTMObj->pixel.gShift );\r
-          dwColor |= ( ((DWORD)(*(pSrc+2) * pTMObj->pixel.bScale)) << pTMObj->pixel.bShift );\r
-          memcpy( pDest, &dwColor, pTMObj->pixel.cb );\r
-          pDest += pTMObj->pixel.cb;\r
-          pSrc  += 3;\r
-        }\r
-    }\r
-  }\r
-  else if ( pTMObj->dwFlags == (DDPF_LUMINANCE | DDPF_ALPHAPIXELS) )\r
-  {\r
-    srcPitch = dwWidth * 2;\r
-    if ( pRect )\r
-    {\r
-        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);\r
-        pSrc  = pixels + (pRect->top * dwWidth * 2) + (pRect->left * 2);\r
-        dwHeight = (pRect->bottom - pRect->top);\r
-        dwWidth  = (pRect->right - pRect->left);\r
-    }\r
-\r
-    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )\r
-    {\r
-        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )\r
-      {\r
-          dwColor =  ( ((DWORD)(*(pSrc  ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );\r
-          if ( pTMObj->pixel.aScale == -1.0 )\r
-               dwColor |= ( (*(pSrc+1) & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 );\r
-          else\r
-               dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift );\r
-          memcpy( pDest, &dwColor, pTMObj->pixel.cb );\r
-          pDest += pTMObj->pixel.cb;\r
-          pSrc  += 2;\r
-        }\r
-    }\r
-  }\r
-  else if ( pTMObj->dwFlags == DDPF_LUMINANCE )\r
-  {\r
-    srcPitch = dwWidth;\r
-    if ( pRect )\r
-    {\r
-        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);\r
-        pSrc  = pixels + (pRect->top * dwWidth) + (pRect->left);\r
-        dwHeight = (pRect->bottom - pRect->top);\r
-        dwWidth  = (pRect->right - pRect->left);\r
-    }\r
-\r
-    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )\r
-    {\r
-        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )\r
-      {\r
-          dwColor =  ( ((DWORD)(*pSrc * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );\r
-          memcpy( pDest, &dwColor, pTMObj->pixel.cb );\r
-          pDest += pTMObj->pixel.cb;\r
-          pSrc++;\r
-        }\r
-    }\r
-  }\r
-  else if ( pTMObj->dwFlags == DDPF_ALPHAPIXELS )\r
-  {\r
-    srcPitch = dwWidth;\r
-    if ( pRect )\r
-    {\r
-        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);\r
-        pSrc  = pixels + (pRect->top * dwWidth) + (pRect->left);\r
-        dwHeight = (pRect->bottom - pRect->top);\r
-        dwWidth  = (pRect->right - pRect->left);\r
-    }\r
-\r
-    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )\r
-    {\r
-        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )\r
-      {\r
-          if ( pTMObj->pixel.aScale == -1.0 )\r
-               dwColor = ( (*pSrc & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 );\r
-          else\r
-               dwColor = ( ((DWORD)(*pSrc * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift );\r
-          memcpy( pDest, &dwColor, pTMObj->pixel.cb );\r
-          pDest += pTMObj->pixel.cb;\r
-          pSrc++;\r
-        }\r
-    }\r
-  }\r
-\r
-  /* Unlock the surface. */\r
-  rc = lpDDS->Unlock( NULL );\r
-  if ( FAILED(rc) )\r
-  {\r
-    RIP( NULL, "Unlock (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) );\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This function is the callback function that gets called when we are doing*/\r
-/* an enumeration of the texture formats supported by this device. The choice*/\r
-/* is made by checking to see if we have a match with the supplied D3D pixel-*/\r
-/* format.  So the enumeration has to pass a desired D3D PF as the user var. */\r
-/*===========================================================================*/\r
-/* RETURN: D3DENUMRET_OK, D3DENUMRET_CANCEL.                                 */\r
-/*===========================================================================*/\r
-HRESULT CALLBACK EnumPFHook( LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext )\r
-{\r
-  LPDDPIXELFORMAT   lpDDPixFmtRequest = (LPDDPIXELFORMAT)lpContext;\r
-  PIXELINFO            pixel;\r
-\r
-  DPF(( DBG_FUNC, "EnumPFHook();" ));\r
-\r
-  if ( lpDDPixFmt->dwFlags == lpDDPixFmtRequest->dwFlags )\r
-  {\r
-    /* Are we looking for an alpha channel? */\r
-    if ( lpDDPixFmtRequest->dwFlags & DDPF_ALPHAPIXELS )\r
-    {\r
-        /* Try for something that has more then 1bits of Alpha. */\r
-        Solve8BitChannelPixelFormat( lpDDPixFmt, &pixel );\r
-        if ( pixel.aScale == -1.0 )\r
-        {\r
-          /* Save this format no matter what as its a match of sorts. */\r
-          memcpy( lpDDPixFmtRequest, lpDDPixFmt, sizeof(DDPIXELFORMAT) );\r
-          return D3DENUMRET_OK;\r
-        }\r
-    }\r
-\r
-    /* Save this format as its a good match. */\r
-    memcpy( lpDDPixFmtRequest, lpDDPixFmt, sizeof(DDPIXELFORMAT) );\r
-\r
-    /* We are happy at this point so lets leave. */\r
-    return D3DENUMRET_CANCEL;\r
-  }\r
-  \r
-  return D3DENUMRET_OK;\r
-}\r
-\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "D3DHAL.h"
+/*===========================================================================*/
+/* Local function prototypes.                                                */
+/*===========================================================================*/
+static void UpdateTexture( PTM_OBJECT pTMObj, BOOL bVideo, RECT *pRect, UCHAR *pixels );
+static BOOL LoadTextureInVideo( PMESAD3DHAL pHAL, PTM_OBJECT pTMObj );
+static BOOL FreeTextureMemory( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject );
+static BOOL DestroyTextureObject( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject );
+HRESULT CALLBACK EnumPFHook( LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext );
+/*===========================================================================*/
+/*  This function will simply set the top of stack to NULL.  I only used it  */
+/* just incase I want to add something later.                                */
+/*===========================================================================*/
+/* RETURN: TRUE.                                                             */
+/*===========================================================================*/
+BOOL InitTMgrHAL( PMESAD3DHAL pHAL )
+{
+  DPF(( DBG_FUNC, "InitTMgrHAL();" ));
+
+  /* Be clean my friend. */
+  pHAL->pTMList = NULL;
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This function will walk the Texture Managers linked list and destroy all */
+/* surfaces (SYSTEM/VIDEO).  The texture objects themselves also will be     */
+/* freed.                                                                    */
+/*  NOTE: this is per/context.                                               */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void TermTMgrHAL( PMESAD3DHAL pHAL )
+{
+  DPF(( DBG_FUNC, "TermTMgrHAL();" ));
+
+  if ( pHAL && pHAL->pTMList )
+  {
+    /* Destroy the surface and remove the TMO from the stack. */
+    while( DestroyTextureObject(pHAL,NULL) );
+
+    /* Be clean my friend. */
+    pHAL->pTMList = NULL;
+  }
+}
+/*===========================================================================*/
+/*  This function is a HACK as I don't know how I can disable a texture with-*/
+/* out booting it out.  Is there know state change?                          */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void DisableTMgrHAL( PMESAD3DSHARED pShared )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+
+  DPF(( DBG_FUNC, "DisableTMgrHAL();" ));
+
+  /* Check too see that we have a valid context. */
+  if ( (pHAL == NULL) && (pHAL->lpD3DDevice != NULL)  ) 
+  {
+    DPF(( DBG_TXT_WARN, "Null HAL/Direct3D Device!" ));
+    return;
+  }
+
+  // TODO: This is a hack to shut off textures.
+  pHAL->lpD3DDevice->SetTexture( 0, NULL );
+}
+/*===========================================================================*/
+/*  This function is the only entry into the TextureManager that Mesa/wgl    */
+/* will see.  It uses a dwAction to specify what we are doing.  I did this as*/
+/* depending on the cards resources the action taken can change.             */
+/*  When this function is called we will always search the Texture Managers  */
+/* linked list (per context remember) and try and find a structure that has  */
+/* the same dwName.  If we have a match we pull it out of the list and put it*/
+/* at the top of the list (TOL).  If we don't find one then we create a struc*/
+/* and put it a TOL.  This TOL idea makes for some caching as we will always */
+/* destroy Texture Surfaces from the bottom up...                            */
+/*  All texture objects at this point will create a texture surface in System*/
+/* memory (SMEM).  Then we will copy the Mesa texture into the surface using */
+/* the 'pixel' struc to get the translation info.  So now this means that all*/
+/* textures that Mesa gives me I will have a Surface with a copy.  If Mesa   */
+/* changes the texture the I update the surface in (SMEM).                   */
+/*  Now we have a texture struc and a Texture Surface in SMEM.  At this point*/
+/* we create another surface on the card (VMEM).  Finally we blt from the    */
+/* SMEM to the VMEM and set the texture as current.  Why do I need two? First*/
+/* this solves square textures.  If the cards CAPS is square textures only   */
+/* then I change the dimensions of the VMEM surface and the blt solves it for*/
+/* me.  Second it saves me from filling D3D textures over and over if the    */
+/* card needs to be creating and destroying surfaces because of low memory.  */
+/*  The surface in SMEM is expected to work always.  When a surface has to be*/
+/* created in VMEM then we put it in a loop that tries to create the surface.*/
+/* If we create the surface ok then we brake from the loop.  If we fail then */
+/* we will call 'FreeTextureMemory' that will return TRUE/FALSE as to whether*/
+/* memory was freed.  If memory was freed then we can try again. If no memory*/
+/* was freed then it just can't fit.                                         */
+/*  'FreeTextureMemory' will find the end of the list and start freeing VMEM */
+/* (never SMEM) surfaces that are not locked.                                */
+/*  BIND - when we bind and there is a texture struct with a texture surface */
+/* in VMEM then we just make it current.  If we have a struct and a surface  */
+/* in SMEM but no VMEM surface then we create the surface in VMEM and blt    */
+/* from the SMEM surface.  If we have nothing its just like a creation...    */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+extern "C" BOOL CreateTMgrHAL( PMESAD3DSHARED pShared, DWORD dwName, int level, DWORD dwRequestFlags, 
+                                                RECT *rectDirty, DWORD dwWidth, DWORD dwHeight, DWORD dwAction, void *pPixels )
+{
+  PMESAD3DHAL          pHAL = (PMESAD3DHAL)pShared;
+  PTM_OBJECT           pTMObj,
+                    pTemp;
+  DDSURFACEDESC2       ddsd2;
+  HRESULT              rc;
+
+
+  DPF(( DBG_FUNC, "CreateTMgrHAL();" ));
+
+  DPF(( DBG_TXT_INFO, "Texture:" ));
+  DPF(( DBG_TXT_INFO, "cx: %d cy: %d", dwWidth, dwHeight ));
+  DPF(( DBG_TXT_INFO, "Rect:" ));
+  if ( rectDirty )
+  {
+    DPF(( DBG_TXT_INFO, "x0: %d y0: %d", rectDirty->left, rectDirty->top ));
+    DPF(( DBG_TXT_INFO, "x1: %d y1: %d", rectDirty->right, rectDirty->bottom ));
+  }
+
+  /* Check too see that we have a valid context. */
+  if ( (pHAL == NULL) && (pHAL->lpD3DDevice != NULL)  ) 
+  {
+    DPF(( DBG_TXT_WARN, "Null HAL/Direct3D Device!" ));
+    return FALSE;
+  }
+
+  /*=================================================*/
+  /* See if we can find this texture object by name. */
+  /*=================================================*/
+  for( pTMObj = pHAL->pTMList; pTMObj && (pTMObj->dwName != dwName); pTMObj = pTMObj->next );
+
+  /*=========================================================*/
+  /* Allocate a new object if we didn't get a matching name. */
+  /*=========================================================*/
+  if ( pTMObj == NULL )
+  {
+    pTMObj = (PTM_OBJECT)ALLOC( sizeof(TM_OBJECT) );
+    if ( pTMObj == NULL )
+        return FALSE;
+    memset( pTMObj, 0, sizeof(TM_OBJECT) );
+
+    /* Put the object at the beginning of the list. */
+    pTMObj->next = pHAL->pTMList;
+    if ( pTMObj->next )
+    {
+        pTemp = pTMObj->next;
+        pTemp->prev = pTMObj;
+    }
+    pHAL->pTMList = pTMObj;
+  }
+  else
+  {
+    /*===============================================================*/
+    /* Make some caching happen by pulling this object to the front. */ 
+    /*===============================================================*/
+    if ( pHAL->pTMList != pTMObj )
+    {
+        /* Pull the object out of the list. */
+        if ( pTMObj->prev )
+        {
+          pTemp = pTMObj->prev;
+          pTemp->next = pTMObj->next;
+        }
+        if ( pTMObj->next )
+      {
+          pTemp = pTMObj->next;
+          pTemp->prev = pTMObj->prev;
+        }
+
+        pTMObj->prev = NULL;
+        pTMObj->next = NULL;
+
+        /* Put the object at the front of the list. */
+        pTMObj->next = pHAL->pTMList;
+        if ( pTMObj->next )
+      {
+          pTemp = pTMObj->next;
+          pTemp->prev = pTMObj;
+        }
+        pHAL->pTMList = pTMObj;
+    }
+  }
+
+  /*========================================================*/
+  /* If we are doing BIND and the texture is in VID memory. */
+  /*========================================================*/
+  if ( (dwAction == TM_ACTION_BIND) && pTMObj->lpDDS_Video  )
+  {
+    DPF(( DBG_TXT_PROFILE, "Cache HIT (%d)", dwName ));
+          
+    /* Make this the current texture. */
+    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );
+    if ( FAILED(rc) )
+    {
+        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));
+        pHAL->lpD3DDevice->SetTexture( 0, NULL );
+        return FALSE;
+    }  
+
+    return TRUE;
+  }    
+
+  /*=================================================================*/
+  /* If we are doing BIND and the texture is at least in SYS memory. */
+  /*=================================================================*/
+  if ( (dwAction == TM_ACTION_BIND) && pTMObj->lpDDS_System  )
+  {
+    DPF(( DBG_TXT_PROFILE, "Cache MISS (%d)", dwName ));
+
+    /* Create the texture on the card. */
+    rc = LoadTextureInVideo( pHAL, pTMObj );
+    if ( rc == FALSE )
+        return FALSE;
+          
+    /* Make this the current texture. */
+    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );
+    if ( FAILED(rc) )
+    {
+        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));
+        pHAL->lpD3DDevice->SetTexture( 0, NULL );
+        return FALSE;
+    }  
+
+    return TRUE;
+  }    
+
+  /*=========================================================*/
+  /* If we are doing UPDATE then try in VID first for speed. */
+  /*=========================================================*/
+  if ( (dwAction == TM_ACTION_UPDATE) && pTMObj->lpDDS_Video &&
+         !(pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY) )
+  {
+    DPF(( DBG_TXT_INFO, "Fix the SubTexture update Leigh!" ));
+
+    /* Update the texture on the card. */
+    UpdateTexture( pTMObj, TRUE, rectDirty, (UCHAR *)pPixels );
+
+    /* We updated the texture in VID so kill the SYS so we know its dirty. */
+    if ( pTMObj->lpDDS_System )
+    {
+        DPF(( DBG_TXT_INFO, "Release texture (SYS)" ));
+        DX_RESTORE( pTMObj->lpDDS_System );
+        pTMObj->lpDDS_System->Release();
+        pTMObj->lpDDS_System = NULL;
+    }
+
+    /* Make this the current texture. */
+    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );
+    if ( FAILED(rc) )
+    {
+        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));
+        pHAL->lpD3DDevice->SetTexture( 0, NULL );
+        return FALSE;
+    }  
+
+    return TRUE;
+  }
+
+  /*===========================================================*/
+  /* If we are doing UPDATE then try in SYS still gives speed. */
+  /*===========================================================*/
+  if ( (dwAction == TM_ACTION_UPDATE) && pTMObj->lpDDS_System )
+  {
+    DPF(( DBG_TXT_INFO, "Fix the SubTexture update Leigh!" ));
+
+    /* Update the texture in SYS. */
+    UpdateTexture( pTMObj, FALSE, NULL, (UCHAR *)pPixels );
+
+    /* We updated the SYS texture only so now blt to the VID. */
+    rc = LoadTextureInVideo( pHAL, pTMObj );
+    if ( rc == FALSE )
+        return FALSE;
+
+    /* Make this the current texture. */
+    rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );
+    if ( FAILED(rc) )
+    {
+        DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));
+        pHAL->lpD3DDevice->SetTexture( 0, NULL );
+        return FALSE;
+    }  
+
+    return TRUE;
+  }
+
+  /*  At this point we have a valid Texture Manager Object with updated */
+  /* links.  We now need to create or update a texture surface that is  */
+  /* in system memory.  Every texture has a copy in system so we can use*/
+  /* blt to solve problems with textures allocated on the card (square  */
+  /* only textures, pixelformats...).                                   */
+  
+  // TODO: make support for update also.  Dirty rectangle basicly...
+
+  /* Kill the interface if we have one no matter what. */
+  if ( pTMObj->lpD3DTexture2 )
+  {
+    DPF(( DBG_TXT_INFO, "Release Texture2" ));
+    pTMObj->lpD3DTexture2->Release();
+    pTMObj->lpD3DTexture2 = NULL;
+  }    
+
+  /* Kill the system surface. TODO: should try to get the SubIMage going again */
+  if ( pTMObj->lpDDS_System )
+  {
+    DPF(( DBG_TXT_INFO, "Release texture (SYS)" ));
+    DX_RESTORE( pTMObj->lpDDS_System );
+    pTMObj->lpDDS_System->Release();
+    pTMObj->lpDDS_System = NULL;
+  }
+
+  /* Kill the Video surface. TODO: need some reuse system... */
+  if ( pTMObj->lpDDS_Video )
+  {
+    DPF(( DBG_TXT_INFO, "Release texture (VID)" ));
+    DX_RESTORE( pTMObj->lpDDS_Video );
+    pTMObj->lpDDS_Video->Release();
+    pTMObj->lpDDS_Video = NULL;
+  }
+
+  /*================================================================*/
+  /* Translate the the Mesa/OpenGL pixel channels to the D3D flags. */
+  /*================================================================*/
+  switch( dwRequestFlags )
+  {
+    case GL_ALPHA:
+        dwRequestFlags = DDPF_ALPHA; 
+        DPF(( DBG_TXT_WARN, "GL_ALPHA not supported!)" ));
+        return FALSE;
+        
+    case GL_INTENSITY:
+    case GL_LUMINANCE:
+        DPF(( DBG_TXT_WARN, "GL_INTENSITY/GL_LUMINANCE not supported!)" ));
+        dwRequestFlags = DDPF_LUMINANCE; 
+        return FALSE;
+        
+    case GL_LUMINANCE_ALPHA:
+        DPF(( DBG_TXT_WARN, "GL_LUMINANCE_ALPHA not supported!)" ));
+        dwRequestFlags = DDPF_LUMINANCE | DDPF_ALPHAPIXELS; 
+        return FALSE;
+        
+    case GL_RGB:
+        DPF(( DBG_TXT_INFO, "Texture -> GL_RGB" ));
+        dwRequestFlags = DDPF_RGB; 
+        break;
+
+    case GL_RGBA:
+        DPF(( DBG_TXT_INFO, "Texture -> GL_RGBA" ));
+        dwRequestFlags = DDPF_RGB | DDPF_ALPHAPIXELS; 
+        break;
+  }
+
+  /*==============================*/
+  /* Populate the texture object. */
+  /*==============================*/
+  pTMObj->dwName      = dwName;
+  pTMObj->lpD3DDevice = pHAL->lpD3DDevice;
+  pTMObj->dwFlags     = dwRequestFlags;
+  if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY )
+  {
+    DPF(( DBG_TXT_INFO, "Convert to Square..." ));
+    pTMObj->dwSHeight  = dwHeight;
+    pTMObj->dwSWidth   = dwWidth;
+
+    /* Shrink non-square textures. */
+    pTMObj->dwVHeight  = (dwHeight > dwWidth) ? dwWidth : dwHeight;
+    pTMObj->dwVWidth   = (dwHeight > dwWidth) ? dwWidth : dwHeight;
+  }
+  else
+  {
+    pTMObj->dwSHeight  = dwHeight;
+    pTMObj->dwSWidth   = dwWidth;
+    pTMObj->dwVHeight  = dwHeight;
+    pTMObj->dwVWidth   = dwWidth;
+  }
+
+  /*========================*/  
+  /* Create SYSTEM surface. */
+  /*========================*/
+
+  /*  Request a surface in system memory. */
+  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );
+  ddsd2.dwSize          = sizeof( DDSURFACEDESC2 );
+  ddsd2.dwWidth         = pTMObj->dwSWidth;
+  ddsd2.dwHeight        = pTMObj->dwSHeight;
+  ddsd2.dwFlags         = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+  ddsd2.ddsCaps.dwCaps  = DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY;
+  ddsd2.ddsCaps.dwCaps2 = 0L;
+  memset( &ddsd2.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT) );
+  ddsd2.ddpfPixelFormat.dwSize  = sizeof( DDPIXELFORMAT );
+  ddsd2.ddpfPixelFormat.dwFlags = dwRequestFlags;
+  rc = pHAL->lpD3DDevice->EnumTextureFormats( EnumPFHook, &ddsd2.ddpfPixelFormat );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "EnumerTextureFormats (SYSTEM)->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Create the surface using the enumerated pixelformat. */
+  rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pTMObj->lpDDS_System, NULL );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "CreateSurface (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Solve the pixel mapping info using the surface pixelformat. */
+  Solve8BitChannelPixelFormat( &ddsd2.ddpfPixelFormat, &pTMObj->pixel );
+
+  /*===================================================================*/
+  /* Fill the texture using the PixelInfo structure to do the mapping. */
+  /*===================================================================*/
+  UpdateTexture( pTMObj, FALSE, NULL, (UCHAR *)pPixels );
+
+  /*=======================*/
+  /* Create VIDEO surface. */
+  /*=======================*/
+  rc = LoadTextureInVideo( pHAL, pTMObj );
+  if ( rc == FALSE )
+    return FALSE;
+
+  /* Make this the current texture. */
+  rc = pHAL->lpD3DDevice->SetTexture( 0, pTMObj->lpD3DTexture2 );
+  if ( FAILED(rc) )
+  {
+    DPF(( DBG_TXT_WARN, "Failed SetTexture() (%s)", ErrorStringD3D(rc) ));
+    pHAL->lpD3DDevice->SetTexture( 0, NULL );
+    return FALSE;
+  }
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This function will handle the creation and destruction of the texture    */
+/* surfaces on the card.  Using the dw'V'Width/Height dimensions the call    */
+/* try and create the texture on the card and keep using FreeTextureMemory   */
+/* until the surace can be created.  Once the surface is created we get the  */
+/* interface that we will use to make it the current texture.  I didn't put  */
+/* the code to make the texture current in this function as BIND needs to    */
+/* use the same code and this function doesn't always get called when we do a*/
+/* bind.                                                                     */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+static BOOL    LoadTextureInVideo( PMESAD3DHAL pHAL, PTM_OBJECT pTMObj )
+{
+  DDSURFACEDESC2       ddsd2;
+  HRESULT              rc;
+
+  DPF(( DBG_FUNC, "LoadTextureInVideo();" ));
+
+  /* Kill the interface if we have one no matter what. */
+  if ( pTMObj->lpD3DTexture2 )
+  {
+    DPF(( DBG_TXT_INFO, "Release Texture2" ));
+    pTMObj->lpD3DTexture2->Release();
+    pTMObj->lpD3DTexture2 = NULL;
+  }    
+
+  /* Kill the Video surface. TODO: need some reuse system... */
+  if ( pTMObj->lpDDS_Video )
+  {
+    DPF(( DBG_TXT_INFO, "Release texture (VID)" ));
+    DX_RESTORE( pTMObj->lpDDS_Video );
+    pTMObj->lpDDS_Video->Release();
+    pTMObj->lpDDS_Video = NULL;
+  }
+
+  /*  Request a surface in Video memory. */
+  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );
+  ddsd2.dwSize          = sizeof( DDSURFACEDESC2 );
+  ddsd2.dwWidth         = pTMObj->dwVWidth;
+  ddsd2.dwHeight        = pTMObj->dwVHeight;
+  ddsd2.dwFlags         = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+  ddsd2.ddsCaps.dwCaps  = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY;
+  ddsd2.ddsCaps.dwCaps2 = 0L;
+  memset( &ddsd2.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT) );
+  ddsd2.ddpfPixelFormat.dwSize  = sizeof( DDPIXELFORMAT );
+  ddsd2.ddpfPixelFormat.dwFlags = pTMObj->dwFlags;
+  rc = pHAL->lpD3DDevice->EnumTextureFormats( EnumPFHook, &ddsd2.ddpfPixelFormat );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "EnumerTextureFormats ->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Make sure we lock so we don't nuke this texture trying to free memory for it. */
+  pTMObj->bLock = TRUE;
+
+  /*  Start a loop that will free all textures until we have created the texture */
+  /* surface or we can't free up more memory.                                    */
+  do
+  {
+    /* Try to create the texture surface. */
+    rc = pHAL->lpDD4->CreateSurface( &ddsd2, &pTMObj->lpDDS_Video, NULL );
+    if ( !FAILED(rc) )
+        break;
+
+    DPF(( DBG_TXT_INFO, "Free Texture Memory" ));
+
+    /* DestroyTexture will return TRUE if a surface was freed. */
+  } while( FreeTextureMemory(pHAL,NULL) );
+
+  /* Make sure we unlock or we won't be able to nuke the TMO later. */
+  pTMObj->bLock = FALSE;
+
+  /* Did we create a valid texture surface? */
+  if ( FAILED(rc) )
+  {
+    DPF(( DBG_TXT_WARN, "Failed to load texture" ));
+    pHAL->lpD3DDevice->SetTexture( 0, NULL );
+    return FALSE;
+  }
+
+  DX_RESTORE( pTMObj->lpDDS_System );
+  DX_RESTORE( pTMObj->lpDDS_Video );
+
+  DPF(( DBG_TXT_INFO, "Texture Blt SYSTEM -> VID" ));
+
+  /* Now blt the texture in system memory to the card. */
+  rc = pTMObj->lpDDS_Video->Blt( NULL, pTMObj->lpDDS_System, NULL, DDBLT_WAIT, NULL );
+  if ( FAILED(rc) )
+  {
+    RIP( pHAL, "Blt (TEXTURE) ->", ErrorStringD3D(rc) );
+    return FALSE;
+  }
+
+  /* Get the Texture interface that is used to render with. */
+  pTMObj->lpDDS_Video->QueryInterface( IID_IDirect3DTexture2, (void **)&pTMObj->lpD3DTexture2 ); 
+  if ( pTMObj->lpD3DTexture2 == NULL )
+  {
+    DPF(( DBG_TXT_WARN, "Failed QueryTextureInterface" ));
+    pHAL->lpD3DDevice->SetTexture( 0, NULL );
+    return FALSE;
+  }
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  If this function gets a texture object struc then we will try and free   */
+/* it.  If we get a NULL then we will search from the bottom up and free one */
+/* VMEM surface.  I can only free when the surface isn't locked and of course*/
+/* there must be a VMEM surface.  We never free SMEM surfaces as that isn't  */
+/* the point.                                                                */
+/* TODO: should have a pointer to the bottom of the stack really.            */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static BOOL FreeTextureMemory( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject )
+{
+  PTM_OBJECT   pCurrent;
+  BOOL         bFreed = FALSE;
+
+  DPF(( DBG_FUNC, "FreeTextureMemory();" ));
+  DPF(( DBG_TXT_WARN, "FREE TEXTURE!" ));
+
+  /* Just to be safe. */
+  if ( !pHAL || !pHAL->pTMList )
+  {
+    DPF(( DBG_TXT_WARN, "FreeTextureMemory() -> NULL pHAL/pHAL->pTMList" ));
+    return FALSE;
+  }
+
+  /* Free the last texture in the list. */
+  if ( pTMObject == NULL )
+  {
+    DPF(( DBG_TXT_INFO, "Free Last texture in cache" ));
+
+    /* Find the last texture object. */
+    for( pCurrent = pHAL->pTMList; pCurrent->next; pCurrent = pCurrent->next );
+
+    /* Now backup until we find a texture on the card. */
+    while( pCurrent && (pCurrent->lpDDS_Video == NULL) && (pCurrent->bLock == FALSE) )
+        pCurrent = pCurrent->prev;
+
+    /* Didn't find anything. */
+    if ( pCurrent == NULL )
+    {
+        DPF(( DBG_TXT_INFO, "No texture memory freed" ));
+        return FALSE;
+    }
+  }
+  else
+  {
+    /* See if we can find this texture object. */
+    for( pCurrent = pHAL->pTMList; pCurrent && (pCurrent != pTMObject); pCurrent = pCurrent->next );
+
+    /* Didn't find anything. */
+    if ( pCurrent == NULL )
+    {
+        DPF(( DBG_TXT_INFO, "Requested texture to be freed NOT FOUND" ));
+        return FALSE;
+    }
+  }
+
+  /* Can't free this baby. */
+  if ( pCurrent->bLock == TRUE )
+  {
+    DPF(( DBG_TXT_WARN, "Requested texture LOCKED" ));
+    return FALSE;
+  }
+
+  /* Free the texture memory. */
+  if ( pCurrent->lpD3DTexture2 )
+  {
+    DPF(( DBG_TXT_INFO, "Release Texture2" ));
+    pCurrent->lpD3DTexture2->Release();
+    pCurrent->lpD3DTexture2 = NULL;
+    bFreed = TRUE;
+  }
+  if ( pCurrent->lpDDS_Video )
+  {
+    DPF(( DBG_TXT_INFO, "Release texture (VID):" ));
+    DPF(( DBG_TXT_INFO, "dwName: %d", pCurrent->dwName ));
+    DPF(( DBG_TXT_INFO, "cx: %d, cy: %d", pCurrent->dwVWidth, pCurrent->dwVHeight ));
+    pCurrent->lpDDS_Video->Release();
+    pCurrent->lpDDS_Video = NULL;
+    bFreed = TRUE;
+  }
+  
+  return bFreed;
+}
+/*===========================================================================*/
+/*  This function searches the linked list of texture objects in the supplied*/
+/* D3Dwrapper structure.  If it finds a match it will free it and pull it out*/
+/* of the linked list.  The function works on the bases of a matching pointer*/
+/* to the object (not matching content).                                     */
+/*  If the function gets passed a NULL then we want to free the last texture */
+/* object in the list.  Used in a loop to destory all.                       */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+static BOOL DestroyTextureObject( PMESAD3DHAL pHAL, PTM_OBJECT pTMObject )
+{
+  PTM_OBJECT   pCurrent;
+
+  DPF(( DBG_FUNC, "DestoryTextureObject();" ));
+
+  /* Just to be safe. */
+  if ( !pHAL || !pHAL->pTMList )
+  {
+    DPF(( DBG_TXT_WARN, "DestroyTextureObject() -> NULL pHAL/pHAL->pTMList" ));
+    return FALSE;
+  }
+
+  /* Free the last texture in the list. */
+  if ( pTMObject == NULL )
+  {
+    /* Find the last texture object. */
+    for( pCurrent = pHAL->pTMList; pCurrent->next; pCurrent = pCurrent->next );
+  }
+  else
+  {
+    /* See if we can find this texture object. */
+    for( pCurrent = pHAL->pTMList; pCurrent && (pCurrent != pTMObject); pCurrent = pCurrent->next );
+
+    /* Didn't find anything. */
+    if ( pCurrent == NULL )
+    {
+        DPF(( DBG_TXT_WARN, "No textures to be freed" ));
+        return FALSE;
+    }
+  }
+
+  /* Can't free this baby. */
+  if ( pCurrent->bLock == TRUE )
+  {
+    DPF(( DBG_TXT_WARN, "Requested texture to be freed LOCKED" ));
+    return FALSE;
+  }
+
+  /* Free the texture memory. */
+  if ( pCurrent->lpD3DTexture2 )
+  { 
+    DPF(( DBG_TXT_INFO, "Release Texture2" ));
+    pCurrent->lpD3DTexture2->Release();
+    pCurrent->lpD3DTexture2 = NULL;
+  }
+  if ( pCurrent->lpDDS_Video )
+  {
+    DPF(( DBG_TXT_INFO, "Release texture (VID):" ));
+    pCurrent->lpDDS_Video->Release();
+    pCurrent->lpDDS_Video = NULL;
+  }
+  if ( pCurrent->lpDDS_System )
+  {
+    DPF(( DBG_TXT_INFO, "Release texture (SYS):" ));
+    pCurrent->lpDDS_System->Release();
+    pCurrent->lpDDS_System = NULL;
+  }
+
+  /* Pull this texture out of the list. */
+  if ( pCurrent == pHAL->pTMList )
+    pHAL->pTMList = NULL;
+  if ( pCurrent->prev )
+    (pCurrent->prev)->next = pCurrent->next;
+  if ( pCurrent->next )
+    (pCurrent->next)->prev = pCurrent->prev;
+  FREE( pCurrent );
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This function is the callback function that gets called when we are doing*/
+/* an enumeration of the texture formats supported by this device. The choice*/
+/* is made by checking to see if we have a match with the supplied D3D pixel-*/
+/* format.  So the enumeration has to pass a desired D3D PF as the user var. */
+/*===========================================================================*/
+/* RETURN: D3DENUMRET_OK, D3DENUMRET_CANCEL.                                 */
+/*===========================================================================*/
+static void UpdateTexture( PTM_OBJECT pTMObj, BOOL bVideo, RECT *pRect, UCHAR *pixels )
+{
+  LPDIRECTDRAWSURFACE4 lpDDS;
+  DDSURFACEDESC2               ddsd2;
+  DWORD                        srcPitch,
+                         dwHeight, 
+                         dwWidth,
+                         dwCol,
+                         dwColor;
+  UCHAR                        *pSrc,
+                         *pSrcRow,
+                         *pDest,
+                         *pDestRow;
+  int                          rc;
+
+  // TODO:  Do I need to pass the h/w when its in the object!
+  DPF(( DBG_FUNC, "UpdateTexture();" ));
+
+  /* Get the surface pointer we are looking for. */
+  lpDDS = (bVideo) ? pTMObj->lpDDS_Video : pTMObj->lpDDS_System;
+
+  /*===================================================================*/
+  /* Fill the texture using the PixelInfo structure to do the mapping. */
+  /*===================================================================*/
+        
+  /* Get the surface pointer. */
+  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );
+  ddsd2.dwSize = sizeof(DDSURFACEDESC2);
+  rc = lpDDS->Lock( NULL, &ddsd2, DDLOCK_WAIT, NULL );
+  if ( FAILED(rc) )
+  {
+    RIP( NULL, "Lock (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) );
+    return;
+  }
+
+  /* For now we are only updating the system surface so use its dimensions. */
+  dwWidth  = (bVideo) ? pTMObj->dwVWidth : pTMObj->dwSWidth;
+  dwHeight = (bVideo) ? pTMObj->dwVHeight : pTMObj->dwSHeight;
+
+  /*  If we are updating the whole surface then the pDest/pSrc will */
+  /* always be the same.                                            */
+  if ( pRect == NULL )
+  {
+    pDest = (UCHAR *)ddsd2.lpSurface;
+    pSrc  = pixels;
+  }
+
+  /* Fill the texture surface based on the pixelformat flags. */
+  if ( pTMObj->dwFlags == (DDPF_RGB | DDPF_ALPHAPIXELS) )
+  {
+    srcPitch = dwWidth * 4;
+    if ( pRect )
+    {
+        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);
+        pSrc  = pixels + (pRect->top * dwWidth * 4) + (pRect->left * 4);
+        dwHeight = (pRect->bottom - pRect->top);
+        dwWidth = (pRect->right - pRect->left);
+    }
+
+    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )
+    {
+        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )
+      {
+          dwColor =  ( ((DWORD)(*(pSrc  ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );
+          dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.gScale)) << pTMObj->pixel.gShift );
+          dwColor |= ( ((DWORD)(*(pSrc+2) * pTMObj->pixel.bScale)) << pTMObj->pixel.bShift );
+          if ( pTMObj->pixel.aScale == -1.0 )
+               dwColor |= ( (*(pSrc+3) & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 );
+          else
+               dwColor |= ( ((DWORD)(*(pSrc+3) * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift );
+          memcpy( pDest, &dwColor, pTMObj->pixel.cb );
+          pDest += pTMObj->pixel.cb;
+          pSrc  += 4;
+        }
+    }
+  }
+  else if ( pTMObj->dwFlags == DDPF_RGB )
+  {
+    srcPitch = dwWidth * 3;
+    if ( pRect )
+    {
+        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);
+        pSrc  = pixels + (pRect->top * dwWidth * 3) + (pRect->left * 3);
+        dwHeight = (pRect->bottom - pRect->top);
+        dwWidth  = (pRect->right - pRect->left);
+    }
+
+    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )
+    {
+        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )
+      {
+          dwColor =  ( ((DWORD)(*(pSrc  ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );
+          dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.gScale)) << pTMObj->pixel.gShift );
+          dwColor |= ( ((DWORD)(*(pSrc+2) * pTMObj->pixel.bScale)) << pTMObj->pixel.bShift );
+          memcpy( pDest, &dwColor, pTMObj->pixel.cb );
+          pDest += pTMObj->pixel.cb;
+          pSrc  += 3;
+        }
+    }
+  }
+  else if ( pTMObj->dwFlags == (DDPF_LUMINANCE | DDPF_ALPHAPIXELS) )
+  {
+    srcPitch = dwWidth * 2;
+    if ( pRect )
+    {
+        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);
+        pSrc  = pixels + (pRect->top * dwWidth * 2) + (pRect->left * 2);
+        dwHeight = (pRect->bottom - pRect->top);
+        dwWidth  = (pRect->right - pRect->left);
+    }
+
+    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )
+    {
+        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )
+      {
+          dwColor =  ( ((DWORD)(*(pSrc  ) * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );
+          if ( pTMObj->pixel.aScale == -1.0 )
+               dwColor |= ( (*(pSrc+1) & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 );
+          else
+               dwColor |= ( ((DWORD)(*(pSrc+1) * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift );
+          memcpy( pDest, &dwColor, pTMObj->pixel.cb );
+          pDest += pTMObj->pixel.cb;
+          pSrc  += 2;
+        }
+    }
+  }
+  else if ( pTMObj->dwFlags == DDPF_LUMINANCE )
+  {
+    srcPitch = dwWidth;
+    if ( pRect )
+    {
+        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);
+        pSrc  = pixels + (pRect->top * dwWidth) + (pRect->left);
+        dwHeight = (pRect->bottom - pRect->top);
+        dwWidth  = (pRect->right - pRect->left);
+    }
+
+    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )
+    {
+        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )
+      {
+          dwColor =  ( ((DWORD)(*pSrc * pTMObj->pixel.rScale)) << pTMObj->pixel.rShift );
+          memcpy( pDest, &dwColor, pTMObj->pixel.cb );
+          pDest += pTMObj->pixel.cb;
+          pSrc++;
+        }
+    }
+  }
+  else if ( pTMObj->dwFlags == DDPF_ALPHAPIXELS )
+  {
+    srcPitch = dwWidth;
+    if ( pRect )
+    {
+        pDest = ((UCHAR *)ddsd2.lpSurface) + (pRect->top * ddsd2.lPitch) + (pRect->left * pTMObj->pixel.cb);
+        pSrc  = pixels + (pRect->top * dwWidth) + (pRect->left);
+        dwHeight = (pRect->bottom - pRect->top);
+        dwWidth  = (pRect->right - pRect->left);
+    }
+
+    for( pDestRow = pDest, pSrcRow = pSrc; dwHeight > 0; dwHeight--, pDestRow += ddsd2.lPitch, pSrcRow += srcPitch )
+    {
+        for( dwCol = 0, pDest = pDestRow, pSrc = pSrcRow; dwCol < dwWidth; dwCol++ )
+      {
+          if ( pTMObj->pixel.aScale == -1.0 )
+               dwColor = ( (*pSrc & 0x80) ? (1 << pTMObj->pixel.aShift) : 0 );
+          else
+               dwColor = ( ((DWORD)(*pSrc * pTMObj->pixel.aScale)) << pTMObj->pixel.aShift );
+          memcpy( pDest, &dwColor, pTMObj->pixel.cb );
+          pDest += pTMObj->pixel.cb;
+          pSrc++;
+        }
+    }
+  }
+
+  /* Unlock the surface. */
+  rc = lpDDS->Unlock( NULL );
+  if ( FAILED(rc) )
+  {
+    RIP( NULL, "Unlock (TEXTURE/SYSTEM)->", ErrorStringD3D(rc) );
+  }
+}
+/*===========================================================================*/
+/*  This function is the callback function that gets called when we are doing*/
+/* an enumeration of the texture formats supported by this device. The choice*/
+/* is made by checking to see if we have a match with the supplied D3D pixel-*/
+/* format.  So the enumeration has to pass a desired D3D PF as the user var. */
+/*===========================================================================*/
+/* RETURN: D3DENUMRET_OK, D3DENUMRET_CANCEL.                                 */
+/*===========================================================================*/
+HRESULT CALLBACK EnumPFHook( LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext )
+{
+  LPDDPIXELFORMAT   lpDDPixFmtRequest = (LPDDPIXELFORMAT)lpContext;
+  PIXELINFO            pixel;
+
+  DPF(( DBG_FUNC, "EnumPFHook();" ));
+
+  if ( lpDDPixFmt->dwFlags == lpDDPixFmtRequest->dwFlags )
+  {
+    /* Are we looking for an alpha channel? */
+    if ( lpDDPixFmtRequest->dwFlags & DDPF_ALPHAPIXELS )
+    {
+        /* Try for something that has more then 1bits of Alpha. */
+        Solve8BitChannelPixelFormat( lpDDPixFmt, &pixel );
+        if ( pixel.aScale == -1.0 )
+        {
+          /* Save this format no matter what as its a match of sorts. */
+          memcpy( lpDDPixFmtRequest, lpDDPixFmt, sizeof(DDPIXELFORMAT) );
+          return D3DENUMRET_OK;
+        }
+    }
+
+    /* Save this format as its a good match. */
+    memcpy( lpDDPixFmtRequest, lpDDPixFmt, sizeof(DDPIXELFORMAT) );
+
+    /* We are happy at this point so lets leave. */
+    return D3DENUMRET_CANCEL;
+  }
+  
+  return D3DENUMRET_OK;
+}
+
+
index f4a4154917a50c2994ed800c8a03bb555eece753..8a64ceaaec7200753dcb1b632dafef47d4f0cfc2 100644 (file)
@@ -1,62 +1,62 @@
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#ifndef _TEXTURE_MGR_INC\r
-#define _TEXTURE_MGR_INC\r
-   \r
-/*===========================================================================*/\r
-/* Includes.                                                                 */\r
-/*===========================================================================*/\r
-#include <windows.h>\r
-#include <ddraw.h>\r
-#include <d3d.h>\r
-#include <stdlib.h>\r
-#include <stdlib.h>\r
-#include "GL/gl.h"\r
-/*========================================================================*/\r
-/* Defines.                                                               */\r
-/*========================================================================*/\r
-/*========================================================================*/\r
-/* Type defines.                                                          */\r
-/*========================================================================*/\r
-typedef struct _local_texture_object\r
-{\r
-   DWORD                dwName,\r
-                        dwPriority,\r
-                        dwFlags,\r
-                        dwSWidth,\r
-                        dwSHeight,\r
-                        dwVWidth,\r
-                        dwVHeight;\r
-   BOOL                 bLock,\r
-                          bDirty;              /*  I only update VID on SubImage calls so the system */\r
-                                        /* texture can get invalid.                           */\r
-\r
-   LPDIRECT3DDEVICE3    lpD3DDevice;   /* If the device changes we must get new handles... */\r
-   LPDIRECTDRAWSURFACE4 lpDDS_System,\r
-                          lpDDS_Video;\r
-   LPDIRECT3DTEXTURE2   lpD3DTexture2;\r
-\r
-   PIXELINFO            pixel;\r
-\r
-   struct _local_texture_object *next;\r
-   struct _local_texture_object *prev;\r
-\r
-} TM_OBJECT, *PTM_OBJECT;\r
-/*========================================================================*/\r
-/* Function prototypes.                                                   */\r
-/*========================================================================*/\r
-void APIENTRY  InitTMD3D( void *pVoid );\r
-void APIENTRY  TermTMD3D( void *pVoid );\r
-/*========================================================================*/\r
-/* Global variables declaration.                                          */\r
-/*========================================================================*/\r
-\r
-#endif \r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#ifndef _TEXTURE_MGR_INC
+#define _TEXTURE_MGR_INC
+   
+/*===========================================================================*/
+/* Includes.                                                                 */
+/*===========================================================================*/
+#include <windows.h>
+#include <ddraw.h>
+#include <d3d.h>
+#include <stdlib.h>
+#include <stdlib.h>
+#include "GL/gl.h"
+/*========================================================================*/
+/* Defines.                                                               */
+/*========================================================================*/
+/*========================================================================*/
+/* Type defines.                                                          */
+/*========================================================================*/
+typedef struct _local_texture_object
+{
+   DWORD                dwName,
+                        dwPriority,
+                        dwFlags,
+                        dwSWidth,
+                        dwSHeight,
+                        dwVWidth,
+                        dwVHeight;
+   BOOL                 bLock,
+                          bDirty;              /*  I only update VID on SubImage calls so the system */
+                                        /* texture can get invalid.                           */
+
+   LPDIRECT3DDEVICE3    lpD3DDevice;   /* If the device changes we must get new handles... */
+   LPDIRECTDRAWSURFACE4 lpDDS_System,
+                          lpDDS_Video;
+   LPDIRECT3DTEXTURE2   lpD3DTexture2;
+
+   PIXELINFO            pixel;
+
+   struct _local_texture_object *next;
+   struct _local_texture_object *prev;
+
+} TM_OBJECT, *PTM_OBJECT;
+/*========================================================================*/
+/* Function prototypes.                                                   */
+/*========================================================================*/
+void APIENTRY  InitTMD3D( void *pVoid );
+void APIENTRY  TermTMD3D( void *pVoid );
+/*========================================================================*/
+/* Global variables declaration.                                          */
+/*========================================================================*/
+
+#endif 
index c13d89cd711c77ed1b180fdf83d0b12698d4ca86..02664f96e4d332506e8998db957c9b85d3060ddc 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "D3DHAL.h"\r
-/*===========================================================================*/\r
-/* Local only functions.                                                     */\r
-/*===========================================================================*/\r
-static int  CountTrailingZeros( DWORD dwMask );\r
-/*===========================================================================*/\r
-/*  This function is used to get the pointer to the surface and the pitch for*/\r
-/* the scanline rendering functions.                                         */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" DDSURFACEDESC2 *LockHAL( PMESAD3DSHARED pShared, BOOL bBack )\r
-{\r
-  PMESAD3DHAL                  pHAL = (PMESAD3DHAL)pShared;\r
-  static DDSURFACEDESC2        ddsd2;\r
-  HRESULT                      rc;      \r
-\r
-  DPF(( DBG_FUNC, "LockHAL();" ));\r
-\r
-  /* Set the request structure up first. */\r
-  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );\r
-  ddsd2.dwSize = sizeof(DDSURFACEDESC2);\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( pHAL )\r
-  {\r
-    rc = pHAL->lpDDSRender->Lock( NULL, &ddsd2, DDLOCK_WAIT, NULL );\r
-    if ( FAILED(rc) )\r
-    {\r
-        RIP( pHAL, "Lock (RENDER) ->", ErrorStringD3D(rc) );\r
-    }\r
-  }\r
-\r
-  return &ddsd2;\r
-}\r
-/*===========================================================================*/\r
-/*  This is just a simple wrapper.  I probably don't need to do any error    */\r
-/* checking as the Lock must have worked inorder to get here...              */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void UnlockHAL( PMESAD3DSHARED pShared, BOOL bBack )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-  HRESULT              rc;\r
-\r
-  DPF(( DBG_FUNC, "UnlockHAL();" ));\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( pHAL )\r
-  {\r
-    rc = pHAL->lpDDSRender->Unlock( NULL );\r
-    if ( FAILED(rc) )\r
-    {\r
-        RIP( pHAL, "Unlock (RENDER) ->", ErrorStringD3D(rc) );\r
-    }\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This function will track the main/Primary window that will be used as the*/\r
-/* target for the Blt in SwapBuffers.  As a side effect the call will check  */\r
-/* to see if the primary surface is the same size and position as the screen.*/\r
-/* If they are the same size we will call it fullscreen...                   */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-extern "C" void UpdateScreenPosHAL( PMESAD3DSHARED pShared )\r
-{\r
-  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;\r
-  POINT                pt;\r
-  DWORD                dwWidth, dwHeight;\r
-\r
-  DPF(( DBG_FUNC, "UpdateScreenPosHAL();" ));\r
-\r
-  /* Make sure we have enough info. */\r
-  if ( pHAL != NULL )\r
-  {\r
-    /* Update the windows screen position. */\r
-    GetClientRect( pShared->hwnd, &pShared->rectW );\r
-    pt.x = pt.y = 0;\r
-    ClientToScreen( pShared->hwnd, &pt );\r
-    OffsetRect( &pShared->rectW, pt.x, pt.y);\r
-\r
-    /* Compare the primary to the screen. */\r
-    dwWidth = GetSystemMetrics( SM_CXSCREEN );\r
-    dwHeight =  GetSystemMetrics( SM_CYSCREEN );\r
-    if ( (pShared->rectW.left > 0) ||  (pShared->rectW.top > 0)  ||\r
-           (pShared->rectW.right > dwWidth) || (pShared->rectW.bottom > dwHeight) )\r
-        pShared->bWindow = TRUE;\r
-    else\r
-        pShared->bWindow = FALSE;\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This function will fill in the pixel info structure defined in D3Dshared.*/\r
-/* Basicly it will take a DirectDraw pixelformat structure and make scaling  */\r
-/* values that will convert from 8bit channels to whatever the supplied ddpf */\r
-/* uses.  Also we will generate shift values that will be used to get move   */\r
-/* each component of the pixel into place.                                   */\r
-/*  I have now added a special case for a 1bit alpha channel.  If I find a 1b*/\r
-/* alpha then I will set the scale to -1.0 which should be unique.  Later I  */\r
-/* can check the alpha scale value too see if its -1.0 and thus handle it.  I*/\r
-/* was finding that the case was not working tom my advantage so this is my  */\r
-/* HACK for the day.  As a TODO I should work on this...                     */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void   Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel )\r
-{\r
-  DPF(( DBG_FUNC, "Solve8BitChannelPixelFromat();" ));\r
-\r
-  memset( pPixel, 0, sizeof(PPIXELINFO) );\r
-\r
-  /* Check too see if the color space is valid in the PF. */\r
-  if ( pddpf->dwFlags & DDPF_RGB )\r
-  {\r
-    /* Solve the red stuff. */\r
-    pPixel->dwRMask = pddpf->dwRBitMask;\r
-    pPixel->rShift = CountTrailingZeros( pPixel->dwRMask );\r
-    pPixel->rScale = (float)0.00392156 * (float)(pPixel->dwRMask >> pPixel->rShift);\r
-\r
-    /* Solve the green thingy's. */\r
-    pPixel->dwGMask = pddpf->dwGBitMask;\r
-    pPixel->gShift = CountTrailingZeros( pPixel->dwGMask );\r
-    pPixel->gScale = (float)0.00392156 * (float)(pPixel->dwGMask >> pPixel->gShift);\r
-\r
-    /* Solve the blues. */\r
-    pPixel->dwBMask = pddpf->dwBBitMask;\r
-    pPixel->bShift = CountTrailingZeros( pddpf->dwBBitMask );\r
-    pPixel->bScale = (float)0.00392156 * (float)(pddpf->dwBBitMask >> pPixel->bShift);\r
-  }\r
-\r
-  /* Do the alpha channel if there is one. */\r
-  if ( pddpf->dwFlags & DDPF_ALPHAPIXELS )\r
-  {\r
-    pPixel->dwAMask = pddpf->dwRGBAlphaBitMask;\r
-    pPixel->aShift = CountTrailingZeros( pPixel->dwAMask );\r
-\r
-    /* Special case a 1bit alpha. */\r
-    if ( (pPixel->dwAMask >> pPixel->aShift) == 1 )\r
-        pPixel->aScale = -1.0;\r
-    else\r
-        pPixel->aScale = (float)0.00392156 * (float)(pPixel->dwAMask >> pPixel->aShift);\r
-  }\r
-\r
-  /* Get the size of the pixel in bytes. Should work as dwRGBBitCount is in a union. */\r
-  pPixel->cb = pddpf->dwRGBBitCount / 8;\r
-}\r
-/*===========================================================================*/\r
-/*  See RETURN :)                                                            */\r
-/*===========================================================================*/\r
-/* RETURN: number of contiguous zeros starting from the right.               */\r
-/*===========================================================================*/\r
-static int  CountTrailingZeros( DWORD dwMask )\r
-{\r
-  DWORD Mask;\r
-\r
-  if ( dwMask == 0 ) \r
-    return 32;\r
-\r
-  /* Can't take credit for this one! */\r
-  Mask = dwMask & -(int)dwMask;\r
-  return ((Mask & 0xFFFF0000)!=0) << 4\r
-         | ((Mask & 0xFF00FF00)!=0) << 3\r
-         | ((Mask & 0xF0F0F0F0)!=0) << 2\r
-         | ((Mask & 0xCCCCCCCC)!=0) << 1\r
-         | ((Mask & 0xAAAAAAAA)!=0);\r
-}\r
-/*===========================================================================*/\r
-/*  This function will convert the DDraw error code to its macro string.  The*/\r
-/* returned pointer is static so you need not worry about memory managemnet  */\r
-/* but the error message gets written over from call to call...              */\r
-/*===========================================================================*/\r
-/* RETURN: pointer to the single static buffer that hold the error message.  */\r
-/*===========================================================================*/\r
-char *ErrorStringD3D( HRESULT hr )\r
-{\r
-  static   char  errorString[128];\r
-\r
-  switch( hr )\r
-    {\r
-    case DDERR_ALREADYINITIALIZED:\r
-        strcpy( errorString, "DDERR_ALREADYINITIALIZED" );\r
-        break;\r
-        \r
-    case DDERR_CANNOTATTACHSURFACE:\r
-        strcpy( errorString, "DDERR_CANNOTATTACHSURFACE" );\r
-        break;\r
-        \r
-    case DDERR_CANNOTDETACHSURFACE:\r
-        strcpy( errorString, "DDERR_CANNOTDETACHSURFACE" );\r
-        break;\r
-        \r
-    case DDERR_CURRENTLYNOTAVAIL:\r
-        strcpy( errorString, "DDERR_CURRENTLYNOTAVAIL" );\r
-        break;\r
-        \r
-    case DDERR_EXCEPTION:\r
-        strcpy( errorString, "DDERR_EXCEPTION" );\r
-        break;\r
-        \r
-    case DDERR_GENERIC:\r
-        strcpy( errorString, "DDERR_GENERIC" );\r
-        break;\r
-        \r
-    case DDERR_HEIGHTALIGN:\r
-        strcpy( errorString, "DDERR_HEIGHTALIGN" );\r
-        break;\r
-        \r
-    case DDERR_INCOMPATIBLEPRIMARY:\r
-        strcpy( errorString, "DDERR_INCOMPATIBLEPRIMARY" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDCAPS:\r
-        strcpy( errorString, "DDERR_INVALIDCAPS" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDCLIPLIST:\r
-        strcpy( errorString, "DDERR_INVALIDCLIPLIST" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDMODE:\r
-        strcpy( errorString, "DDERR_INVALIDMODE" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDOBJECT:\r
-        strcpy( errorString, "DDERR_INVALIDOBJECT" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDPARAMS:\r
-        strcpy( errorString, "DDERR_INVALIDPARAMS" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDPIXELFORMAT:\r
-        strcpy( errorString, "DDERR_INVALIDPIXELFORMAT" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDRECT:\r
-        strcpy( errorString, "DDERR_INVALIDRECT" );\r
-        break;\r
-        \r
-    case DDERR_LOCKEDSURFACES:\r
-        strcpy( errorString, "DDERR_LOCKEDSURFACES" );\r
-        break;\r
-        \r
-    case DDERR_NO3D:\r
-        strcpy( errorString, "DDERR_NO3D" );\r
-        break;\r
-        \r
-    case DDERR_NOALPHAHW:\r
-        strcpy( errorString, "DDERR_NOALPHAHW" );\r
-        break;\r
-        \r
-    case DDERR_NOCLIPLIST:\r
-        strcpy( errorString, "DDERR_NOCLIPLIST" );\r
-        break;\r
-        \r
-    case DDERR_NOCOLORCONVHW:\r
-        strcpy( errorString, "DDERR_NOCOLORCONVHW" );\r
-        break;\r
-        \r
-    case DDERR_NOCOOPERATIVELEVELSET:\r
-        strcpy( errorString, "DDERR_NOCOOPERATIVELEVELSET" );\r
-        break;\r
-        \r
-    case DDERR_NOCOLORKEY:\r
-        strcpy( errorString, "DDERR_NOCOLORKEY" );\r
-        break;\r
-        \r
-    case DDERR_NOCOLORKEYHW:\r
-        strcpy( errorString, "DDERR_NOCOLORKEYHW" );\r
-        break;\r
-        \r
-    case DDERR_NODIRECTDRAWSUPPORT:\r
-        strcpy( errorString, "DDERR_NODIRECTDRAWSUPPORT" );\r
-        break;\r
-        \r
-    case DDERR_NOEXCLUSIVEMODE:\r
-        strcpy( errorString, "DDERR_NOEXCLUSIVEMODE" );\r
-        break;\r
-        \r
-    case DDERR_NOFLIPHW:\r
-        strcpy( errorString, "DDERR_NOFLIPHW" );\r
-        break;\r
-        \r
-    case DDERR_NOGDI:\r
-        strcpy( errorString, "DDERR_NOGDI" );\r
-        break;\r
-        \r
-    case DDERR_NOMIRRORHW:\r
-        strcpy( errorString, "DDERR_NOMIRRORHW" );\r
-        break;\r
-        \r
-    case DDERR_NOTFOUND:\r
-        strcpy( errorString, "DDERR_NOTFOUND" );\r
-        break;\r
-        \r
-    case DDERR_NOOVERLAYHW:\r
-        strcpy( errorString, "DDERR_NOOVERLAYHW" );\r
-        break;\r
-        \r
-    case DDERR_OVERLAPPINGRECTS:\r
-        strcpy( errorString, "DDERR_OVERLAPPINGRECTS" );\r
-        break;\r
-        \r
-    case DDERR_NORASTEROPHW:\r
-        strcpy( errorString, "DDERR_NORASTEROPHW" );\r
-        break;\r
-        \r
-    case DDERR_NOROTATIONHW:\r
-        strcpy( errorString, "DDERR_NOROTATIONHW" );\r
-        break;\r
-        \r
-    case DDERR_NOSTRETCHHW:\r
-        strcpy( errorString, "DDERR_NOSTRETCHHW" );\r
-        break;\r
-        \r
-    case DDERR_NOT4BITCOLOR:\r
-        strcpy( errorString, "DDERR_NOT4BITCOLOR" );\r
-        break;\r
-        \r
-    case DDERR_NOT4BITCOLORINDEX:\r
-        strcpy( errorString, "DDERR_NOT4BITCOLORINDEX" );\r
-        break;\r
-        \r
-    case DDERR_NOT8BITCOLOR:\r
-        strcpy( errorString, "DDERR_NOT8BITCOLOR" );\r
-        break;\r
-        \r
-    case DDERR_NOTEXTUREHW:\r
-        strcpy( errorString, "DDERR_NOTEXTUREHW" );\r
-        break;\r
-        \r
-    case DDERR_NOVSYNCHW:\r
-        strcpy( errorString, "DDERR_NOVSYNCHW" );\r
-        break;\r
-        \r
-    case DDERR_NOZBUFFERHW:\r
-        strcpy( errorString, "DDERR_NOZBUFFERHW" );\r
-        break;\r
-\r
-    case DDERR_NOZOVERLAYHW:\r
-        strcpy( errorString, "DDERR_NOZOVERLAYHW" );\r
-        break;\r
-        \r
-    case DDERR_OUTOFCAPS:\r
-        strcpy( errorString, "DDERR_OUTOFCAPS" );\r
-        break;\r
-        \r
-    case DDERR_OUTOFMEMORY:\r
-        strcpy( errorString, "DDERR_OUTOFMEMORY" );\r
-        break;\r
-        \r
-    case DDERR_OUTOFVIDEOMEMORY:\r
-        strcpy( errorString, "DDERR_OUTOFVIDEOMEMORY" );\r
-        break;\r
-        \r
-    case DDERR_OVERLAYCANTCLIP:\r
-        strcpy( errorString, "DDERR_OVERLAYCANTCLIP" );\r
-        break;\r
-        \r
-    case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:\r
-        strcpy( errorString, "DDERR_OVERLAYCOLORKEYONLYONEACTIVE" );\r
-        break;\r
-        \r
-    case DDERR_PALETTEBUSY:\r
-        strcpy( errorString, "DDERR_PALETTEBUSY" );\r
-        break;\r
-        \r
-    case DDERR_COLORKEYNOTSET:\r
-        strcpy( errorString, "DDERR_COLORKEYNOTSET" );\r
-        break;\r
-        \r
-    case DDERR_SURFACEALREADYATTACHED:\r
-        strcpy( errorString, "DDERR_SURFACEALREADYATTACHED" );\r
-        break;\r
-        \r
-    case DDERR_SURFACEALREADYDEPENDENT:\r
-        strcpy( errorString, "DDERR_SURFACEALREADYDEPENDENT" );\r
-        break;\r
-        \r
-    case DDERR_SURFACEBUSY:\r
-        strcpy( errorString, "DDERR_SURFACEBUSY" );\r
-        break;\r
-        \r
-    case DDERR_CANTLOCKSURFACE:\r
-        strcpy( errorString, "DDERR_CANTLOCKSURFACE" );\r
-        break;\r
-\r
-    case DDERR_SURFACEISOBSCURED:\r
-        strcpy( errorString, "DDERR_SURFACEISOBSCURED" );\r
-        break;\r
-\r
-    case DDERR_SURFACELOST:\r
-        strcpy( errorString, "DDERR_SURFACELOST" );\r
-        break;\r
-        \r
-    case DDERR_SURFACENOTATTACHED:\r
-        strcpy( errorString, "DDERR_SURFACENOTATTACHED" );\r
-        break;\r
-        \r
-    case DDERR_TOOBIGHEIGHT:\r
-        strcpy( errorString, "DDERR_TOOBIGHEIGHT" );\r
-        break;\r
-        \r
-    case DDERR_TOOBIGSIZE:\r
-        strcpy( errorString, "DDERR_TOOBIGSIZE" );\r
-        break;\r
-        \r
-    case DDERR_TOOBIGWIDTH:\r
-        strcpy( errorString, "DDERR_TOOBIGWIDTH" );\r
-        break;\r
-        \r
-    case DDERR_UNSUPPORTED:\r
-        strcpy( errorString, "DDERR_UNSUPPORTED" );\r
-        break;\r
-        \r
-    case DDERR_UNSUPPORTEDFORMAT:\r
-        strcpy( errorString, "DDERR_UNSUPPORTEDFORMAT" );\r
-        break;\r
-        \r
-    case DDERR_UNSUPPORTEDMASK:\r
-        strcpy( errorString, "DDERR_UNSUPPORTEDMASK" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDSTREAM:\r
-        strcpy( errorString, "DDERR_INVALIDSTREAM" );\r
-        break;\r
-        \r
-    case DDERR_VERTICALBLANKINPROGRESS:\r
-        strcpy( errorString, "DDERR_VERTICALBLANKINPROGRESS" );\r
-        break;\r
-        \r
-    case DDERR_WASSTILLDRAWING:\r
-        strcpy( errorString, "DDERR_WASSTILLDRAWING" );\r
-        break;\r
-        \r
-    case DDERR_XALIGN:\r
-        strcpy( errorString, "DDERR_XALIGN" );\r
-        break;\r
-        \r
-    case DDERR_INVALIDDIRECTDRAWGUID:\r
-        strcpy( errorString, "DDERR_INVALIDDIRECTDRAWGUID" );\r
-        break;\r
-        \r
-    case DDERR_DIRECTDRAWALREADYCREATED:\r
-        strcpy( errorString, "DDERR_DIRECTDRAWALREADYCREATED" );\r
-        break;\r
-        \r
-    case DDERR_NODIRECTDRAWHW:\r
-        strcpy( errorString, "DDERR_NODIRECTDRAWHW" );\r
-        break;\r
-        \r
-    case DDERR_PRIMARYSURFACEALREADYEXISTS:\r
-        strcpy( errorString, "DDERR_PRIMARYSURFACEALREADYEXISTS" );\r
-        break;\r
-        \r
-    case DDERR_NOEMULATION:\r
-        strcpy( errorString, "DDERR_NOEMULATION" );\r
-        break;\r
-        \r
-    case DDERR_REGIONTOOSMALL:\r
-        strcpy( errorString, "DDERR_REGIONTOOSMALL" );\r
-        break;\r
-        \r
-    case DDERR_CLIPPERISUSINGHWND:\r
-        strcpy( errorString, "DDERR_CLIPPERISUSINGHWND" );\r
-        break;\r
-        \r
-    case DDERR_NOCLIPPERATTACHED:\r
-        strcpy( errorString, "DDERR_NOCLIPPERATTACHED" );\r
-        break;\r
-        \r
-    case DDERR_NOHWND:\r
-        strcpy( errorString, "DDERR_NOHWND" );\r
-        break;\r
-        \r
-    case DDERR_HWNDSUBCLASSED:\r
-        strcpy( errorString, "DDERR_HWNDSUBCLASSED" );\r
-        break;\r
-        \r
-    case DDERR_HWNDALREADYSET:\r
-        strcpy( errorString, "DDERR_HWNDALREADYSET" );\r
-        break;\r
-        \r
-    case DDERR_NOPALETTEATTACHED:\r
-        strcpy( errorString, "DDERR_NOPALETTEATTACHED" );\r
-        break;\r
-        \r
-    case DDERR_NOPALETTEHW:\r
-        strcpy( errorString, "DDERR_NOPALETTEHW" );\r
-        break;\r
-        \r
-    case DDERR_BLTFASTCANTCLIP:\r
-         strcpy( errorString, "DDERR_BLTFASTCANTCLIP" );\r
-         break;\r
-\r
-      case DDERR_NOBLTHW:\r
-         strcpy( errorString, "DDERR_NOBLTHW" );\r
-         break;\r
-\r
-      case DDERR_NODDROPSHW:\r
-         strcpy( errorString, "DDERR_NODDROPSHW" );\r
-         break;\r
-\r
-      case DDERR_OVERLAYNOTVISIBLE:\r
-         strcpy( errorString, "DDERR_OVERLAYNOTVISIBLE" );\r
-         break;\r
-\r
-      case DDERR_NOOVERLAYDEST:\r
-         strcpy( errorString, "DDERR_NOOVERLAYDEST" );\r
-         break;\r
-\r
-      case DDERR_INVALIDPOSITION:\r
-         strcpy( errorString, "DDERR_INVALIDPOSITION" );\r
-         break;\r
-\r
-      case DDERR_NOTAOVERLAYSURFACE:\r
-         strcpy( errorString, "DDERR_NOTAOVERLAYSURFACE" );\r
-         break;\r
-\r
-      case DDERR_EXCLUSIVEMODEALREADYSET:\r
-         strcpy( errorString, "DDERR_EXCLUSIVEMODEALREADYSET" );\r
-         break;\r
-\r
-      case DDERR_NOTFLIPPABLE:\r
-         strcpy( errorString, "DDERR_NOTFLIPPABLE" );\r
-         break;\r
-\r
-      case DDERR_CANTDUPLICATE:\r
-         strcpy( errorString, "DDERR_CANTDUPLICATE" );\r
-         break;\r
-\r
-      case DDERR_NOTLOCKED:\r
-         strcpy( errorString, "DDERR_NOTLOCKED" );\r
-         break;\r
-\r
-      case DDERR_CANTCREATEDC:\r
-         strcpy( errorString, "DDERR_CANTCREATEDC" );\r
-         break;\r
-\r
-      case DDERR_NODC:\r
-         strcpy( errorString, "DDERR_NODC" );\r
-         break;\r
-\r
-      case DDERR_WRONGMODE:\r
-         strcpy( errorString, "DDERR_WRONGMODE" );\r
-         break;\r
-\r
-      case DDERR_IMPLICITLYCREATED:\r
-         strcpy( errorString, "DDERR_IMPLICITLYCREATED" );\r
-         break;\r
-\r
-      case DDERR_NOTPALETTIZED:\r
-         strcpy( errorString, "DDERR_NOTPALETTIZED" );\r
-         break;\r
-\r
-      case DDERR_UNSUPPORTEDMODE:\r
-         strcpy( errorString, "DDERR_UNSUPPORTEDMODE" );\r
-         break;\r
-\r
-      case DDERR_NOMIPMAPHW:\r
-         strcpy( errorString, "DDERR_NOMIPMAPHW" );\r
-         break;\r
-\r
-      case DDERR_INVALIDSURFACETYPE:\r
-         strcpy( errorString, "DDERR_INVALIDSURFACETYPE" );\r
-         break;\r
-\r
-      case DDERR_NOOPTIMIZEHW:\r
-         strcpy( errorString, "DDERR_NOOPTIMIZEHW" );\r
-         break;\r
-\r
-      case DDERR_NOTLOADED:\r
-         strcpy( errorString, "DDERR_NOTLOADED" );\r
-         break;\r
-\r
-      case DDERR_NOFOCUSWINDOW:\r
-         strcpy( errorString, "DDERR_NOFOCUSWINDOW" );\r
-         break;\r
-\r
-      case DDERR_DCALREADYCREATED:\r
-         strcpy( errorString, "DDERR_DCALREADYCREATED" );\r
-         break;\r
-\r
-      case DDERR_NONONLOCALVIDMEM:\r
-         strcpy( errorString, "DDERR_NONONLOCALVIDMEM" );\r
-         break;\r
-\r
-      case DDERR_CANTPAGELOCK:\r
-         strcpy( errorString, "DDERR_CANTPAGELOCK" );\r
-         break;\r
-\r
-      case DDERR_CANTPAGEUNLOCK:\r
-         strcpy( errorString, "DDERR_CANTPAGEUNLOCK" );\r
-         break;\r
-\r
-      case DDERR_NOTPAGELOCKED:\r
-         strcpy( errorString, "DDERR_NOTPAGELOCKED" );\r
-         break;\r
-\r
-      case DDERR_MOREDATA:\r
-         strcpy( errorString, "DDERR_MOREDATA" );\r
-         break;\r
-\r
-      case DDERR_EXPIRED:\r
-         strcpy( errorString, "DDERR_EXPIRED" );\r
-         break;\r
-\r
-      case DDERR_VIDEONOTACTIVE:\r
-         strcpy( errorString, "DDERR_VIDEONOTACTIVE" );\r
-         break;\r
-\r
-      case DDERR_DEVICEDOESNTOWNSURFACE:\r
-         strcpy( errorString, "DDERR_DEVICEDOESNTOWNSURFACE" );\r
-         break;\r
-\r
-      case DDERR_NOTINITIALIZED:\r
-         strcpy( errorString, "DDERR_NOTINITIALIZED" );\r
-         break;\r
-\r
-      default:\r
-         strcpy( errorString, "<unknown error code>" );\r
-         break;\r
-   }\r
-\r
-   return &errorString[0];\r
-} \r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "D3DHAL.h"
+/*===========================================================================*/
+/* Local only functions.                                                     */
+/*===========================================================================*/
+static int  CountTrailingZeros( DWORD dwMask );
+/*===========================================================================*/
+/*  This function is used to get the pointer to the surface and the pitch for*/
+/* the scanline rendering functions.                                         */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" DDSURFACEDESC2 *LockHAL( PMESAD3DSHARED pShared, BOOL bBack )
+{
+  PMESAD3DHAL                  pHAL = (PMESAD3DHAL)pShared;
+  static DDSURFACEDESC2        ddsd2;
+  HRESULT                      rc;      
+
+  DPF(( DBG_FUNC, "LockHAL();" ));
+
+  /* Set the request structure up first. */
+  memset( &ddsd2, 0, sizeof(DDSURFACEDESC2) );
+  ddsd2.dwSize = sizeof(DDSURFACEDESC2);
+
+  /* Make sure we have enough info. */
+  if ( pHAL )
+  {
+    rc = pHAL->lpDDSRender->Lock( NULL, &ddsd2, DDLOCK_WAIT, NULL );
+    if ( FAILED(rc) )
+    {
+        RIP( pHAL, "Lock (RENDER) ->", ErrorStringD3D(rc) );
+    }
+  }
+
+  return &ddsd2;
+}
+/*===========================================================================*/
+/*  This is just a simple wrapper.  I probably don't need to do any error    */
+/* checking as the Lock must have worked inorder to get here...              */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void UnlockHAL( PMESAD3DSHARED pShared, BOOL bBack )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+  HRESULT              rc;
+
+  DPF(( DBG_FUNC, "UnlockHAL();" ));
+
+  /* Make sure we have enough info. */
+  if ( pHAL )
+  {
+    rc = pHAL->lpDDSRender->Unlock( NULL );
+    if ( FAILED(rc) )
+    {
+        RIP( pHAL, "Unlock (RENDER) ->", ErrorStringD3D(rc) );
+    }
+  }
+}
+/*===========================================================================*/
+/*  This function will track the main/Primary window that will be used as the*/
+/* target for the Blt in SwapBuffers.  As a side effect the call will check  */
+/* to see if the primary surface is the same size and position as the screen.*/
+/* If they are the same size we will call it fullscreen...                   */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+extern "C" void UpdateScreenPosHAL( PMESAD3DSHARED pShared )
+{
+  PMESAD3DHAL  pHAL = (PMESAD3DHAL)pShared;
+  POINT                pt;
+  DWORD                dwWidth, dwHeight;
+
+  DPF(( DBG_FUNC, "UpdateScreenPosHAL();" ));
+
+  /* Make sure we have enough info. */
+  if ( pHAL != NULL )
+  {
+    /* Update the windows screen position. */
+    GetClientRect( pShared->hwnd, &pShared->rectW );
+    pt.x = pt.y = 0;
+    ClientToScreen( pShared->hwnd, &pt );
+    OffsetRect( &pShared->rectW, pt.x, pt.y);
+
+    /* Compare the primary to the screen. */
+    dwWidth = GetSystemMetrics( SM_CXSCREEN );
+    dwHeight =  GetSystemMetrics( SM_CYSCREEN );
+    if ( (pShared->rectW.left > 0) ||  (pShared->rectW.top > 0)  ||
+           (pShared->rectW.right > dwWidth) || (pShared->rectW.bottom > dwHeight) )
+        pShared->bWindow = TRUE;
+    else
+        pShared->bWindow = FALSE;
+  }
+}
+/*===========================================================================*/
+/*  This function will fill in the pixel info structure defined in D3Dshared.*/
+/* Basicly it will take a DirectDraw pixelformat structure and make scaling  */
+/* values that will convert from 8bit channels to whatever the supplied ddpf */
+/* uses.  Also we will generate shift values that will be used to get move   */
+/* each component of the pixel into place.                                   */
+/*  I have now added a special case for a 1bit alpha channel.  If I find a 1b*/
+/* alpha then I will set the scale to -1.0 which should be unique.  Later I  */
+/* can check the alpha scale value too see if its -1.0 and thus handle it.  I*/
+/* was finding that the case was not working tom my advantage so this is my  */
+/* HACK for the day.  As a TODO I should work on this...                     */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void   Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel )
+{
+  DPF(( DBG_FUNC, "Solve8BitChannelPixelFromat();" ));
+
+  memset( pPixel, 0, sizeof(PPIXELINFO) );
+
+  /* Check too see if the color space is valid in the PF. */
+  if ( pddpf->dwFlags & DDPF_RGB )
+  {
+    /* Solve the red stuff. */
+    pPixel->dwRMask = pddpf->dwRBitMask;
+    pPixel->rShift = CountTrailingZeros( pPixel->dwRMask );
+    pPixel->rScale = (float)0.00392156 * (float)(pPixel->dwRMask >> pPixel->rShift);
+
+    /* Solve the green thingy's. */
+    pPixel->dwGMask = pddpf->dwGBitMask;
+    pPixel->gShift = CountTrailingZeros( pPixel->dwGMask );
+    pPixel->gScale = (float)0.00392156 * (float)(pPixel->dwGMask >> pPixel->gShift);
+
+    /* Solve the blues. */
+    pPixel->dwBMask = pddpf->dwBBitMask;
+    pPixel->bShift = CountTrailingZeros( pddpf->dwBBitMask );
+    pPixel->bScale = (float)0.00392156 * (float)(pddpf->dwBBitMask >> pPixel->bShift);
+  }
+
+  /* Do the alpha channel if there is one. */
+  if ( pddpf->dwFlags & DDPF_ALPHAPIXELS )
+  {
+    pPixel->dwAMask = pddpf->dwRGBAlphaBitMask;
+    pPixel->aShift = CountTrailingZeros( pPixel->dwAMask );
+
+    /* Special case a 1bit alpha. */
+    if ( (pPixel->dwAMask >> pPixel->aShift) == 1 )
+        pPixel->aScale = -1.0;
+    else
+        pPixel->aScale = (float)0.00392156 * (float)(pPixel->dwAMask >> pPixel->aShift);
+  }
+
+  /* Get the size of the pixel in bytes. Should work as dwRGBBitCount is in a union. */
+  pPixel->cb = pddpf->dwRGBBitCount / 8;
+}
+/*===========================================================================*/
+/*  See RETURN :)                                                            */
+/*===========================================================================*/
+/* RETURN: number of contiguous zeros starting from the right.               */
+/*===========================================================================*/
+static int  CountTrailingZeros( DWORD dwMask )
+{
+  DWORD Mask;
+
+  if ( dwMask == 0 ) 
+    return 32;
+
+  /* Can't take credit for this one! */
+  Mask = dwMask & -(int)dwMask;
+  return ((Mask & 0xFFFF0000)!=0) << 4
+         | ((Mask & 0xFF00FF00)!=0) << 3
+         | ((Mask & 0xF0F0F0F0)!=0) << 2
+         | ((Mask & 0xCCCCCCCC)!=0) << 1
+         | ((Mask & 0xAAAAAAAA)!=0);
+}
+/*===========================================================================*/
+/*  This function will convert the DDraw error code to its macro string.  The*/
+/* returned pointer is static so you need not worry about memory managemnet  */
+/* but the error message gets written over from call to call...              */
+/*===========================================================================*/
+/* RETURN: pointer to the single static buffer that hold the error message.  */
+/*===========================================================================*/
+char *ErrorStringD3D( HRESULT hr )
+{
+  static   char  errorString[128];
+
+  switch( hr )
+    {
+    case DDERR_ALREADYINITIALIZED:
+        strcpy( errorString, "DDERR_ALREADYINITIALIZED" );
+        break;
+        
+    case DDERR_CANNOTATTACHSURFACE:
+        strcpy( errorString, "DDERR_CANNOTATTACHSURFACE" );
+        break;
+        
+    case DDERR_CANNOTDETACHSURFACE:
+        strcpy( errorString, "DDERR_CANNOTDETACHSURFACE" );
+        break;
+        
+    case DDERR_CURRENTLYNOTAVAIL:
+        strcpy( errorString, "DDERR_CURRENTLYNOTAVAIL" );
+        break;
+        
+    case DDERR_EXCEPTION:
+        strcpy( errorString, "DDERR_EXCEPTION" );
+        break;
+        
+    case DDERR_GENERIC:
+        strcpy( errorString, "DDERR_GENERIC" );
+        break;
+        
+    case DDERR_HEIGHTALIGN:
+        strcpy( errorString, "DDERR_HEIGHTALIGN" );
+        break;
+        
+    case DDERR_INCOMPATIBLEPRIMARY:
+        strcpy( errorString, "DDERR_INCOMPATIBLEPRIMARY" );
+        break;
+        
+    case DDERR_INVALIDCAPS:
+        strcpy( errorString, "DDERR_INVALIDCAPS" );
+        break;
+        
+    case DDERR_INVALIDCLIPLIST:
+        strcpy( errorString, "DDERR_INVALIDCLIPLIST" );
+        break;
+        
+    case DDERR_INVALIDMODE:
+        strcpy( errorString, "DDERR_INVALIDMODE" );
+        break;
+        
+    case DDERR_INVALIDOBJECT:
+        strcpy( errorString, "DDERR_INVALIDOBJECT" );
+        break;
+        
+    case DDERR_INVALIDPARAMS:
+        strcpy( errorString, "DDERR_INVALIDPARAMS" );
+        break;
+        
+    case DDERR_INVALIDPIXELFORMAT:
+        strcpy( errorString, "DDERR_INVALIDPIXELFORMAT" );
+        break;
+        
+    case DDERR_INVALIDRECT:
+        strcpy( errorString, "DDERR_INVALIDRECT" );
+        break;
+        
+    case DDERR_LOCKEDSURFACES:
+        strcpy( errorString, "DDERR_LOCKEDSURFACES" );
+        break;
+        
+    case DDERR_NO3D:
+        strcpy( errorString, "DDERR_NO3D" );
+        break;
+        
+    case DDERR_NOALPHAHW:
+        strcpy( errorString, "DDERR_NOALPHAHW" );
+        break;
+        
+    case DDERR_NOCLIPLIST:
+        strcpy( errorString, "DDERR_NOCLIPLIST" );
+        break;
+        
+    case DDERR_NOCOLORCONVHW:
+        strcpy( errorString, "DDERR_NOCOLORCONVHW" );
+        break;
+        
+    case DDERR_NOCOOPERATIVELEVELSET:
+        strcpy( errorString, "DDERR_NOCOOPERATIVELEVELSET" );
+        break;
+        
+    case DDERR_NOCOLORKEY:
+        strcpy( errorString, "DDERR_NOCOLORKEY" );
+        break;
+        
+    case DDERR_NOCOLORKEYHW:
+        strcpy( errorString, "DDERR_NOCOLORKEYHW" );
+        break;
+        
+    case DDERR_NODIRECTDRAWSUPPORT:
+        strcpy( errorString, "DDERR_NODIRECTDRAWSUPPORT" );
+        break;
+        
+    case DDERR_NOEXCLUSIVEMODE:
+        strcpy( errorString, "DDERR_NOEXCLUSIVEMODE" );
+        break;
+        
+    case DDERR_NOFLIPHW:
+        strcpy( errorString, "DDERR_NOFLIPHW" );
+        break;
+        
+    case DDERR_NOGDI:
+        strcpy( errorString, "DDERR_NOGDI" );
+        break;
+        
+    case DDERR_NOMIRRORHW:
+        strcpy( errorString, "DDERR_NOMIRRORHW" );
+        break;
+        
+    case DDERR_NOTFOUND:
+        strcpy( errorString, "DDERR_NOTFOUND" );
+        break;
+        
+    case DDERR_NOOVERLAYHW:
+        strcpy( errorString, "DDERR_NOOVERLAYHW" );
+        break;
+        
+    case DDERR_OVERLAPPINGRECTS:
+        strcpy( errorString, "DDERR_OVERLAPPINGRECTS" );
+        break;
+        
+    case DDERR_NORASTEROPHW:
+        strcpy( errorString, "DDERR_NORASTEROPHW" );
+        break;
+        
+    case DDERR_NOROTATIONHW:
+        strcpy( errorString, "DDERR_NOROTATIONHW" );
+        break;
+        
+    case DDERR_NOSTRETCHHW:
+        strcpy( errorString, "DDERR_NOSTRETCHHW" );
+        break;
+        
+    case DDERR_NOT4BITCOLOR:
+        strcpy( errorString, "DDERR_NOT4BITCOLOR" );
+        break;
+        
+    case DDERR_NOT4BITCOLORINDEX:
+        strcpy( errorString, "DDERR_NOT4BITCOLORINDEX" );
+        break;
+        
+    case DDERR_NOT8BITCOLOR:
+        strcpy( errorString, "DDERR_NOT8BITCOLOR" );
+        break;
+        
+    case DDERR_NOTEXTUREHW:
+        strcpy( errorString, "DDERR_NOTEXTUREHW" );
+        break;
+        
+    case DDERR_NOVSYNCHW:
+        strcpy( errorString, "DDERR_NOVSYNCHW" );
+        break;
+        
+    case DDERR_NOZBUFFERHW:
+        strcpy( errorString, "DDERR_NOZBUFFERHW" );
+        break;
+
+    case DDERR_NOZOVERLAYHW:
+        strcpy( errorString, "DDERR_NOZOVERLAYHW" );
+        break;
+        
+    case DDERR_OUTOFCAPS:
+        strcpy( errorString, "DDERR_OUTOFCAPS" );
+        break;
+        
+    case DDERR_OUTOFMEMORY:
+        strcpy( errorString, "DDERR_OUTOFMEMORY" );
+        break;
+        
+    case DDERR_OUTOFVIDEOMEMORY:
+        strcpy( errorString, "DDERR_OUTOFVIDEOMEMORY" );
+        break;
+        
+    case DDERR_OVERLAYCANTCLIP:
+        strcpy( errorString, "DDERR_OVERLAYCANTCLIP" );
+        break;
+        
+    case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:
+        strcpy( errorString, "DDERR_OVERLAYCOLORKEYONLYONEACTIVE" );
+        break;
+        
+    case DDERR_PALETTEBUSY:
+        strcpy( errorString, "DDERR_PALETTEBUSY" );
+        break;
+        
+    case DDERR_COLORKEYNOTSET:
+        strcpy( errorString, "DDERR_COLORKEYNOTSET" );
+        break;
+        
+    case DDERR_SURFACEALREADYATTACHED:
+        strcpy( errorString, "DDERR_SURFACEALREADYATTACHED" );
+        break;
+        
+    case DDERR_SURFACEALREADYDEPENDENT:
+        strcpy( errorString, "DDERR_SURFACEALREADYDEPENDENT" );
+        break;
+        
+    case DDERR_SURFACEBUSY:
+        strcpy( errorString, "DDERR_SURFACEBUSY" );
+        break;
+        
+    case DDERR_CANTLOCKSURFACE:
+        strcpy( errorString, "DDERR_CANTLOCKSURFACE" );
+        break;
+
+    case DDERR_SURFACEISOBSCURED:
+        strcpy( errorString, "DDERR_SURFACEISOBSCURED" );
+        break;
+
+    case DDERR_SURFACELOST:
+        strcpy( errorString, "DDERR_SURFACELOST" );
+        break;
+        
+    case DDERR_SURFACENOTATTACHED:
+        strcpy( errorString, "DDERR_SURFACENOTATTACHED" );
+        break;
+        
+    case DDERR_TOOBIGHEIGHT:
+        strcpy( errorString, "DDERR_TOOBIGHEIGHT" );
+        break;
+        
+    case DDERR_TOOBIGSIZE:
+        strcpy( errorString, "DDERR_TOOBIGSIZE" );
+        break;
+        
+    case DDERR_TOOBIGWIDTH:
+        strcpy( errorString, "DDERR_TOOBIGWIDTH" );
+        break;
+        
+    case DDERR_UNSUPPORTED:
+        strcpy( errorString, "DDERR_UNSUPPORTED" );
+        break;
+        
+    case DDERR_UNSUPPORTEDFORMAT:
+        strcpy( errorString, "DDERR_UNSUPPORTEDFORMAT" );
+        break;
+        
+    case DDERR_UNSUPPORTEDMASK:
+        strcpy( errorString, "DDERR_UNSUPPORTEDMASK" );
+        break;
+        
+    case DDERR_INVALIDSTREAM:
+        strcpy( errorString, "DDERR_INVALIDSTREAM" );
+        break;
+        
+    case DDERR_VERTICALBLANKINPROGRESS:
+        strcpy( errorString, "DDERR_VERTICALBLANKINPROGRESS" );
+        break;
+        
+    case DDERR_WASSTILLDRAWING:
+        strcpy( errorString, "DDERR_WASSTILLDRAWING" );
+        break;
+        
+    case DDERR_XALIGN:
+        strcpy( errorString, "DDERR_XALIGN" );
+        break;
+        
+    case DDERR_INVALIDDIRECTDRAWGUID:
+        strcpy( errorString, "DDERR_INVALIDDIRECTDRAWGUID" );
+        break;
+        
+    case DDERR_DIRECTDRAWALREADYCREATED:
+        strcpy( errorString, "DDERR_DIRECTDRAWALREADYCREATED" );
+        break;
+        
+    case DDERR_NODIRECTDRAWHW:
+        strcpy( errorString, "DDERR_NODIRECTDRAWHW" );
+        break;
+        
+    case DDERR_PRIMARYSURFACEALREADYEXISTS:
+        strcpy( errorString, "DDERR_PRIMARYSURFACEALREADYEXISTS" );
+        break;
+        
+    case DDERR_NOEMULATION:
+        strcpy( errorString, "DDERR_NOEMULATION" );
+        break;
+        
+    case DDERR_REGIONTOOSMALL:
+        strcpy( errorString, "DDERR_REGIONTOOSMALL" );
+        break;
+        
+    case DDERR_CLIPPERISUSINGHWND:
+        strcpy( errorString, "DDERR_CLIPPERISUSINGHWND" );
+        break;
+        
+    case DDERR_NOCLIPPERATTACHED:
+        strcpy( errorString, "DDERR_NOCLIPPERATTACHED" );
+        break;
+        
+    case DDERR_NOHWND:
+        strcpy( errorString, "DDERR_NOHWND" );
+        break;
+        
+    case DDERR_HWNDSUBCLASSED:
+        strcpy( errorString, "DDERR_HWNDSUBCLASSED" );
+        break;
+        
+    case DDERR_HWNDALREADYSET:
+        strcpy( errorString, "DDERR_HWNDALREADYSET" );
+        break;
+        
+    case DDERR_NOPALETTEATTACHED:
+        strcpy( errorString, "DDERR_NOPALETTEATTACHED" );
+        break;
+        
+    case DDERR_NOPALETTEHW:
+        strcpy( errorString, "DDERR_NOPALETTEHW" );
+        break;
+        
+    case DDERR_BLTFASTCANTCLIP:
+         strcpy( errorString, "DDERR_BLTFASTCANTCLIP" );
+         break;
+
+      case DDERR_NOBLTHW:
+         strcpy( errorString, "DDERR_NOBLTHW" );
+         break;
+
+      case DDERR_NODDROPSHW:
+         strcpy( errorString, "DDERR_NODDROPSHW" );
+         break;
+
+      case DDERR_OVERLAYNOTVISIBLE:
+         strcpy( errorString, "DDERR_OVERLAYNOTVISIBLE" );
+         break;
+
+      case DDERR_NOOVERLAYDEST:
+         strcpy( errorString, "DDERR_NOOVERLAYDEST" );
+         break;
+
+      case DDERR_INVALIDPOSITION:
+         strcpy( errorString, "DDERR_INVALIDPOSITION" );
+         break;
+
+      case DDERR_NOTAOVERLAYSURFACE:
+         strcpy( errorString, "DDERR_NOTAOVERLAYSURFACE" );
+         break;
+
+      case DDERR_EXCLUSIVEMODEALREADYSET:
+         strcpy( errorString, "DDERR_EXCLUSIVEMODEALREADYSET" );
+         break;
+
+      case DDERR_NOTFLIPPABLE:
+         strcpy( errorString, "DDERR_NOTFLIPPABLE" );
+         break;
+
+      case DDERR_CANTDUPLICATE:
+         strcpy( errorString, "DDERR_CANTDUPLICATE" );
+         break;
+
+      case DDERR_NOTLOCKED:
+         strcpy( errorString, "DDERR_NOTLOCKED" );
+         break;
+
+      case DDERR_CANTCREATEDC:
+         strcpy( errorString, "DDERR_CANTCREATEDC" );
+         break;
+
+      case DDERR_NODC:
+         strcpy( errorString, "DDERR_NODC" );
+         break;
+
+      case DDERR_WRONGMODE:
+         strcpy( errorString, "DDERR_WRONGMODE" );
+         break;
+
+      case DDERR_IMPLICITLYCREATED:
+         strcpy( errorString, "DDERR_IMPLICITLYCREATED" );
+         break;
+
+      case DDERR_NOTPALETTIZED:
+         strcpy( errorString, "DDERR_NOTPALETTIZED" );
+         break;
+
+      case DDERR_UNSUPPORTEDMODE:
+         strcpy( errorString, "DDERR_UNSUPPORTEDMODE" );
+         break;
+
+      case DDERR_NOMIPMAPHW:
+         strcpy( errorString, "DDERR_NOMIPMAPHW" );
+         break;
+
+      case DDERR_INVALIDSURFACETYPE:
+         strcpy( errorString, "DDERR_INVALIDSURFACETYPE" );
+         break;
+
+      case DDERR_NOOPTIMIZEHW:
+         strcpy( errorString, "DDERR_NOOPTIMIZEHW" );
+         break;
+
+      case DDERR_NOTLOADED:
+         strcpy( errorString, "DDERR_NOTLOADED" );
+         break;
+
+      case DDERR_NOFOCUSWINDOW:
+         strcpy( errorString, "DDERR_NOFOCUSWINDOW" );
+         break;
+
+      case DDERR_DCALREADYCREATED:
+         strcpy( errorString, "DDERR_DCALREADYCREATED" );
+         break;
+
+      case DDERR_NONONLOCALVIDMEM:
+         strcpy( errorString, "DDERR_NONONLOCALVIDMEM" );
+         break;
+
+      case DDERR_CANTPAGELOCK:
+         strcpy( errorString, "DDERR_CANTPAGELOCK" );
+         break;
+
+      case DDERR_CANTPAGEUNLOCK:
+         strcpy( errorString, "DDERR_CANTPAGEUNLOCK" );
+         break;
+
+      case DDERR_NOTPAGELOCKED:
+         strcpy( errorString, "DDERR_NOTPAGELOCKED" );
+         break;
+
+      case DDERR_MOREDATA:
+         strcpy( errorString, "DDERR_MOREDATA" );
+         break;
+
+      case DDERR_EXPIRED:
+         strcpy( errorString, "DDERR_EXPIRED" );
+         break;
+
+      case DDERR_VIDEONOTACTIVE:
+         strcpy( errorString, "DDERR_VIDEONOTACTIVE" );
+         break;
+
+      case DDERR_DEVICEDOESNTOWNSURFACE:
+         strcpy( errorString, "DDERR_DEVICEDOESNTOWNSURFACE" );
+         break;
+
+      case DDERR_NOTINITIALIZED:
+         strcpy( errorString, "DDERR_NOTINITIALIZED" );
+         break;
+
+      default:
+         strcpy( errorString, "<unknown error code>" );
+         break;
+   }
+
+   return &errorString[0];
+} 
index a02a89debbb6feb79b4498beb6cc123457fc9bae..10dcfdbabba0936a6cd4228dd5e2b3cdc2347c8a 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "D3DMesa.h"\r
-/*===========================================================================*/\r
-/*  This call will clear the render surface using the pixel info built from  */\r
-/* the surface at creation time.  The call uses Lock/Unlock to access the    */\r
-/* surface.  The call also special cases a full clear or a dirty rectangle.  */\r
-/*  Finally the call returns the new clear mask that reflects that the color */\r
-/* buffer was cleared.                                                       */\r
-/*===========================================================================*/\r
-/* RETURN: the original mask with the bits cleared that represents the buffer*/\r
-/* or buffers we just cleared.                                               */\r
-/*===========================================================================*/\r
-GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   UCHAR          *pBuffer,\r
-                  *pScanLine;\r
-   int            index,\r
-                     index2;\r
-   DWORD          dwColor;\r
-\r
-   if ( mask & GL_COLOR_BUFFER_BIT )\r
-   {\r
-       /* Lock the surface to get the surface pointer. */\r
-       pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-   \r
-       /* Solve the color once only. */\r
-       dwColor =  ( ((DWORD)((float)pContext->rClear * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-       dwColor |= ( ((DWORD)((float)pContext->gClear * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-       dwColor |= ( ((DWORD)((float)pContext->bClear * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-   \r
-       if ( all ) \r
-       {\r
-         for( index = 0, pScanLine = (UCHAR *)pddsd2->lpSurface; index < pContext->pShared->dwHeight; index++, pScanLine += pddsd2->lPitch )\r
-           for( pBuffer = pScanLine, index2 = 0; index2 < pContext->pShared->dwWidth; index2++, pBuffer += pContext->pShared->pixel.cb )\r
-               memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-       }\r
-       else\r
-       {\r
-         pScanLine = ((UCHAR *)pddsd2->lpSurface) +\r
-                   ( (FLIP( pContext->pShared->dwHeight, (y+height)) * pddsd2->lPitch) + (x * pContext->pShared->pixel.cb) );\r
-\r
-         for( index = 0; index < height; index++, pScanLine += pddsd2->lPitch )\r
-         {\r
-           for( index2 = 0, pBuffer = pScanLine; index2 < width; index2++, pBuffer += pContext->pShared->pixel.cb )\r
-                memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-         }\r
-       }\r
-   \r
-       UnlockHAL( pContext->pShared, TRUE );\r
-   }\r
-   \r
-   return (mask & ~GL_COLOR_BUFFER_BIT);\r
-}\r
-/*===========================================================================*/\r
-/*  This proc (as all others) has been written for the general case. I use   */\r
-/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */\r
-/* Screen render surface uses.  The alpha is ignored as Mesa does it in SW.  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */ \r
-/*===========================================================================*/\r
-void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   UCHAR          *pBuffer;\r
-   int            index;\r
-   DWORD          dwColor;\r
-\r
-   /* Get the surface pointer and the pitch. */\r
-   pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-\r
-   /* Find the start of the span. Invert y for Windows. */\r
-   pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);\r
-\r
-   if ( mask ) \r
-   {\r
-       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )\r
-       {\r
-         if ( mask[index] )\r
-         {\r
-           /* Pack the color components. */\r
-           dwColor =  ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-           dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-           dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-         }\r
-       }       \r
-   }\r
-   else\r
-   {\r
-       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )\r
-       {\r
-         /* Pack the color components. */\r
-         dwColor =  ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-         dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-         dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-       }\r
-   }\r
-\r
-   /* Giver back. */\r
-   UnlockHAL( pContext->pShared, TRUE );\r
-}\r
-/*===========================================================================*/\r
-/*  This proc (as all others) has been written for the general case. I use   */\r
-/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */\r
-/* Screen render surface uses.  The alpha is ignored as Mesa does it in SW.  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */ \r
-/*===========================================================================*/\r
-void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   UCHAR          *pBuffer;\r
-   int            index;\r
-   DWORD          dwColor;\r
-\r
-   /* Get the surface pointer and the pitch. */\r
-   pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-\r
-   /* Find the start of the span. Invert y for Windows. */\r
-   pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);\r
-\r
-   if ( mask ) \r
-   {\r
-       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )\r
-       {\r
-         if ( mask[index] )\r
-         {\r
-         /* Pack the color components. */\r
-           dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-           dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-           dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-         }\r
-       }       \r
-   }\r
-   else\r
-   {\r
-       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )\r
-       {\r
-         /* Pack the color components. */\r
-         dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-         dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-         dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-       }\r
-   }\r
-\r
-   /* Giver back. */\r
-   UnlockHAL( pContext->pShared, TRUE );\r
-}\r
-/*===========================================================================*/\r
-/*  This proc (as all others) has been written for the general case. I use   */\r
-/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */\r
-/* Screen render surface uses.  The color is solved once from the current    */\r
-/* color components.  The alpha is ignored as Mesa is doing it in SW.        */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */ \r
-/*===========================================================================*/\r
-void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   UCHAR          *pBuffer;\r
-   int            index;\r
-   DWORD          dwColor;\r
-\r
-   /* Lock the surface to get the surface pointer and the pitch. */\r
-   pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-\r
-   /* Solve the color once only. (no alpha) */\r
-   dwColor =  ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-   dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-   dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-\r
-   /* Find the start of the span. Invert y for Windows. */\r
-   pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);\r
-\r
-   if ( mask ) \r
-   {\r
-       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )\r
-         if ( mask[index] )\r
-           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-   }\r
-   else\r
-   {\r
-       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )\r
-         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-   }\r
-\r
-   /* Giver back. */\r
-   UnlockHAL( pContext->pShared, TRUE );\r
-}\r
-/*===========================================================================*/\r
-/*  This proc (as all others) has been written for the general case. I use   */\r
-/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */\r
-/* Screen render surface uses.  The alpha is ignored as Mesa does it in SW.  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */ \r
-/*===========================================================================*/\r
-void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   UCHAR          *pBuffer;\r
-   int            index;\r
-   DWORD          dwColor;\r
-\r
-   /* Get the surface pointer and the pitch. */\r
-   pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-\r
-   if ( mask ) \r
-   {\r
-       for( index = 0; index < n; index++ )\r
-       {\r
-         if ( mask[index] )\r
-         {\r
-           /* Pack the color components. */\r
-           dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-           dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-           dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-\r
-           /* Find the pixel. Invert y for Windows. */\r
-           pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);\r
-           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-         }\r
-       }\r
-   }\r
-   else\r
-   {\r
-       for( index = 0; index < n; index++ )\r
-       {\r
-         /* Pack the color components. */\r
-         dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-         dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-         dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-\r
-         /* Find the pixel. Invert y for Windows. */\r
-         pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);\r
-         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-       }\r
-   }\r
-\r
-   /* Giver back. */\r
-   UnlockHAL( pContext->pShared, TRUE );\r
-}\r
-/*===========================================================================*/\r
-/*  This proc (as all others) has been written for the general case. I use   */\r
-/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */\r
-/* Screen render surface uses.  The color is solved once from the current    */\r
-/* color components.  The alpha is ignored as Mesa is doing it in SW.        */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */ \r
-/*===========================================================================*/\r
-void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   UCHAR          *pBuffer;\r
-   int            index;\r
-   DWORD          dwColor;\r
-\r
-   /* Get the surface pointer and the pitch. */\r
-   pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-\r
-   /* Solve the color once only. I don't uses the alpha. */\r
-   dwColor =  ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );\r
-   dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );\r
-   dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );\r
-\r
-   if ( mask ) \r
-   {\r
-       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */\r
-       for( index = 0; index < n; index++ )\r
-       {\r
-         if ( mask[index] )\r
-         {\r
-           /* Find the pixel. Invert y for Windows. */\r
-           pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);\r
-           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-         }\r
-       }\r
-   }\r
-   else\r
-   {\r
-       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */\r
-       for( index = 0; index < n; index++ )\r
-       {\r
-         /* Find the pixel. Invert y for Windows. */\r
-         pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);\r
-         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );\r
-       }\r
-   }\r
-\r
-   /* Giver back. */\r
-   UnlockHAL( pContext->pShared, TRUE );\r
-}\r
-/*===========================================================================*/\r
-/*  This proc isn't written for speed rather its to handle the general case. */\r
-/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/\r
-/* structure that was generated from the OffScreen surface pixelformat.  The */\r
-/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/\r
-/* own alpha channel when the context was created.  I did this as I didn't   */\r
-/* feel that it was worth the effort to try and get HW to work (bus bound).  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   UCHAR          *pBuffer;\r
-   int            index;\r
-   DWORD          *pdwColor;\r
-\r
-   /* Get the surface pointer and the pitch. */\r
-   pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-\r
-   /* Find the start of the span. Invert y for Windows. */\r
-   pBuffer = (UCHAR *)pddsd2->lpSurface + \r
-                        (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + \r
-                        (x*pContext->pShared->pixel.cb);\r
-\r
-   /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */\r
-   for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )\r
-   {\r
-       pdwColor = (DWORD *)pBuffer;\r
-       rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);\r
-       rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);\r
-       rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);\r
-   }\r
-\r
-   /* Giver back. */\r
-   UnlockHAL( pContext->pShared, TRUE );\r
-}\r
-/*===========================================================================*/\r
-/*  This proc isn't written for speed rather its to handle the general case. */\r
-/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/\r
-/* structure that was generated from the OffScreen surface pixelformat.  The */\r
-/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/\r
-/* own alpha channel when the context was created.  I did this as I didn't   */\r
-/* feel that it was worth the effort to try and get HW to work (bus bound).  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   DDSURFACEDESC2 *pddsd2;\r
-   int            index;\r
-   DWORD          *pdwColor;\r
-\r
-   /* Get the surface pointer and the pitch. */\r
-   pddsd2 = LockHAL( pContext->pShared, TRUE );\r
-\r
-   if ( mask )\r
-   {\r
-       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */\r
-       for( index = 0; index < n; index++ )\r
-       {\r
-         if ( mask[index] )\r
-         {\r
-           /* Find the start of the pixel. Invert y for Windows. */\r
-           pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));\r
-           rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);\r
-           rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);\r
-           rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);\r
-         }\r
-       }\r
-   }\r
-   else\r
-   {\r
-       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */\r
-       for( index = 0; index < n; index++ )\r
-       {\r
-         /* Find the start of the pixel. Invert y for Windows. */\r
-         pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));\r
-         rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);\r
-         rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);\r
-         rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);\r
-       }\r
-   }\r
-\r
-   /* Giver back. */\r
-   UnlockHAL( pContext->pShared, TRUE );\r
-}\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "D3DMesa.h"
+/*===========================================================================*/
+/*  This call will clear the render surface using the pixel info built from  */
+/* the surface at creation time.  The call uses Lock/Unlock to access the    */
+/* surface.  The call also special cases a full clear or a dirty rectangle.  */
+/*  Finally the call returns the new clear mask that reflects that the color */
+/* buffer was cleared.                                                       */
+/*===========================================================================*/
+/* RETURN: the original mask with the bits cleared that represents the buffer*/
+/* or buffers we just cleared.                                               */
+/*===========================================================================*/
+GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   UCHAR          *pBuffer,
+                  *pScanLine;
+   int            index,
+                     index2;
+   DWORD          dwColor;
+
+   if ( mask & GL_COLOR_BUFFER_BIT )
+   {
+       /* Lock the surface to get the surface pointer. */
+       pddsd2 = LockHAL( pContext->pShared, TRUE );
+   
+       /* Solve the color once only. */
+       dwColor =  ( ((DWORD)((float)pContext->rClear * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+       dwColor |= ( ((DWORD)((float)pContext->gClear * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+       dwColor |= ( ((DWORD)((float)pContext->bClear * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+   
+       if ( all ) 
+       {
+         for( index = 0, pScanLine = (UCHAR *)pddsd2->lpSurface; index < pContext->pShared->dwHeight; index++, pScanLine += pddsd2->lPitch )
+           for( pBuffer = pScanLine, index2 = 0; index2 < pContext->pShared->dwWidth; index2++, pBuffer += pContext->pShared->pixel.cb )
+               memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+       }
+       else
+       {
+         pScanLine = ((UCHAR *)pddsd2->lpSurface) +
+                   ( (FLIP( pContext->pShared->dwHeight, (y+height)) * pddsd2->lPitch) + (x * pContext->pShared->pixel.cb) );
+
+         for( index = 0; index < height; index++, pScanLine += pddsd2->lPitch )
+         {
+           for( index2 = 0, pBuffer = pScanLine; index2 < width; index2++, pBuffer += pContext->pShared->pixel.cb )
+                memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+         }
+       }
+   
+       UnlockHAL( pContext->pShared, TRUE );
+   }
+   
+   return (mask & ~GL_COLOR_BUFFER_BIT);
+}
+/*===========================================================================*/
+/*  This proc (as all others) has been written for the general case. I use   */
+/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
+/* Screen render surface uses.  The alpha is ignored as Mesa does it in SW.  */
+/*===========================================================================*/
+/* RETURN:                                                                   */ 
+/*===========================================================================*/
+void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   UCHAR          *pBuffer;
+   int            index;
+   DWORD          dwColor;
+
+   /* Get the surface pointer and the pitch. */
+   pddsd2 = LockHAL( pContext->pShared, TRUE );
+
+   /* Find the start of the span. Invert y for Windows. */
+   pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
+
+   if ( mask ) 
+   {
+       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
+       {
+         if ( mask[index] )
+         {
+           /* Pack the color components. */
+           dwColor =  ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+           dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+           dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+         }
+       }       
+   }
+   else
+   {
+       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
+       {
+         /* Pack the color components. */
+         dwColor =  ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+         dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+         dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+       }
+   }
+
+   /* Giver back. */
+   UnlockHAL( pContext->pShared, TRUE );
+}
+/*===========================================================================*/
+/*  This proc (as all others) has been written for the general case. I use   */
+/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
+/* Screen render surface uses.  The alpha is ignored as Mesa does it in SW.  */
+/*===========================================================================*/
+/* RETURN:                                                                   */ 
+/*===========================================================================*/
+void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   UCHAR          *pBuffer;
+   int            index;
+   DWORD          dwColor;
+
+   /* Get the surface pointer and the pitch. */
+   pddsd2 = LockHAL( pContext->pShared, TRUE );
+
+   /* Find the start of the span. Invert y for Windows. */
+   pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
+
+   if ( mask ) 
+   {
+       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
+       {
+         if ( mask[index] )
+         {
+         /* Pack the color components. */
+           dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+           dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+           dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+         }
+       }       
+   }
+   else
+   {
+       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
+       {
+         /* Pack the color components. */
+         dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+         dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+         dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+       }
+   }
+
+   /* Giver back. */
+   UnlockHAL( pContext->pShared, TRUE );
+}
+/*===========================================================================*/
+/*  This proc (as all others) has been written for the general case. I use   */
+/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
+/* Screen render surface uses.  The color is solved once from the current    */
+/* color components.  The alpha is ignored as Mesa is doing it in SW.        */
+/*===========================================================================*/
+/* RETURN:                                                                   */ 
+/*===========================================================================*/
+void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   UCHAR          *pBuffer;
+   int            index;
+   DWORD          dwColor;
+
+   /* Lock the surface to get the surface pointer and the pitch. */
+   pddsd2 = LockHAL( pContext->pShared, TRUE );
+
+   /* Solve the color once only. (no alpha) */
+   dwColor =  ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+   dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+   dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+
+   /* Find the start of the span. Invert y for Windows. */
+   pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
+
+   if ( mask ) 
+   {
+       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
+         if ( mask[index] )
+           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+   }
+   else
+   {
+       for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
+         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+   }
+
+   /* Giver back. */
+   UnlockHAL( pContext->pShared, TRUE );
+}
+/*===========================================================================*/
+/*  This proc (as all others) has been written for the general case. I use   */
+/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
+/* Screen render surface uses.  The alpha is ignored as Mesa does it in SW.  */
+/*===========================================================================*/
+/* RETURN:                                                                   */ 
+/*===========================================================================*/
+void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   UCHAR          *pBuffer;
+   int            index;
+   DWORD          dwColor;
+
+   /* Get the surface pointer and the pitch. */
+   pddsd2 = LockHAL( pContext->pShared, TRUE );
+
+   if ( mask ) 
+   {
+       for( index = 0; index < n; index++ )
+       {
+         if ( mask[index] )
+         {
+           /* Pack the color components. */
+           dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+           dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+           dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+
+           /* Find the pixel. Invert y for Windows. */
+           pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
+           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+         }
+       }
+   }
+   else
+   {
+       for( index = 0; index < n; index++ )
+       {
+         /* Pack the color components. */
+         dwColor =  ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+         dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+         dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+
+         /* Find the pixel. Invert y for Windows. */
+         pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
+         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+       }
+   }
+
+   /* Giver back. */
+   UnlockHAL( pContext->pShared, TRUE );
+}
+/*===========================================================================*/
+/*  This proc (as all others) has been written for the general case. I use   */
+/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
+/* Screen render surface uses.  The color is solved once from the current    */
+/* color components.  The alpha is ignored as Mesa is doing it in SW.        */
+/*===========================================================================*/
+/* RETURN:                                                                   */ 
+/*===========================================================================*/
+void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   UCHAR          *pBuffer;
+   int            index;
+   DWORD          dwColor;
+
+   /* Get the surface pointer and the pitch. */
+   pddsd2 = LockHAL( pContext->pShared, TRUE );
+
+   /* Solve the color once only. I don't uses the alpha. */
+   dwColor =  ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
+   dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
+   dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
+
+   if ( mask ) 
+   {
+       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
+       for( index = 0; index < n; index++ )
+       {
+         if ( mask[index] )
+         {
+           /* Find the pixel. Invert y for Windows. */
+           pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
+           memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+         }
+       }
+   }
+   else
+   {
+       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
+       for( index = 0; index < n; index++ )
+       {
+         /* Find the pixel. Invert y for Windows. */
+         pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
+         memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
+       }
+   }
+
+   /* Giver back. */
+   UnlockHAL( pContext->pShared, TRUE );
+}
+/*===========================================================================*/
+/*  This proc isn't written for speed rather its to handle the general case. */
+/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/
+/* structure that was generated from the OffScreen surface pixelformat.  The */
+/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/
+/* own alpha channel when the context was created.  I did this as I didn't   */
+/* feel that it was worth the effort to try and get HW to work (bus bound).  */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   UCHAR          *pBuffer;
+   int            index;
+   DWORD          *pdwColor;
+
+   /* Get the surface pointer and the pitch. */
+   pddsd2 = LockHAL( pContext->pShared, TRUE );
+
+   /* Find the start of the span. Invert y for Windows. */
+   pBuffer = (UCHAR *)pddsd2->lpSurface + 
+                        (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + 
+                        (x*pContext->pShared->pixel.cb);
+
+   /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
+   for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
+   {
+       pdwColor = (DWORD *)pBuffer;
+       rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
+       rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
+       rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
+   }
+
+   /* Giver back. */
+   UnlockHAL( pContext->pShared, TRUE );
+}
+/*===========================================================================*/
+/*  This proc isn't written for speed rather its to handle the general case. */
+/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/
+/* structure that was generated from the OffScreen surface pixelformat.  The */
+/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/
+/* own alpha channel when the context was created.  I did this as I didn't   */
+/* feel that it was worth the effort to try and get HW to work (bus bound).  */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   DDSURFACEDESC2 *pddsd2;
+   int            index;
+   DWORD          *pdwColor;
+
+   /* Get the surface pointer and the pitch. */
+   pddsd2 = LockHAL( pContext->pShared, TRUE );
+
+   if ( mask )
+   {
+       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
+       for( index = 0; index < n; index++ )
+       {
+         if ( mask[index] )
+         {
+           /* Find the start of the pixel. Invert y for Windows. */
+           pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));
+           rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
+           rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
+           rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
+         }
+       }
+   }
+   else
+   {
+       /* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
+       for( index = 0; index < n; index++ )
+       {
+         /* Find the start of the pixel. Invert y for Windows. */
+         pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));
+         rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
+         rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
+         rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
+       }
+   }
+
+   /* Giver back. */
+   UnlockHAL( pContext->pShared, TRUE );
+}
index dfa524bf3147dbe32d772e0a0ab08578c4266819..79e273903ac920b1bad8f5b537fcc77af0a037f4 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "Debug.h"\r
-/*===========================================================================*/\r
-/* Global variables.                                                         */\r
-/*===========================================================================*/\r
-DWORD  g_DBGMask = DBG_ALL_ERROR;\r
-/*===========================================================================*/\r
-/*  This is your basic DPF function with printf like support.  The function  */\r
-/* also works with a global debug mask variable.  I have written support that*/\r
-/* allows for the user's enviroment variable space to be read and set the    */\r
-/* masks.  This is done when the dll starts and is only in the debug version.*/\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void _cdecl DebugPrint( int mask, char *pszFormat, ... )\r
-{\r
-  char buffer[512];\r
-  va_list      args;\r
-\r
-  /* A mask of 0 will always pass. Easy to remeber. */\r
-  if ( (mask == 0) || (mask & g_DBGMask) ) \r
-  {\r
-    va_start( args, pszFormat );\r
-\r
-    if ( mask & DBG_ALL_ERROR ) \r
-        OutputDebugString( "MesaD3D: (ERROR)" ); \r
-    else\r
-        OutputDebugString( "MesaD3D: " ); \r
-\r
-    vsprintf( buffer, pszFormat, args );\r
-    strcat( buffer, "\n" );\r
-    OutputDebugString( buffer );\r
-\r
-    va_end( args );\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*  This call reads the users enviroment variables and sets any debug mask   */\r
-/* that they have set to TRUE.  Now the value must be "TRUE".                */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void   ReadDBGEnv( void )\r
-{\r
-  g_DBGMask = DBG_ALL_ERROR;\r
-\r
-#define IS_VAR_SET(v)  if ( getenv( # v ) && !strcmp(getenv( # v ),"TRUE") ) g_DBGMask |= v;\r
-  \r
-  IS_VAR_SET( DBG_FUNC );\r
-  IS_VAR_SET( DBG_STATES );\r
-\r
-  IS_VAR_SET( DBG_CNTX_INFO );\r
-  IS_VAR_SET( DBG_CNTX_WARN );\r
-  IS_VAR_SET( DBG_CNTX_PROFILE );\r
-  IS_VAR_SET( DBG_CNTX_ERROR );\r
-  IS_VAR_SET( DBG_CNTX_ALL );\r
-\r
-  IS_VAR_SET( DBG_PRIM_INFO );\r
-  IS_VAR_SET( DBG_PRIM_WARN );\r
-  IS_VAR_SET( DBG_PRIM_PROFILE );\r
-  IS_VAR_SET( DBG_PRIM_ERROR );\r
-  IS_VAR_SET( DBG_PRIM_ALL );\r
-\r
-  IS_VAR_SET( DBG_TXT_INFO );\r
-  IS_VAR_SET( DBG_TXT_WARN );\r
-  IS_VAR_SET( DBG_TXT_PROFILE );\r
-  IS_VAR_SET( DBG_TXT_ERROR );\r
-  IS_VAR_SET( DBG_TXT_ALL );\r
-\r
-  IS_VAR_SET( DBG_ALL_INFO );\r
-  IS_VAR_SET( DBG_ALL_WARN );\r
-  IS_VAR_SET( DBG_ALL_PROFILE );\r
-  IS_VAR_SET( DBG_ALL_ERROR );\r
-  IS_VAR_SET( DBG_ALL );\r
-\r
-#undef IS_VAR_SET\r
-}\r
-/*===========================================================================*/\r
-/*  This function will take a pointer to a DDSURFACEDESC2 structure & display*/\r
-/* the parsed information using a DPF call.                                  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-void   DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf )\r
-{\r
-  char buffer[256];\r
-\r
-  /* Parse the flag type and write the string equivalent. */\r
-  if ( pddpf->dwFlags & DDPF_ALPHA )\r
-       strcat( buffer, "DDPF_ALPHA " );\r
-  if ( pddpf->dwFlags & DDPF_ALPHAPIXELS )\r
-       strcat( buffer, "DDPF_ALPHAPIXELS " );\r
-  if ( pddpf->dwFlags & DDPF_ALPHAPREMULT )\r
-       strcat( buffer, "DDPF_ALPHAPREMULT " );\r
-  if ( pddpf->dwFlags & DDPF_BUMPLUMINANCE )\r
-       strcat( buffer, "DDPF_BUMPLUMINANCE " );\r
-  if ( pddpf->dwFlags & DDPF_BUMPDUDV )\r
-       strcat( buffer, "DDPF_BUMPDUDV " );\r
-  if ( pddpf->dwFlags & DDPF_COMPRESSED )\r
-       strcat( buffer, "DDPF_COMPRESSED " );\r
-  if ( pddpf->dwFlags & DDPF_FOURCC )\r
-       strcat( buffer, "DDPF_FOURCC " );\r
-  if ( pddpf->dwFlags & DDPF_LUMINANCE )\r
-       strcat( buffer, "DDPF_LUMINANCE " );\r
-  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED1 )\r
-       strcat( buffer, "DDPF_PALETTEINDEXED1 " );\r
-  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED2 )\r
-       strcat( buffer, "DDPF_PALETTEINDEXED2 " );\r
-  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED4 )\r
-       strcat( buffer, "DDPF_PALETTEINDEXED4 " );\r
-  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED8 )\r
-       strcat( buffer, "DDPF_PALETTEINDEXED8 " );\r
-  if ( pddpf->dwFlags & DDPF_PALETTEINDEXEDTO8 )\r
-       strcat( buffer, "DDPF_PALETTEINDEXEDTO8 " );\r
-  if ( pddpf->dwFlags & DDPF_RGB )\r
-       strcat( buffer, "DDPF_RGB  " );\r
-  if ( pddpf->dwFlags & DDPF_RGBTOYUV )\r
-       strcat( buffer, "DDPF_RGBTOYUV  " );\r
-  if ( pddpf->dwFlags & DDPF_STENCILBUFFER )\r
-       strcat( buffer, "DDPF_STENCILBUFFER  " );\r
-  if ( pddpf->dwFlags & DDPF_YUV )\r
-       strcat( buffer, "DDPF_YUV  " );\r
-  if ( pddpf->dwFlags & DDPF_ZBUFFER )\r
-       strcat( buffer, "DDPF_ZBUFFER  " );\r
-  if ( pddpf->dwFlags & DDPF_ZPIXELS )\r
-       strcat( buffer, "DDPF_ZPIXELS  " );\r
-\r
-  DPF(( (DBG_TXT_INFO|DBG_CNTX_INFO),"%s", buffer ));\r
-}\r
-\r
-\r
-\r
-\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "Debug.h"
+/*===========================================================================*/
+/* Global variables.                                                         */
+/*===========================================================================*/
+DWORD  g_DBGMask = DBG_ALL_ERROR;
+/*===========================================================================*/
+/*  This is your basic DPF function with printf like support.  The function  */
+/* also works with a global debug mask variable.  I have written support that*/
+/* allows for the user's enviroment variable space to be read and set the    */
+/* masks.  This is done when the dll starts and is only in the debug version.*/
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void _cdecl DebugPrint( int mask, char *pszFormat, ... )
+{
+  char buffer[512];
+  va_list      args;
+
+  /* A mask of 0 will always pass. Easy to remeber. */
+  if ( (mask == 0) || (mask & g_DBGMask) ) 
+  {
+    va_start( args, pszFormat );
+
+    if ( mask & DBG_ALL_ERROR ) 
+        OutputDebugString( "MesaD3D: (ERROR)" ); 
+    else
+        OutputDebugString( "MesaD3D: " ); 
+
+    vsprintf( buffer, pszFormat, args );
+    strcat( buffer, "\n" );
+    OutputDebugString( buffer );
+
+    va_end( args );
+  }
+}
+/*===========================================================================*/
+/*  This call reads the users enviroment variables and sets any debug mask   */
+/* that they have set to TRUE.  Now the value must be "TRUE".                */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void   ReadDBGEnv( void )
+{
+  g_DBGMask = DBG_ALL_ERROR;
+
+#define IS_VAR_SET(v)  if ( getenv( # v ) && !strcmp(getenv( # v ),"TRUE") ) g_DBGMask |= v;
+  
+  IS_VAR_SET( DBG_FUNC );
+  IS_VAR_SET( DBG_STATES );
+
+  IS_VAR_SET( DBG_CNTX_INFO );
+  IS_VAR_SET( DBG_CNTX_WARN );
+  IS_VAR_SET( DBG_CNTX_PROFILE );
+  IS_VAR_SET( DBG_CNTX_ERROR );
+  IS_VAR_SET( DBG_CNTX_ALL );
+
+  IS_VAR_SET( DBG_PRIM_INFO );
+  IS_VAR_SET( DBG_PRIM_WARN );
+  IS_VAR_SET( DBG_PRIM_PROFILE );
+  IS_VAR_SET( DBG_PRIM_ERROR );
+  IS_VAR_SET( DBG_PRIM_ALL );
+
+  IS_VAR_SET( DBG_TXT_INFO );
+  IS_VAR_SET( DBG_TXT_WARN );
+  IS_VAR_SET( DBG_TXT_PROFILE );
+  IS_VAR_SET( DBG_TXT_ERROR );
+  IS_VAR_SET( DBG_TXT_ALL );
+
+  IS_VAR_SET( DBG_ALL_INFO );
+  IS_VAR_SET( DBG_ALL_WARN );
+  IS_VAR_SET( DBG_ALL_PROFILE );
+  IS_VAR_SET( DBG_ALL_ERROR );
+  IS_VAR_SET( DBG_ALL );
+
+#undef IS_VAR_SET
+}
+/*===========================================================================*/
+/*  This function will take a pointer to a DDSURFACEDESC2 structure & display*/
+/* the parsed information using a DPF call.                                  */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+void   DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf )
+{
+  char buffer[256];
+
+  /* Parse the flag type and write the string equivalent. */
+  if ( pddpf->dwFlags & DDPF_ALPHA )
+       strcat( buffer, "DDPF_ALPHA " );
+  if ( pddpf->dwFlags & DDPF_ALPHAPIXELS )
+       strcat( buffer, "DDPF_ALPHAPIXELS " );
+  if ( pddpf->dwFlags & DDPF_ALPHAPREMULT )
+       strcat( buffer, "DDPF_ALPHAPREMULT " );
+  if ( pddpf->dwFlags & DDPF_BUMPLUMINANCE )
+       strcat( buffer, "DDPF_BUMPLUMINANCE " );
+  if ( pddpf->dwFlags & DDPF_BUMPDUDV )
+       strcat( buffer, "DDPF_BUMPDUDV " );
+  if ( pddpf->dwFlags & DDPF_COMPRESSED )
+       strcat( buffer, "DDPF_COMPRESSED " );
+  if ( pddpf->dwFlags & DDPF_FOURCC )
+       strcat( buffer, "DDPF_FOURCC " );
+  if ( pddpf->dwFlags & DDPF_LUMINANCE )
+       strcat( buffer, "DDPF_LUMINANCE " );
+  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED1 )
+       strcat( buffer, "DDPF_PALETTEINDEXED1 " );
+  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED2 )
+       strcat( buffer, "DDPF_PALETTEINDEXED2 " );
+  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED4 )
+       strcat( buffer, "DDPF_PALETTEINDEXED4 " );
+  if ( pddpf->dwFlags & DDPF_PALETTEINDEXED8 )
+       strcat( buffer, "DDPF_PALETTEINDEXED8 " );
+  if ( pddpf->dwFlags & DDPF_PALETTEINDEXEDTO8 )
+       strcat( buffer, "DDPF_PALETTEINDEXEDTO8 " );
+  if ( pddpf->dwFlags & DDPF_RGB )
+       strcat( buffer, "DDPF_RGB  " );
+  if ( pddpf->dwFlags & DDPF_RGBTOYUV )
+       strcat( buffer, "DDPF_RGBTOYUV  " );
+  if ( pddpf->dwFlags & DDPF_STENCILBUFFER )
+       strcat( buffer, "DDPF_STENCILBUFFER  " );
+  if ( pddpf->dwFlags & DDPF_YUV )
+       strcat( buffer, "DDPF_YUV  " );
+  if ( pddpf->dwFlags & DDPF_ZBUFFER )
+       strcat( buffer, "DDPF_ZBUFFER  " );
+  if ( pddpf->dwFlags & DDPF_ZPIXELS )
+       strcat( buffer, "DDPF_ZPIXELS  " );
+
+  DPF(( (DBG_TXT_INFO|DBG_CNTX_INFO),"%s", buffer ));
+}
+
+
+
+
+
index 76122b912109c3f213840d5640172965aa0b3574..daeeb72278450c43603f1261605481dd25441116 100644 (file)
@@ -1,90 +1,90 @@
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 DirectX 6 Driver                                                 */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#ifndef _DEBUG_H\r
-#define _DEBUG_H\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-/*===========================================================================*/\r
-/* Includes.                                                                 */\r
-/*===========================================================================*/\r
-#include <stdio.h>\r
-#include <string.h>\r
-#include <ddraw.h>\r
-#include <d3d.h>\r
-#include "D3DShared.h"\r
-/*===========================================================================*/\r
-/* Magic numbers.                                                            */\r
-/*===========================================================================*/\r
-/*===========================================================================*/\r
-/* Macros defines.                                                           */\r
-/*===========================================================================*/\r
-#define DBG_FUNC                        0x00000001\r
-#define DBG_STATES              0x00000002\r
-\r
-#define DBG_CNTX_INFO           0x00000010\r
-#define DBG_CNTX_WARN           0x00000020\r
-#define DBG_CNTX_PROFILE        0x00000040\r
-#define DBG_CNTX_ERROR          0x00000080\r
-#define DBG_CNTX_ALL            0x000000F0\r
-\r
-#define DBG_PRIM_INFO           0x00000100\r
-#define DBG_PRIM_WARN           0x00000200\r
-#define DBG_PRIM_PROFILE        0x00000400\r
-#define DBG_PRIM_ERROR          0x00000800\r
-#define DBG_PRIM_ALL            0x00000F00\r
-\r
-#define DBG_TXT_INFO            0x00001000\r
-#define DBG_TXT_WARN            0x00002000\r
-#define DBG_TXT_PROFILE 0x00004000\r
-#define DBG_TXT_ERROR           0x00008000\r
-#define DBG_TXT_ALL             0x0000F000\r
-\r
-#define DBG_ALL_INFO            0x11111110\r
-#define DBG_ALL_WARN            0x22222220\r
-#define DBG_ALL_PROFILE 0x44444440\r
-#define DBG_ALL_ERROR           0x88888880\r
-#define DBG_ALL                 0xFFFFFFFF\r
-\r
-#ifdef D3D_DEBUG\r
-#       define  DPF(arg)                        DebugPrint arg \r
-#       define  RIP(pH,msg,err) OutputDebugString(msg); \\r
-                                                       OutputDebugString(err); \\r
-                                                       OutputDebugString("\n"); \\r
-                                                       FatalShutDown(pH)\r
-#else\r
-#       define  DPF(arg)\r
-#       define  RIP(pH,msg,err) FatalShutDown(pH)\r
-#endif\r
-/*===========================================================================*/\r
-/* Type defines.                                                             */\r
-/*===========================================================================*/\r
-/*===========================================================================*/\r
-/* Function prototypes.                                                      */\r
-/*===========================================================================*/\r
-extern void ReadDBGEnv( void );\r
-extern void _cdecl DebugPrint( int mask, char *pszFormat, ... );\r
-extern void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf );\r
-/*===========================================================================*/\r
-/* Global variables.                                                         */\r
-/*===========================================================================*/\r
-extern DWORD    g_DBGMask;\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 DirectX 6 Driver                                                 */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#ifndef _DEBUG_H
+#define _DEBUG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*===========================================================================*/
+/* Includes.                                                                 */
+/*===========================================================================*/
+#include <stdio.h>
+#include <string.h>
+#include <ddraw.h>
+#include <d3d.h>
+#include "D3DShared.h"
+/*===========================================================================*/
+/* Magic numbers.                                                            */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Macros defines.                                                           */
+/*===========================================================================*/
+#define DBG_FUNC                        0x00000001
+#define DBG_STATES              0x00000002
+
+#define DBG_CNTX_INFO           0x00000010
+#define DBG_CNTX_WARN           0x00000020
+#define DBG_CNTX_PROFILE        0x00000040
+#define DBG_CNTX_ERROR          0x00000080
+#define DBG_CNTX_ALL            0x000000F0
+
+#define DBG_PRIM_INFO           0x00000100
+#define DBG_PRIM_WARN           0x00000200
+#define DBG_PRIM_PROFILE        0x00000400
+#define DBG_PRIM_ERROR          0x00000800
+#define DBG_PRIM_ALL            0x00000F00
+
+#define DBG_TXT_INFO            0x00001000
+#define DBG_TXT_WARN            0x00002000
+#define DBG_TXT_PROFILE 0x00004000
+#define DBG_TXT_ERROR           0x00008000
+#define DBG_TXT_ALL             0x0000F000
+
+#define DBG_ALL_INFO            0x11111110
+#define DBG_ALL_WARN            0x22222220
+#define DBG_ALL_PROFILE 0x44444440
+#define DBG_ALL_ERROR           0x88888880
+#define DBG_ALL                 0xFFFFFFFF
+
+#ifdef D3D_DEBUG
+#       define  DPF(arg)                        DebugPrint arg 
+#       define  RIP(pH,msg,err) OutputDebugString(msg); \
+                                                       OutputDebugString(err); \
+                                                       OutputDebugString("\n"); \
+                                                       FatalShutDown(pH)
+#else
+#       define  DPF(arg)
+#       define  RIP(pH,msg,err) FatalShutDown(pH)
+#endif
+/*===========================================================================*/
+/* Type defines.                                                             */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Function prototypes.                                                      */
+/*===========================================================================*/
+extern void ReadDBGEnv( void );
+extern void _cdecl DebugPrint( int mask, char *pszFormat, ... );
+extern void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf );
+/*===========================================================================*/
+/* Global variables.                                                         */
+/*===========================================================================*/
+extern DWORD    g_DBGMask;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
index 40858e6684445fe705e272fd33ef747eb62f0739..acea0458565bafea0a3b03a556a8a3cba212cc51 100644 (file)
@@ -1,25 +1,25 @@
-SET DBG_FUNC=FALSE\r
-\r
-SET DBG_CNTX_INFO=TRUE\r
-SET DBG_CNTX_WARN=TRUE\r
-SET DBG_CNTX_PROFILE=FALSE\r
-SET DBG_CNTX_ERROR=TRUE\r
-SET DBG_CNTX_ALL=TRUE\r
-\r
-SET DBG_PRIM_INFO=FALSE\r
-SET DBG_PRIM_WARN=FALSE\r
-SET DBG_PRIM_PROFILE=FALSE\r
-SET DBG_PRIM_ERROR=TRUE\r
-SET DBG_PRIM_ALL=FALSE\r
-\r
-SET DBG_TXT_INFO=FALSE\r
-SET DBG_TXT_WARN=TRUE\r
-SET DBG_TXT_PROFILE=FALSE\r
-SET DBG_TXT_ERROR=TRUE\r
-SET DBG_TXT_ALL=FALSE\r
-\r
-SET DBG_ALL_INFO=FALSE\r
-SET DBG_ALL_WARN=TRUE\r
-SET DBG_ALL_PROFILE=FALSE\r
-SET DBG_ALL_ERROR=TRUE\r
-SET DBG_ALL=FALSE\r
+SET DBG_FUNC=FALSE
+
+SET DBG_CNTX_INFO=TRUE
+SET DBG_CNTX_WARN=TRUE
+SET DBG_CNTX_PROFILE=FALSE
+SET DBG_CNTX_ERROR=TRUE
+SET DBG_CNTX_ALL=TRUE
+
+SET DBG_PRIM_INFO=FALSE
+SET DBG_PRIM_WARN=FALSE
+SET DBG_PRIM_PROFILE=FALSE
+SET DBG_PRIM_ERROR=TRUE
+SET DBG_PRIM_ALL=FALSE
+
+SET DBG_TXT_INFO=FALSE
+SET DBG_TXT_WARN=TRUE
+SET DBG_TXT_PROFILE=FALSE
+SET DBG_TXT_ERROR=TRUE
+SET DBG_TXT_ALL=FALSE
+
+SET DBG_ALL_INFO=FALSE
+SET DBG_ALL_WARN=TRUE
+SET DBG_ALL_PROFILE=FALSE
+SET DBG_ALL_ERROR=TRUE
+SET DBG_ALL=FALSE
index ad1d40dc27b94177d025b7971fde789500bb85ab..6aa88f3cef4537984f3b92bdfca63f812e8bd9d6 100644 (file)
-##############################################################################\r
-# \r
-# Mesa-3.0 Makefile for DirectX 6 Driver                             \r
-#\r
-# By Leigh McRae\r
-#\r
-# http://www.altsoftware.com/\r
-#\r
-# Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved     \r
-##############################################################################\r
-NAME=\r
-TARGET= WGL Driver (D3DHAL)\r
-\r
-D3D_DIR=$(MAKEDIR)\D3D\r
-TARGET_DIR=e:\WinNT\System32\r
-TEMP_DIR=c:\Temp\r
-\r
-SPACE=-\r
-LINKER=link.exe\r
-\r
-INCLUDE=$(SDKROOT)\include;$(INCLUDE)\r
-LIB=$(SDKROOT)\lib;$(LIB)\r
-##############################################################################\r
-CFLAGS  = /c /nologo /W1 /G5 /I..\ /I..\..\Include \\r
-               /D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__"  /D "MESAD3D"\r
-CPPFLAGS= /c /nologo /W1 /G5 /I..\ /I..\..\Include \\r
-               /D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__"  /D "MESAD3D"\r
-\r
-!IF "$(DEBUG)" == "1"\r
-\r
-CFLAGS   = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CFLAGS)\r
-CPPFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CPPFLAGS)\r
-BUILD_TYPE=debug\r
-\r
-!ELSE\r
-\r
-CFLAGS   = /MT /Ox /D "NDEBUG" $(CFLAGS)\r
-CPPFLAGS = /MT /Ox /D "NDEBUG" $(CPPFLAGS)\r
-BUILD_TYPE=release\r
-\r
-!ENDIF\r
-##############################################################################\r
-SRCS_WGL = wgl.c D3Dvbrender.c DDrawPROCS.c NULLProcs.c Debug.c\r
-SRCS_HAL = D3DInit.cpp D3DRaster.cpp D3DTextureMgr.cpp D3DUtils.cpp D3DCaps.cpp\r
-OBJS_WGL = $(SRCS_WGL:.c=.obj)\r
-OBJS_HAL = $(SRCS_HAL:.cpp=.obj)\r
-\r
-WINLIBS = kernel32.lib user32.lib gdi32.lib oldnames.lib \r
-DXLIBS = \r
-LIBS = $(WINLIBS) $(DXLIBS) \r
-###############################################################################\r
-# Primary Targets                                                             #\r
-###############################################################################\r
-\r
-default: header WGL HAL footer\r
-\r
-all: default \r
-\r
-WGL : $(OBJS_WGL) \r
-        \r
-HAL : $(OBJS_HAL)\r
-\r
-install : forceit\r
-       @echo $(SPACE)\r
-       @echo ========================================\r
-       @echo Install files created.\r
-       @echo ========================================\r
-\r
-        \r
-###############################################################################\r
-# Secondary Targets                                                           #\r
-###############################################################################\r
-\r
-clean:\r
-       @echo ========================================\r
-       @echo Cleaning $(TARGET)\r
-       @del *.obj \r
-       @del *.dep \r
-       @del *.exp \r
-       @del *.ncb\r
-       @del *.plg\r
-       @del *.lib\r
-       @echo ========================================\r
-\r
-header:\r
-       @echo ============================================================\r
-       @echo Building $(TARGET)  ($(BUILD_TYPE) version)\r
-       @echo ============================================================\r
-       @echo $(SPACE)\r
-\r
-footer:\r
-       @echo $(SPACE)\r
-       @echo ============================================================\r
-       @echo DONE building $(TARGET)  ($(BUILD_TYPE) version)\r
-       @echo ============================================================\r
-\r
-forceit:\r
-\r
-\r
-\r
-\r
+##############################################################################
+# 
+# Mesa-3.0 Makefile for DirectX 6 Driver                             
+#
+# By Leigh McRae
+#
+# http://www.altsoftware.com/
+#
+# Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved     
+##############################################################################
+NAME=
+TARGET= WGL Driver (D3DHAL)
+
+D3D_DIR=$(MAKEDIR)\D3D
+TARGET_DIR=e:\WinNT\System32
+TEMP_DIR=c:\Temp
+
+SPACE=-
+LINKER=link.exe
+
+INCLUDE=$(SDKROOT)\include;$(INCLUDE)
+LIB=$(SDKROOT)\lib;$(LIB)
+##############################################################################
+CFLAGS  = /c /nologo /W1 /G5 /I..\ /I..\..\Include \
+               /D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__"  /D "MESAD3D"
+CPPFLAGS= /c /nologo /W1 /G5 /I..\ /I..\..\Include \
+               /D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__"  /D "MESAD3D"
+
+!IF "$(DEBUG)" == "1"
+
+CFLAGS   = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CFLAGS)
+CPPFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CPPFLAGS)
+BUILD_TYPE=debug
+
+!ELSE
+
+CFLAGS   = /MT /Ox /D "NDEBUG" $(CFLAGS)
+CPPFLAGS = /MT /Ox /D "NDEBUG" $(CPPFLAGS)
+BUILD_TYPE=release
+
+!ENDIF
+##############################################################################
+SRCS_WGL = wgl.c D3Dvbrender.c DDrawPROCS.c NULLProcs.c Debug.c
+SRCS_HAL = D3DInit.cpp D3DRaster.cpp D3DTextureMgr.cpp D3DUtils.cpp D3DCaps.cpp
+OBJS_WGL = $(SRCS_WGL:.c=.obj)
+OBJS_HAL = $(SRCS_HAL:.cpp=.obj)
+
+WINLIBS = kernel32.lib user32.lib gdi32.lib oldnames.lib 
+DXLIBS = 
+LIBS = $(WINLIBS) $(DXLIBS) 
+###############################################################################
+# Primary Targets                                                             #
+###############################################################################
+
+default: header WGL HAL footer
+
+all: default 
+
+WGL : $(OBJS_WGL) 
+        
+HAL : $(OBJS_HAL)
+
+install : forceit
+       @echo $(SPACE)
+       @echo ========================================
+       @echo Install files created.
+       @echo ========================================
+
+        
+###############################################################################
+# Secondary Targets                                                           #
+###############################################################################
+
+clean:
+       @echo ========================================
+       @echo Cleaning $(TARGET)
+       @del *.obj 
+       @del *.dep 
+       @del *.exp 
+       @del *.ncb
+       @del *.plg
+       @del *.lib
+       @echo ========================================
+
+header:
+       @echo ============================================================
+       @echo Building $(TARGET)  ($(BUILD_TYPE) version)
+       @echo ============================================================
+       @echo $(SPACE)
+
+footer:
+       @echo $(SPACE)
+       @echo ============================================================
+       @echo DONE building $(TARGET)  ($(BUILD_TYPE) version)
+       @echo ============================================================
+
+forceit:
+
+
+
+
index b32bd1fef8102746b5c807b970fd567f95eb929d..bc0304da3316d31157079e07c2dbdddf1d407707 100644 (file)
-;===========================================================================\r
-;                                                                           \r
-; Mesa-3.0 DirectX 6 Driver                                       \r
-;                                                                           \r
-; By Leigh McRae                                                            \r
-;                                                                           \r
-; http://www.altsoftware.com/                                               \r
-;                                                                           \r
-; Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           \r
-;===========================================================================\r
-NAME OpenGL32.DLL\r
-DESCRIPTION "Mesa-3.0 DX6 Driver Version 0.5"\r
-\r
-EXPORTS\r
-       DllMain\r
-       glAccum\r
-       glAlphaFunc\r
-       glAreTexturesResident\r
-       glAreTexturesResidentEXT\r
-       glArrayElement\r
-       glArrayElementEXT\r
-       glBegin\r
-       glBindTexture\r
-       glBindTextureEXT\r
-       glBitmap\r
-       glBlendColorEXT\r
-       glBlendEquationEXT\r
-       glBlendFunc\r
-       glCallList\r
-       glCallLists\r
-       glClear\r
-       glClearAccum\r
-       glClearColor\r
-       glClearDepth\r
-       glClearIndex\r
-       glClearStencil\r
-       glClipPlane\r
-       glColor3b\r
-       glColor3bv\r
-       glColor3d\r
-       glColor3dv\r
-       glColor3f\r
-       glColor3fv\r
-       glColor3i\r
-       glColor3iv\r
-       glColor3s\r
-       glColor3sv\r
-       glColor3ub\r
-       glColor3ubv\r
-       glColor3ui\r
-       glColor3uiv\r
-       glColor3us\r
-       glColor3usv\r
-       glColor4b\r
-       glColor4bv\r
-       glColor4d\r
-       glColor4dv\r
-       glColor4f\r
-       glColor4fv\r
-       glColor4i\r
-       glColor4iv\r
-       glColor4s\r
-       glColor4sv\r
-       glColor4ub\r
-       glColor4ubv\r
-       glColor4ui\r
-       glColor4uiv\r
-       glColor4us\r
-       glColor4usv\r
-       glColorMask\r
-       glColorMaterial\r
-       glColorPointer\r
-       glColorPointerEXT\r
-       glColorSubTableEXT\r
-       glColorTableEXT\r
-       glCopyPixels\r
-       glCopyTexImage1D\r
-       glCopyTexImage2D\r
-       glCopyTexSubImage1D\r
-       glCopyTexSubImage2D\r
-       glCopyTexSubImage3DEXT\r
-       glCullFace\r
-       glDeleteLists\r
-       glDeleteTextures\r
-       glDeleteTexturesEXT\r
-       glDepthFunc\r
-       glDepthMask\r
-       glDepthRange\r
-       glDisable\r
-       glDisableClientState\r
-       glDrawArrays\r
-       glDrawArraysEXT\r
-       glDrawBuffer\r
-       glDrawElements\r
-       glDrawPixels\r
-       glEdgeFlag\r
-       glEdgeFlagPointer\r
-       glEdgeFlagPointerEXT\r
-       glEdgeFlagv\r
-       glEnable\r
-       glEnableClientState\r
-       glEnd\r
-       glEndList\r
-       glEvalCoord1d\r
-       glEvalCoord1dv\r
-       glEvalCoord1f\r
-       glEvalCoord1fv\r
-       glEvalCoord2d\r
-       glEvalCoord2dv\r
-       glEvalCoord2f\r
-       glEvalCoord2fv\r
-       glEvalMesh1\r
-       glEvalMesh2\r
-       glEvalPoint1\r
-       glEvalPoint2\r
-       glFeedbackBuffer\r
-       glFinish\r
-       glFlush\r
-       glFogf\r
-       glFogfv\r
-       glFogi\r
-       glFogiv\r
-       glFrontFace\r
-       glFrustum\r
-       glGenLists\r
-       glGenTextures\r
-       glGenTexturesEXT\r
-       glGetBooleanv\r
-       glGetClipPlane\r
-       glGetColorTableEXT\r
-       glGetColorTableParameterfvEXT\r
-       glGetColorTableParameterivEXT\r
-       glGetDoublev\r
-       glGetError\r
-       glGetFloatv\r
-       glGetIntegerv\r
-       glGetLightfv\r
-       glGetLightiv\r
-       glGetMapdv\r
-       glGetMapfv\r
-       glGetMapiv\r
-       glGetMaterialfv\r
-       glGetMaterialiv\r
-       glGetPixelMapfv\r
-       glGetPixelMapuiv\r
-       glGetPixelMapusv\r
-       glGetPointerv\r
-       glGetPointervEXT\r
-       glGetPolygonStipple\r
-       glGetString\r
-       glGetTexEnvfv\r
-       glGetTexEnviv\r
-       glGetTexGendv\r
-       glGetTexGenfv\r
-       glGetTexGeniv\r
-       glGetTexImage\r
-       glGetTexLevelParameterfv\r
-       glGetTexLevelParameteriv\r
-       glGetTexParameterfv\r
-       glGetTexParameteriv\r
-       glHint\r
-       glIndexd\r
-       glIndexdv\r
-       glIndexf\r
-       glIndexfv\r
-       glIndexi\r
-       glIndexiv\r
-       glIndexMask\r
-       glIndexPointer\r
-       glIndexPointerEXT\r
-       glIndexs\r
-       glIndexsv\r
-       glIndexub\r
-       glIndexubv\r
-       glInitNames\r
-       glInterleavedArrays\r
-       glIsEnabled\r
-       glIsList\r
-       glIsTexture\r
-       glIsTextureEXT\r
-       glLightf\r
-       glLightfv\r
-       glLighti\r
-       glLightiv\r
-       glLightModelf\r
-       glLightModelfv\r
-       glLightModeli\r
-       glLightModeliv\r
-       glLineStipple\r
-       glLineWidth\r
-       glListBase\r
-       glLoadIdentity\r
-       glLoadMatrixd\r
-       glLoadMatrixf\r
-       glLoadName\r
-       glLogicOp\r
-       glMap1d\r
-       glMap1f\r
-       glMap2d\r
-       glMap2f\r
-       glMapGrid1d\r
-       glMapGrid1f\r
-       glMapGrid2d\r
-       glMapGrid2f\r
-       glMaterialf\r
-       glMaterialfv\r
-       glMateriali\r
-       glMaterialiv\r
-       glMatrixMode\r
-       glMultMatrixd\r
-       glMultMatrixf\r
-       glNewList\r
-       glNormal3b\r
-       glNormal3bv\r
-       glNormal3d\r
-       glNormal3dv\r
-       glNormal3f\r
-       glNormal3fv\r
-       glNormal3i\r
-       glNormal3iv\r
-       glNormal3s\r
-       glNormal3sv\r
-       glNormalPointer\r
-       glNormalPointerEXT\r
-       glOrtho\r
-       glPassThrough\r
-       glPixelMapfv\r
-       glPixelMapuiv\r
-       glPixelMapusv\r
-       glPixelStoref\r
-       glPixelStorei\r
-       glPixelTransferf\r
-       glPixelTransferi\r
-       glPixelZoom\r
-       glPointParameterfEXT\r
-       glPointParameterfvEXT\r
-       glPointSize\r
-       glPolygonMode\r
-       glPolygonOffset\r
-       glPolygonOffsetEXT\r
-       glPolygonStipple\r
-       glPopAttrib\r
-       glPopClientAttrib\r
-       glPopMatrix\r
-       glPopName\r
-       glPrioritizeTextures\r
-       glPrioritizeTexturesEXT\r
-       glPushAttrib\r
-       glPushClientAttrib\r
-       glPushMatrix\r
-       glPushName\r
-       glRasterPos2d\r
-       glRasterPos2dv\r
-       glRasterPos2f\r
-       glRasterPos2fv\r
-       glRasterPos2i\r
-       glRasterPos2iv\r
-       glRasterPos2s\r
-       glRasterPos2sv\r
-       glRasterPos3d\r
-       glRasterPos3dv\r
-       glRasterPos3f\r
-       glRasterPos3fv\r
-       glRasterPos3i\r
-       glRasterPos3iv\r
-       glRasterPos3s\r
-       glRasterPos3sv\r
-       glRasterPos4d\r
-       glRasterPos4dv\r
-       glRasterPos4f\r
-       glRasterPos4fv\r
-       glRasterPos4i\r
-       glRasterPos4iv\r
-       glRasterPos4s\r
-       glRasterPos4sv\r
-       glReadBuffer\r
-       glReadPixels\r
-       glRectd\r
-       glRectdv\r
-       glRectf\r
-       glRectfv\r
-       glRecti\r
-       glRectiv\r
-       glRects\r
-       glRectsv\r
-       glRenderMode\r
-       glResizeBuffersMESA\r
-       glRotated\r
-       glRotatef\r
-       glScaled\r
-       glScalef\r
-       glScissor\r
-       glSelectBuffer\r
-       glShadeModel\r
-       glStencilFunc\r
-       glStencilMask\r
-       glStencilOp\r
-       glTexCoord1d\r
-       glTexCoord1dv\r
-       glTexCoord1f\r
-       glTexCoord1fv\r
-       glTexCoord1i\r
-       glTexCoord1iv\r
-       glTexCoord1s\r
-       glTexCoord1sv\r
-       glTexCoord2d\r
-       glTexCoord2dv\r
-       glTexCoord2f\r
-       glTexCoord2fv\r
-       glTexCoord2i\r
-       glTexCoord2iv\r
-       glTexCoord2s\r
-       glTexCoord2sv\r
-       glTexCoord3d\r
-       glTexCoord3dv\r
-       glTexCoord3f\r
-       glTexCoord3fv\r
-       glTexCoord3i\r
-       glTexCoord3iv\r
-       glTexCoord3s\r
-       glTexCoord3sv\r
-       glTexCoord4d\r
-       glTexCoord4dv\r
-       glTexCoord4f\r
-       glTexCoord4fv\r
-       glTexCoord4i\r
-       glTexCoord4iv\r
-       glTexCoord4s\r
-       glTexCoord4sv\r
-       glTexCoordPointer\r
-       glTexCoordPointerEXT\r
-       glTexEnvf\r
-       glTexEnvfv\r
-       glTexEnvi\r
-       glTexEnviv\r
-       glTexGend\r
-       glTexGendv\r
-       glTexGenf\r
-       glTexGenfv\r
-       glTexGeni\r
-       glTexGeniv\r
-       glTexImage1D\r
-       glTexImage2D\r
-       glTexImage3DEXT\r
-       glTexParameterf\r
-       glTexParameterfv\r
-       glTexParameteri\r
-       glTexParameteriv\r
-       glTexSubImage1D\r
-       glTexSubImage2D\r
-       glTexSubImage3DEXT\r
-       glTranslated\r
-       glTranslatef\r
-       glVertex2d\r
-       glVertex2dv\r
-       glVertex2f\r
-       glVertex2fv\r
-       glVertex2i\r
-       glVertex2iv\r
-       glVertex2s\r
-       glVertex2sv\r
-       glVertex3d\r
-       glVertex3dv\r
-       glVertex3f\r
-       glVertex3fv\r
-       glVertex3i\r
-       glVertex3iv\r
-       glVertex3s\r
-       glVertex3sv\r
-       glVertex4d\r
-       glVertex4dv\r
-       glVertex4f\r
-       glVertex4fv\r
-       glVertex4i\r
-       glVertex4iv\r
-       glVertex4s\r
-       glVertex4sv\r
-       glVertexPointer\r
-       glVertexPointerEXT\r
-       glViewport\r
-       glWindowPos2dMESA\r
-       glWindowPos2dvMESA\r
-       glWindowPos2fMESA\r
-       glWindowPos2fvMESA\r
-       glWindowPos2iMESA\r
-       glWindowPos2ivMESA\r
-       glWindowPos2sMESA\r
-       glWindowPos2svMESA\r
-       glWindowPos3dMESA\r
-       glWindowPos3dvMESA\r
-       glWindowPos3fMESA\r
-       glWindowPos3fvMESA\r
-       glWindowPos3iMESA\r
-       glWindowPos3ivMESA\r
-       glWindowPos3sMESA\r
-       glWindowPos3svMESA\r
-       glWindowPos4dMESA\r
-       glWindowPos4dvMESA\r
-       glWindowPos4fMESA\r
-       glWindowPos4fvMESA\r
-       glWindowPos4iMESA\r
-       glWindowPos4ivMESA\r
-       glWindowPos4sMESA\r
-       glWindowPos4svMESA\r
-;    WMesaCreateContext\r
-;    WMesaDestroyContext\r
-;    WMesaMakeCurrent\r
-;    WMesaPaletteChange\r
-;    WMesaSwapBuffers\r
-;    OSMesaCreateContext\r
-;    OSMesaDestroyContext\r
-;    OSMesaMakeCurrent\r
-;    OSMesaGetCurrentContext\r
-;    OSMesaPixelStore\r
-;    OSMesaGetIntegerv\r
-;    OSMesaGetDepthBuffer\r
-       wglCopyContext\r
-       wglCreateContext\r
-       wglCreateLayerContext\r
-       wglDeleteContext\r
-;      wglDescribeLayerPlane\r
-       wglGetCurrentContext\r
-       wglGetCurrentDC\r
-;      wglGetLayerPaletteEntries\r
-       wglGetProcAddress\r
-       wglMakeCurrent\r
-;      wglRealizeLayerPalette\r
-;      wglSetLayerPaletteEntries\r
-       wglShareLists\r
-       wglSwapLayerBuffers\r
-       wglUseFontBitmapsA\r
-       wglUseFontBitmapsW\r
-       wglUseFontOutlinesA\r
-       wglUseFontOutlinesW\r
-       wglChoosePixelFormat\r
-       wglDescribePixelFormat\r
-       wglGetPixelFormat\r
-       wglSetPixelFormat\r
-       wglSwapBuffers\r
-    \r
-\r
-\r
+;===========================================================================
+;                                                                           
+; Mesa-3.0 DirectX 6 Driver                                       
+;                                                                           
+; By Leigh McRae                                                            
+;                                                                           
+; http://www.altsoftware.com/                                               
+;                                                                           
+; Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           
+;===========================================================================
+NAME OpenGL32.DLL
+DESCRIPTION "Mesa-3.0 DX6 Driver Version 0.5"
+
+EXPORTS
+       DllMain
+       glAccum
+       glAlphaFunc
+       glAreTexturesResident
+       glAreTexturesResidentEXT
+       glArrayElement
+       glArrayElementEXT
+       glBegin
+       glBindTexture
+       glBindTextureEXT
+       glBitmap
+       glBlendColorEXT
+       glBlendEquationEXT
+       glBlendFunc
+       glCallList
+       glCallLists
+       glClear
+       glClearAccum
+       glClearColor
+       glClearDepth
+       glClearIndex
+       glClearStencil
+       glClipPlane
+       glColor3b
+       glColor3bv
+       glColor3d
+       glColor3dv
+       glColor3f
+       glColor3fv
+       glColor3i
+       glColor3iv
+       glColor3s
+       glColor3sv
+       glColor3ub
+       glColor3ubv
+       glColor3ui
+       glColor3uiv
+       glColor3us
+       glColor3usv
+       glColor4b
+       glColor4bv
+       glColor4d
+       glColor4dv
+       glColor4f
+       glColor4fv
+       glColor4i
+       glColor4iv
+       glColor4s
+       glColor4sv
+       glColor4ub
+       glColor4ubv
+       glColor4ui
+       glColor4uiv
+       glColor4us
+       glColor4usv
+       glColorMask
+       glColorMaterial
+       glColorPointer
+       glColorPointerEXT
+       glColorSubTableEXT
+       glColorTableEXT
+       glCopyPixels
+       glCopyTexImage1D
+       glCopyTexImage2D
+       glCopyTexSubImage1D
+       glCopyTexSubImage2D
+       glCopyTexSubImage3DEXT
+       glCullFace
+       glDeleteLists
+       glDeleteTextures
+       glDeleteTexturesEXT
+       glDepthFunc
+       glDepthMask
+       glDepthRange
+       glDisable
+       glDisableClientState
+       glDrawArrays
+       glDrawArraysEXT
+       glDrawBuffer
+       glDrawElements
+       glDrawPixels
+       glEdgeFlag
+       glEdgeFlagPointer
+       glEdgeFlagPointerEXT
+       glEdgeFlagv
+       glEnable
+       glEnableClientState
+       glEnd
+       glEndList
+       glEvalCoord1d
+       glEvalCoord1dv
+       glEvalCoord1f
+       glEvalCoord1fv
+       glEvalCoord2d
+       glEvalCoord2dv
+       glEvalCoord2f
+       glEvalCoord2fv
+       glEvalMesh1
+       glEvalMesh2
+       glEvalPoint1
+       glEvalPoint2
+       glFeedbackBuffer
+       glFinish
+       glFlush
+       glFogf
+       glFogfv
+       glFogi
+       glFogiv
+       glFrontFace
+       glFrustum
+       glGenLists
+       glGenTextures
+       glGenTexturesEXT
+       glGetBooleanv
+       glGetClipPlane
+       glGetColorTableEXT
+       glGetColorTableParameterfvEXT
+       glGetColorTableParameterivEXT
+       glGetDoublev
+       glGetError
+       glGetFloatv
+       glGetIntegerv
+       glGetLightfv
+       glGetLightiv
+       glGetMapdv
+       glGetMapfv
+       glGetMapiv
+       glGetMaterialfv
+       glGetMaterialiv
+       glGetPixelMapfv
+       glGetPixelMapuiv
+       glGetPixelMapusv
+       glGetPointerv
+       glGetPointervEXT
+       glGetPolygonStipple
+       glGetString
+       glGetTexEnvfv
+       glGetTexEnviv
+       glGetTexGendv
+       glGetTexGenfv
+       glGetTexGeniv
+       glGetTexImage
+       glGetTexLevelParameterfv
+       glGetTexLevelParameteriv
+       glGetTexParameterfv
+       glGetTexParameteriv
+       glHint
+       glIndexd
+       glIndexdv
+       glIndexf
+       glIndexfv
+       glIndexi
+       glIndexiv
+       glIndexMask
+       glIndexPointer
+       glIndexPointerEXT
+       glIndexs
+       glIndexsv
+       glIndexub
+       glIndexubv
+       glInitNames
+       glInterleavedArrays
+       glIsEnabled
+       glIsList
+       glIsTexture
+       glIsTextureEXT
+       glLightf
+       glLightfv
+       glLighti
+       glLightiv
+       glLightModelf
+       glLightModelfv
+       glLightModeli
+       glLightModeliv
+       glLineStipple
+       glLineWidth
+       glListBase
+       glLoadIdentity
+       glLoadMatrixd
+       glLoadMatrixf
+       glLoadName
+       glLogicOp
+       glMap1d
+       glMap1f
+       glMap2d
+       glMap2f
+       glMapGrid1d
+       glMapGrid1f
+       glMapGrid2d
+       glMapGrid2f
+       glMaterialf
+       glMaterialfv
+       glMateriali
+       glMaterialiv
+       glMatrixMode
+       glMultMatrixd
+       glMultMatrixf
+       glNewList
+       glNormal3b
+       glNormal3bv
+       glNormal3d
+       glNormal3dv
+       glNormal3f
+       glNormal3fv
+       glNormal3i
+       glNormal3iv
+       glNormal3s
+       glNormal3sv
+       glNormalPointer
+       glNormalPointerEXT
+       glOrtho
+       glPassThrough
+       glPixelMapfv
+       glPixelMapuiv
+       glPixelMapusv
+       glPixelStoref
+       glPixelStorei
+       glPixelTransferf
+       glPixelTransferi
+       glPixelZoom
+       glPointParameterfEXT
+       glPointParameterfvEXT
+       glPointSize
+       glPolygonMode
+       glPolygonOffset
+       glPolygonOffsetEXT
+       glPolygonStipple
+       glPopAttrib
+       glPopClientAttrib
+       glPopMatrix
+       glPopName
+       glPrioritizeTextures
+       glPrioritizeTexturesEXT
+       glPushAttrib
+       glPushClientAttrib
+       glPushMatrix
+       glPushName
+       glRasterPos2d
+       glRasterPos2dv
+       glRasterPos2f
+       glRasterPos2fv
+       glRasterPos2i
+       glRasterPos2iv
+       glRasterPos2s
+       glRasterPos2sv
+       glRasterPos3d
+       glRasterPos3dv
+       glRasterPos3f
+       glRasterPos3fv
+       glRasterPos3i
+       glRasterPos3iv
+       glRasterPos3s
+       glRasterPos3sv
+       glRasterPos4d
+       glRasterPos4dv
+       glRasterPos4f
+       glRasterPos4fv
+       glRasterPos4i
+       glRasterPos4iv
+       glRasterPos4s
+       glRasterPos4sv
+       glReadBuffer
+       glReadPixels
+       glRectd
+       glRectdv
+       glRectf
+       glRectfv
+       glRecti
+       glRectiv
+       glRects
+       glRectsv
+       glRenderMode
+       glResizeBuffersMESA
+       glRotated
+       glRotatef
+       glScaled
+       glScalef
+       glScissor
+       glSelectBuffer
+       glShadeModel
+       glStencilFunc
+       glStencilMask
+       glStencilOp
+       glTexCoord1d
+       glTexCoord1dv
+       glTexCoord1f
+       glTexCoord1fv
+       glTexCoord1i
+       glTexCoord1iv
+       glTexCoord1s
+       glTexCoord1sv
+       glTexCoord2d
+       glTexCoord2dv
+       glTexCoord2f
+       glTexCoord2fv
+       glTexCoord2i
+       glTexCoord2iv
+       glTexCoord2s
+       glTexCoord2sv
+       glTexCoord3d
+       glTexCoord3dv
+       glTexCoord3f
+       glTexCoord3fv
+       glTexCoord3i
+       glTexCoord3iv
+       glTexCoord3s
+       glTexCoord3sv
+       glTexCoord4d
+       glTexCoord4dv
+       glTexCoord4f
+       glTexCoord4fv
+       glTexCoord4i
+       glTexCoord4iv
+       glTexCoord4s
+       glTexCoord4sv
+       glTexCoordPointer
+       glTexCoordPointerEXT
+       glTexEnvf
+       glTexEnvfv
+       glTexEnvi
+       glTexEnviv
+       glTexGend
+       glTexGendv
+       glTexGenf
+       glTexGenfv
+       glTexGeni
+       glTexGeniv
+       glTexImage1D
+       glTexImage2D
+       glTexImage3DEXT
+       glTexParameterf
+       glTexParameterfv
+       glTexParameteri
+       glTexParameteriv
+       glTexSubImage1D
+       glTexSubImage2D
+       glTexSubImage3DEXT
+       glTranslated
+       glTranslatef
+       glVertex2d
+       glVertex2dv
+       glVertex2f
+       glVertex2fv
+       glVertex2i
+       glVertex2iv
+       glVertex2s
+       glVertex2sv
+       glVertex3d
+       glVertex3dv
+       glVertex3f
+       glVertex3fv
+       glVertex3i
+       glVertex3iv
+       glVertex3s
+       glVertex3sv
+       glVertex4d
+       glVertex4dv
+       glVertex4f
+       glVertex4fv
+       glVertex4i
+       glVertex4iv
+       glVertex4s
+       glVertex4sv
+       glVertexPointer
+       glVertexPointerEXT
+       glViewport
+       glWindowPos2dMESA
+       glWindowPos2dvMESA
+       glWindowPos2fMESA
+       glWindowPos2fvMESA
+       glWindowPos2iMESA
+       glWindowPos2ivMESA
+       glWindowPos2sMESA
+       glWindowPos2svMESA
+       glWindowPos3dMESA
+       glWindowPos3dvMESA
+       glWindowPos3fMESA
+       glWindowPos3fvMESA
+       glWindowPos3iMESA
+       glWindowPos3ivMESA
+       glWindowPos3sMESA
+       glWindowPos3svMESA
+       glWindowPos4dMESA
+       glWindowPos4dvMESA
+       glWindowPos4fMESA
+       glWindowPos4fvMESA
+       glWindowPos4iMESA
+       glWindowPos4ivMESA
+       glWindowPos4sMESA
+       glWindowPos4svMESA
+;    WMesaCreateContext
+;    WMesaDestroyContext
+;    WMesaMakeCurrent
+;    WMesaPaletteChange
+;    WMesaSwapBuffers
+;    OSMesaCreateContext
+;    OSMesaDestroyContext
+;    OSMesaMakeCurrent
+;    OSMesaGetCurrentContext
+;    OSMesaPixelStore
+;    OSMesaGetIntegerv
+;    OSMesaGetDepthBuffer
+       wglCopyContext
+       wglCreateContext
+       wglCreateLayerContext
+       wglDeleteContext
+;      wglDescribeLayerPlane
+       wglGetCurrentContext
+       wglGetCurrentDC
+;      wglGetLayerPaletteEntries
+       wglGetProcAddress
+       wglMakeCurrent
+;      wglRealizeLayerPalette
+;      wglSetLayerPaletteEntries
+       wglShareLists
+       wglSwapLayerBuffers
+       wglUseFontBitmapsA
+       wglUseFontBitmapsW
+       wglUseFontOutlinesA
+       wglUseFontOutlinesW
+       wglChoosePixelFormat
+       wglDescribePixelFormat
+       wglGetPixelFormat
+       wglSetPixelFormat
+       wglSwapBuffers
+    
+
+
index e3b95e1de72a4972cbf04d944f1699a6070176c1..170d094ed49564f66ad17fcfe89e99c8436a8f14 100644 (file)
-/*===========================================================================*/\r
-/*                                                                           */\r
-/* Mesa-3.0 Makefile for DirectX 6                                           */\r
-/*                                                                           */\r
-/* By Leigh McRae                                                            */\r
-/*                                                                           */\r
-/* http://www.altsoftware.com/                                               */\r
-/*                                                                           */\r
-/* Copyright (c) 1998-1997  alt.software inc.  All Rights Reserved           */\r
-/*===========================================================================*/\r
-#include "D3DMesa.h"\r
-/*===========================================================================*/\r
-/* Window managment.                                                         */\r
-/*===========================================================================*/\r
-static BOOL    InitOpenGL( HINSTANCE hInst );\r
-static BOOL    TermOpenGL( HINSTANCE hInst );\r
-static BOOL     ResizeContext( GLcontext *ctx );\r
-static BOOL    MakeCurrent( D3DMESACONTEXT *pContext );\r
-static void    DestroyContext( D3DMESACONTEXT *pContext );\r
-static BOOL    UnBindWindow( D3DMESACONTEXT *pContext );\r
-LONG APIENTRY  wglMonitorProc( HWND hwnd, UINT message, UINT wParam, LONG lParam );\r
-/*===========================================================================*/\r
-/* Mesa hooks.                                                               */\r
-/*===========================================================================*/\r
-static void SetupDDPointers( GLcontext *ctx );\r
-static void SetupSWDDPointers( GLcontext *ctx );\r
-static void SetupHWDDPointers( GLcontext *ctx );\r
-static void SetupNULLDDPointers( GLcontext *ctx );\r
-static const char *RendererString( void );\r
-\r
-/* State Management hooks. */\r
-static void       SetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a );\r
-static void       ClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a );\r
-static GLboolean SetBuffer( GLcontext *ctx, GLenum buffer );\r
-\r
-/* Window Management hooks. */\r
-static void GetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height );\r
-static void SetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h );\r
-static void Flush( GLcontext *ctx );\r
-\r
-/* Span rendering hooks. */\r
-void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );\r
-void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );\r
-void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );\r
-void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );\r
-void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );\r
-void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );\r
-void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );\r
-GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );\r
-\r
-/* Primitve rendering hooks. */\r
-GLboolean  RenderVertexBuffer( GLcontext *ctx, GLboolean allDone );\r
-void             RenderOneTriangle( GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint pv );\r
-void     RenderOneLine( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv );\r
-GLbitfield ClearBuffersD3D( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );\r
-\r
-/* Texture Management hooks. */\r
-static void TextureBind( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj );\r
-static void TextureLoad( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, const struct gl_texture_image *image );\r
-static void TextureSubImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLint internalFormat, const struct gl_texture_image *image );\r
-/*===========================================================================*/\r
-/* Global variables.                                                         */\r
-/*===========================================================================*/\r
-D3DMESACONTEXT *pD3DCurrent,     \r
-              *pD3DDefault;     /* Thin support context. */\r
-\r
-struct __extensions__   ext[] = {\r
-\r
-    { (PROC)glPolygonOffsetEXT,        "glPolygonOffsetEXT"       },\r
-    { (PROC)glBlendEquationEXT,        "glBlendEquationEXT"       },\r
-    { (PROC)glBlendColorEXT,           "glBlendColorExt"          },\r
-    { (PROC)glVertexPointerEXT,        "glVertexPointerEXT"       },\r
-    { (PROC)glNormalPointerEXT,        "glNormalPointerEXT"       },\r
-    { (PROC)glColorPointerEXT,         "glColorPointerEXT"        },\r
-    { (PROC)glIndexPointerEXT,         "glIndexPointerEXT"        },\r
-    { (PROC)glTexCoordPointerEXT,      "glTexCoordPointer"        },\r
-    { (PROC)glEdgeFlagPointerEXT,      "glEdgeFlagPointerEXT"     },\r
-    { (PROC)glGetPointervEXT,          "glGetPointervEXT"         },\r
-    { (PROC)glArrayElementEXT,         "glArrayElementEXT"        },\r
-    { (PROC)glDrawArraysEXT,           "glDrawArrayEXT"           },\r
-    { (PROC)glAreTexturesResidentEXT,  "glAreTexturesResidentEXT" },\r
-    { (PROC)glBindTextureEXT,          "glBindTextureEXT"         },\r
-    { (PROC)glDeleteTexturesEXT,       "glDeleteTexturesEXT"      },\r
-    { (PROC)glGenTexturesEXT,          "glGenTexturesEXT"         },\r
-    { (PROC)glIsTextureEXT,            "glIsTextureEXT"           },\r
-    { (PROC)glPrioritizeTexturesEXT,   "glPrioritizeTexturesEXT"  },\r
-    { (PROC)glCopyTexSubImage3DEXT,    "glCopyTexSubImage3DEXT"   },\r
-    { (PROC)glTexImage3DEXT,           "glTexImage3DEXT"          },\r
-    { (PROC)glTexSubImage3DEXT,        "glTexSubImage3DEXT"       },\r
-};\r
-\r
-int             qt_ext = sizeof(ext) / sizeof(ext[0]);\r
-float   g_DepthScale,\r
-         g_MaxDepth;\r
-/*===========================================================================*/\r
-/*  When a process loads this DLL we will setup the linked list for context  */\r
-/* management and create a default context that will support the API until   */\r
-/* the user creates and binds thier own.  This THIN default context is useful*/\r
-/* to have around.                                                           */\r
-/*  When the process terminates we will clean up all resources here.         */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-BOOL APIENTRY   DllMain( HINSTANCE hInst, DWORD reason, LPVOID reserved )\r
-{\r
-  switch( reason ) \r
-  {\r
-    case DLL_PROCESS_ATTACH:\r
-        return InitOpenGL( hInst );\r
-\r
-    case DLL_PROCESS_DETACH:\r
-        return TermOpenGL( hInst );\r
-  }     \r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  The first thing we do when this dll is hit is connect to the dll that has*/\r
-/* handles all the DirectX 6 rendering.  I decided to use another dll as DX6 */\r
-/* is all C++ and Mesa-3.0 is C (thats a good thing).  This way I can write  */\r
-/* the DX6 in C++ and Mesa-3.0 in C without having to worry about linkage.   */\r
-/* I feel this is easy and better then using static wrappers as it is likely */\r
-/* faster and it allows me to just develope the one without compiling the    */\r
-/* other.                                                                    */\r
-/*  NOTE that at this point we don't have much other than a very thin context*/\r
-/* that will support the API calls only to the point of not causing the app  */\r
-/* to crash from the API table being empty.                                  */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-static BOOL  InitOpenGL( HINSTANCE hInst )\r
-{\r
-  /* Allocate and clear the default context. */\r
-  pD3DDefault = (PD3DMESACONTEXT)ALLOC( sizeof(D3DMESACONTEXT) );\r
-  if ( pD3DDefault == NULL )\r
-    return FALSE;\r
-  memset( pD3DDefault, 0, sizeof(D3DMESACONTEXT) );\r
-\r
-  /*  Clear the D3D vertex buffer so that values not used will be zero.  This */\r
-  /* save me from some redundant work.                                        */\r
-  memset( &D3DTLVertices, 0, sizeof(D3DTLVertices) );\r
-\r
-  /*  Update the link.  We uses a circular list so that it is easy to  */\r
-  /* add and search.  This context will also be used for head and tail.*/\r
-  pD3DDefault->next = pD3DDefault;\r
-\r
-  /*========================================================================*/\r
-  /* Do all core Mesa stuff.                                                */\r
-  /*========================================================================*/\r
-  pD3DDefault->gl_visual = _mesa_create_visual( TRUE,\r
-                                               FALSE,      /* db_flag */\r
-                                               GL_FALSE,   /* stereo */\r
-                                               8,8,8,8,    /* r, g, b, a bits */\r
-                                               0,          /* index bits */\r
-                                               16,         /* depth_bits */\r
-                                               8,          /* stencil_bits */\r
-                                               8,8,8,8,    /* accum_bits */\r
-                                                1 );\r
-\r
-  if ( pD3DDefault->gl_visual == NULL)  \r
-  {\r
-    FREE( pD3DDefault );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Allocate a new Mesa context */\r
-  pD3DDefault->gl_ctx = _mesa_create_context( pD3DDefault->gl_visual, NULL, pD3DDefault, GL_TRUE );\r
-  if ( pD3DDefault->gl_ctx == NULL ) \r
-  {\r
-    _mesa_destroy_visual( pD3DDefault->gl_visual );\r
-    FREE( pD3DDefault );\r
-    return FALSE;\r
-  }\r
-\r
-  /* Allocate a new Mesa frame buffer */\r
-  pD3DDefault->gl_buffer = _mesa_create_framebuffer( pD3DDefault->gl_visual );\r
-  if ( pD3DDefault->gl_buffer == NULL )\r
-  {\r
-    _mesa_destroy_visual( pD3DDefault->gl_visual );\r
-    _mesa_destroy_context( pD3DDefault->gl_ctx );\r
-    FREE( pD3DDefault );\r
-    return FALSE;\r
-  }\r
-  SetupDDPointers( pD3DDefault->gl_ctx );\r
-  _mesa_make_current( pD3DDefault->gl_ctx, pD3DDefault->gl_buffer );\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will create a new D3D context but will not create the D3D  */\r
-/* surfaces or even an instance of D3D (see at GetBufferSize). The only stuff*/\r
-/* done here is the internal Mesa stuff and some Win32 handles.              */\r
-/*===========================================================================*/\r
-/* RETURN: casted pointer to the context, NULL.                              */\r
-/*===========================================================================*/\r
-HGLRC APIENTRY wglCreateContext( HDC hdc )\r
-{\r
-  D3DMESACONTEXT        *pNewContext;\r
-  DWORD                 dwCoopFlags = DDSCL_NORMAL;\r
-  RECT                  rectClient;\r
-  POINT                 pt;\r
-\r
-  /* ALLOC and clear the new context. */\r
-  pNewContext = (PD3DMESACONTEXT)ALLOC( sizeof(D3DMESACONTEXT) );\r
-  if ( pNewContext == NULL )\r
-  {\r
-    SetLastError( 0 );\r
-    return (HGLRC)NULL;\r
-  }\r
-  memset( pNewContext, 0, sizeof(D3DMESACONTEXT) );\r
-\r
-  /*========================================================================*/\r
-  /* Do all core Mesa stuff.                                                */\r
-  /*========================================================================*/\r
-\r
-  /* TODO: support more then one visual. */\r
-  pNewContext->gl_visual = _mesa_create_visual( TRUE,\r
-                                                TRUE,       /* db_flag */\r
-                                                GL_FALSE,   /* stereo */\r
-                                                8,8,8,8,    /* r, g, b, a bits */\r
-                                                0,          /* index bits */\r
-                                                16,         /* depth_bits */\r
-                                                8,          /* stencil_bits */\r
-                                                16,16,16,16,/* accum_bits */\r
-                                                1 );\r
-  if ( pNewContext->gl_visual == NULL) \r
-  {\r
-    FREE( pNewContext );\r
-    SetLastError( 0 );\r
-    return (HGLRC)NULL;\r
-  }\r
-\r
-  /* Allocate a new Mesa context */\r
-  pNewContext->gl_ctx = _mesa_create_context( pNewContext->gl_visual, NULL, pNewContext, GL_TRUE );\r
-  if ( pNewContext->gl_ctx == NULL ) \r
-  {\r
-    _mesa_destroy_visual( pNewContext->gl_visual );\r
-    FREE( pNewContext );\r
-    SetLastError( 0 );\r
-    return (HGLRC)NULL;\r
-  }\r
-\r
-  /* Allocate a new Mesa frame buffer */\r
-  pNewContext->gl_buffer = _mesa_create_framebuffer( pNewContext->gl_visual );\r
-  if ( pNewContext->gl_buffer == NULL )\r
-  {\r
-    _mesa_destroy_visual( pNewContext->gl_visual );\r
-    _mesa_destroy_context( pNewContext->gl_ctx );\r
-    FREE( pNewContext );\r
-    SetLastError( 0 );\r
-    return (HGLRC)NULL;\r
-  }\r
-\r
-  /*========================================================================*/\r
-  /* Do all the driver stuff.                                               */\r
-  /*========================================================================*/\r
-  pNewContext->hdc  = hdc;\r
-  pNewContext->next = pD3DDefault->next;\r
-  pD3DDefault->next = pNewContext; /* Add to circular list. */\r
-\r
-  /* Create the HAL for the new context. */\r
-  pNewContext->pShared = InitHAL( WindowFromDC(hdc) );\r
-\r
-  return (HGLRC)pNewContext;\r
-}\r
-/*===========================================================================*/\r
-/*  This is a wrapper function that is supported by MakeCurrent.             */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglMakeCurrent( HDC hdc, HGLRC hglrc )\r
-{\r
-   return MakeCurrent((D3DMESACONTEXT *)hglrc);\r
-}\r
-/*===========================================================================*/\r
-/*  MakeCurrent will unbind whatever context is current (if any) & then bind */\r
-/* the supplied context.  A context that is bound has it's window proc hooked*/\r
-/* with the wglMonitorProc and the context pointer is saved in pD3DCurrent.    */\r
-/* Once the context is bound we update the Mesa-3.0 hooks (SetDDPointers) and*/\r
-/* the viewport (Mesa-.30 and DX6).                                          */\r
-/*                                                                           */\r
-/* TODO: this function can't fail.                                           */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE                                                              */\r
-/*===========================================================================*/\r
-static BOOL MakeCurrent( D3DMESACONTEXT *pContext )\r
-{\r
-   D3DMESACONTEXT *pNext;\r
-\r
-   /*====================================================================*/\r
-   /* This is a special case that is a request to have no context bound. */\r
-   /*====================================================================*/\r
-   if ( pContext == NULL )\r
-   {\r
-       /* Walk the whole list. We start and end at the Default context. */\r
-       for( pNext = pD3DDefault->next; pNext != pD3DDefault; pNext = pNext->next )\r
-         UnBindWindow( pNext );\r
-      \r
-       return TRUE;\r
-   }\r
-\r
-   /*=================================================*/\r
-   /* Make for a fast redundant use of this function. */\r
-   /*=================================================*/\r
-   if ( pD3DCurrent == pContext )\r
-      return TRUE;\r
-\r
-   /*=============================*/\r
-   /* Unbind the current context. */\r
-   /*=============================*/\r
-   UnBindWindow( pD3DCurrent );\r
-\r
-   /*=====================================*/\r
-   /* Let Mesa-3.0 we have a new context. */\r
-   /*=====================================*/\r
-   SetupDDPointers( pContext->gl_ctx );\r
-   _mesa_make_current( pContext->gl_ctx, pContext->gl_buffer );\r
-\r
-   /*  We are done so set the internal current context. */\r
-   if ( pContext != pD3DDefault )\r
-   {\r
-       ResizeContext( pContext->gl_ctx );\r
-       pContext->hOldProc = (WNDPROC)GetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC );\r
-       SetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC, (LONG)wglMonitorProc );\r
-   }\r
-   pD3DCurrent = pContext;\r
-\r
-   return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will only return the current window size.  I have re-done  */   \r
-/* this function so that it doesn't check the current size and react to it as*/   \r
-/* I should be able to have all the react code in the WM_SIZE message.  The  */   \r
-/* old version would check the current window size and create/resize the HAL */   \r
-/* surfaces if they have changed.  I needed to delay the creation if the     */   \r
-/* surfaces because sometimes I wouldn't have a window size so this is where */   \r
-/* I delayed it.  If you are reading this then all went ok!                  */   \r
-/*  The default context will return a zero sized window and I'm not sure if  */\r
-/* this is ok at this point (TODO).                                          */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void GetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height )\r
-{\r
-  D3DMESACONTEXT        *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-  /* Fall through for the default because that is one of the uses for it. */\r
-  if ( pContext == pD3DDefault )\r
-  {\r
-    *width  = 0;\r
-    *height = 0;\r
-  }\r
-  else\r
-  {\r
-    *width  = pContext->pShared->dwWidth;\r
-    *height = pContext->pShared->dwHeight;\r
-  }\r
-}\r
-/*===========================================================================*/\r
-/*                                                                           */\r
-/*                                                                           */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static BOOL ResizeContext( GLcontext *ctx )\r
-{\r
-  D3DMESACONTEXT        *pContext = (D3DMESACONTEXT *)ctx->DriverCtx,\r
-                   *pCurrentTemp;\r
-  RECT                  rectClient;\r
-  POINT                 pt;\r
-  DWORD                 dwWidth,\r
-                   dwHeight;\r
-  static BOOL           bDDrawLock = FALSE;\r
-\r
-  /* Make sure we have some values. */\r
-  if ( (pContext->hdc == NULL ) || \r
-         (pContext->pShared->hwnd != WindowFromDC(pContext->hdc)) ||\r
-       (pContext == pD3DDefault) )\r
-    return FALSE;\r
-\r
-  /* Having problems with DDraw sending resize messages before I was done. */\r
-  if( bDDrawLock == TRUE )\r
-    return FALSE;\r
-\r
-  // TODO: don't think I need this anymore.\r
-  pCurrentTemp = pD3DCurrent;\r
-  pD3DCurrent = pD3DDefault;\r
-  bDDrawLock = TRUE;\r
-\r
-  /* Get the current window dimentions. */\r
-  UpdateScreenPosHAL( pContext->pShared );\r
-  dwWidth  = pContext->pShared->rectW.right - pContext->pShared->rectW.left;\r
-  dwHeight = pContext->pShared->rectW.bottom - pContext->pShared->rectW.top;\r
-\r
-  /* Is the size of the OffScreen Render different? */\r
-  if ( (dwWidth != pContext->pShared->dwWidth) || (dwHeight != pContext->pShared->dwHeight) )\r
-  {\r
-    /* Create all the D3D surfaces and device. */\r
-    CreateHAL( pContext->pShared );\r
-\r
-    /*  I did this so that software rendering would still work as */\r
-    /* I don't need to scale the z values twice.                  */\r
-    g_DepthScale        = (pContext->pShared->bHardware) ? 1.0 : ((float)0x00FFFFFF);\r
-    g_MaxDepth          = (pContext->pShared->bHardware) ? 1.0 : ((float)0x00FFFFFF);\r
-    gl_DepthRange( pContext->gl_ctx, ctx->Viewport.Near, ctx->Viewport.Far );\r
-\r
-    /* Make sure we have a viewport. */\r
-    gl_Viewport( pContext->gl_ctx, 0, 0, dwWidth, dwHeight );\r
-\r
-    /* Update Mesa as we might have changed from SW <-> HW. */\r
-    SetupDDPointers( pContext->gl_ctx );\r
-    _mesa_make_current( pContext->gl_ctx, pContext->gl_buffer );\r
-\r
-    /*  If we are in HW we need to load the current texture if there is one already. */\r
-    //    if ( (ctx->Texture.Set[ctx->Texture.CurrentSet].Current != NULL) &&\r
-    //      (pContext->pShared->bHardware == TRUE) )\r
-    //    {\r
-    //   CreateTMgrHAL( pContext->pShared,\r
-    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Name,\r
-    //                           0,     \r
-    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Format,\r
-    //                           (RECT *)NULL,\r
-    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Width,\r
-    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Height,\r
-    //                           TM_ACTION_BIND,\r
-    //                           (void *)ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Data );\r
-    //    }\r
-  }\r
-\r
-  // TODO: don't think I need this anymore.\r
-  pD3DCurrent = pCurrentTemp;\r
-  bDDrawLock = FALSE;\r
-\r
-  return TRUE;\r
-}\r
-\r
-/*===========================================================================*\r
-/*  This function will Blt the render buffer to the PRIMARY surface. I repeat*/\r
-/* this code for the other SwapBuffer like functions and the flush (didn't   */\r
-/* want the function calling overhead).  Thsi could have been a macro...     */\r
-/*                                                                           */\r
-/* TODO: there are some problems with viewport/scissoring.                   */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglSwapBuffers( HDC hdc )\r
-{\r
-  /* Fall through for the default because that is one of the uses for it. */\r
-  if ( pD3DCurrent == pD3DDefault )\r
-    return FALSE;\r
-\r
-  SwapBuffersHAL( pD3DCurrent->pShared );\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  Same as wglSwapBuffers.                                                  */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  SwapBuffers( HDC hdc )\r
-{\r
-  /* Fall through for the default because that is one of the uses for it. */\r
-  if ( pD3DCurrent == pD3DDefault )\r
-    return FALSE;\r
-\r
-  SwapBuffersHAL( pD3DCurrent->pShared );\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This should be ok as none of the SwapBuffers will cause a redundant Blt  */\r
-/* as none of my Swap functions will call flush.  This should also allow     */\r
-/* sinlge buffered applications to work (not really worried though).  Some   */\r
-/* applications may flush then swap but then this is there fault IMHO.       */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void Flush( GLcontext *ctx )\r
-{\r
-  /* Fall through for the default because that is one of the uses for it. */\r
-  if ( pD3DCurrent == pD3DDefault )\r
-    return;\r
-\r
-  SwapBuffersHAL( pD3DCurrent->pShared );\r
-}\r
-/*===========================================================================*/\r
-/*  For now this function will ignore the supplied PF. If I'm going to allow */\r
-/* the user to choice the mode and device at startup I'm going to have to do */\r
-/* something different.                                                      */\r
-/*                                                                           */\r
-/* TODO: use the linked list of modes to build a pixel format to be returned */\r
-/*      to the caller.                                                       */\r
-/*===========================================================================*/\r
-/* RETURN: 1.                                                                */\r
-/*===========================================================================*/\r
-int APIENTRY   wglChoosePixelFormat( HDC hdc, CONST PIXELFORMATDESCRIPTOR *ppfd )\r
-{\r
-   return 1;\r
-}\r
-/*===========================================================================*/\r
-/*  See wglChoosePixelFormat.                                                */\r
-/*===========================================================================*/\r
-/* RETURN: 1.                                                                */\r
-/*===========================================================================*/\r
-int APIENTRY   ChoosePixelFormat( HDC hdc, CONST PIXELFORMATDESCRIPTOR *ppfd )\r
-{\r
-  return wglChoosePixelFormat(hdc,ppfd);\r
-}\r
-/*===========================================================================*/\r
-/*  This function (for now) returns a static PF everytime.  This is just to  */\r
-/* allow things to continue.                                                 */\r
-/*===========================================================================*/\r
-/* RETURN: 1.                                                                */\r
-/*===========================================================================*/\r
-int APIENTRY   wglDescribePixelFormat( HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd )\r
-{\r
-   static PIXELFORMATDESCRIPTOR  pfd = \r
-   {\r
-      sizeof(PIXELFORMATDESCRIPTOR),   /* size */\r
-      1,                               /* version */\r
-      PFD_SUPPORT_OPENGL |\r
-      PFD_DRAW_TO_WINDOW |\r
-      PFD_DOUBLEBUFFER,                /* support double-buffering */\r
-      PFD_TYPE_RGBA,                   /* color type */\r
-      16,                              /* prefered color depth */\r
-      0, 0, 0, 0, 0, 0,                /* color bits (ignored) */\r
-      0,                               /* no alpha buffer */\r
-      0,                               /* alpha bits (ignored) */\r
-      0,                               /* no accumulation buffer */\r
-      0, 0, 0, 0,                      /* accum bits (ignored) */\r
-      16,                              /* depth buffer */\r
-      0,                               /* no stencil buffer */\r
-      0,                               /* no auxiliary buffers */\r
-      PFD_MAIN_PLANE,                  /* main layer */\r
-      0,                               /* reserved */\r
-      0, 0, 0,                         /* no layer, visible, damage masks */\r
-   };\r
-\r
-   /* Return the address of this static PF if one was requested. */\r
-   if ( ppfd != NULL )\r
-      memcpy( ppfd, &pfd, sizeof(PIXELFORMATDESCRIPTOR) );\r
-\r
-  return 1;\r
-}\r
-/*===========================================================================*/\r
-/*  See wglDescribePixelFormat.                                              */\r
-/*===========================================================================*/\r
-/* RETURN: 1.                                                                */\r
-/*===========================================================================*/\r
-int APIENTRY   DescribePixelFormat( HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd )\r
-{\r
-  return wglDescribePixelFormat(hdc,iPixelFormat,nBytes,ppfd);\r
-}\r
-/*===========================================================================*/\r
-/*  This function will always return 1 for now.  Just to allow for support.  */\r
-/*===========================================================================*/\r
-/* RETURN: 1.                                                                */\r
-/*===========================================================================*/\r
-int APIENTRY   wglGetPixelFormat( HDC hdc )\r
-{\r
-   return 1;\r
-}\r
-/*===========================================================================*/\r
-/*  See wglGetPixelFormat.                                                   */\r
-/*===========================================================================*/\r
-/* RETURN: 1.                                                                */\r
-/*===========================================================================*/\r
-int APIENTRY   GetPixelFormat( HDC hdc )\r
-{\r
-   return wglGetPixelFormat(hdc);\r
-}\r
-/*===========================================================================*/\r
-/*  This will aways work for now.                                            */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE.                                                             */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglSetPixelFormat( HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *ppfd )\r
-{\r
-   return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  See wglSetPixelFormat.                                                   */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  SetPixelFormat( HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *ppfd )\r
-{\r
-   return wglSetPixelFormat(hdc,iPixelFormat,ppfd);\r
-}\r
-/*===========================================================================*/\r
-/*  This is a wrapper function that is supported by my own internal function.*/\r
-/* that takes my own D3D Mesa context structure.  This so I can reuse the    */\r
-/* function (no need for speed).                                             */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE.                                                             */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglDeleteContext( HGLRC hglrc )\r
-{\r
-   DestroyContext( (D3DMESACONTEXT *)hglrc );\r
-\r
-   return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  Simple getter function that uses a cast.                                 */\r
-/*===========================================================================*/\r
-/* RETURN: casted pointer to the context, NULL.                              */\r
-/*===========================================================================*/\r
-HGLRC APIENTRY wglGetCurrentContext( VOID )\r
-{\r
-   return (pD3DCurrent) ? (HGLRC)pD3DCurrent : (HGLRC)NULL;\r
-}\r
-/*===========================================================================*/\r
-/* No support.                                                               */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglCopyContext( HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask )\r
-{\r
-   SetLastError( 0 );\r
-   return FALSE;\r
-}\r
-/*===========================================================================*/\r
-/* No support.                                                               */\r
-/*===========================================================================*/\r
-/* RETURN: NULL.                                                             */\r
-/*===========================================================================*/\r
-HGLRC APIENTRY wglCreateLayerContext( HDC hdc,int iLayerPlane )\r
-{\r
-   SetLastError( 0 );\r
-   return (HGLRC)NULL;\r
-}\r
-/*===========================================================================*/\r
-/*  Simple getter function.                                                  */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-HDC APIENTRY   wglGetCurrentDC( VOID )\r
-{\r
-   return (pD3DCurrent) ? pD3DCurrent->hdc : (HDC)NULL;\r
-}\r
-/*===========================================================================*/\r
-/*  Simply call that searches the supported extensions for a match & returns */\r
-/* the pointer to the function that lends support.                           */\r
-/*===========================================================================*/\r
-/* RETURN: pointer to API call, NULL.                                        */\r
-/*===========================================================================*/\r
-PROC APIENTRY  wglGetProcAddress( LPCSTR lpszProc )\r
-{\r
-   int   index;\r
-\r
-   for( index = 0; index < qt_ext; index++ )\r
-      if( !strcmp(lpszProc,ext[index].name) )\r
-        return ext[index].proc;\r
-\r
-   SetLastError( 0 );\r
-   return NULL;\r
-}\r
-/*===========================================================================*/\r
-/*  No support.                                                              */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglShareLists( HGLRC hglrc1, HGLRC hglrc2 )\r
-{\r
-   SetLastError( 0 );\r
-   return FALSE;\r
-}\r
-/*===========================================================================*/\r
-/*  No support.                                                              */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglUseFontBitmaps( HDC fontDevice, DWORD firstChar, DWORD numChars, DWORD listBase )\r
-{\r
-   SetLastError( 0 );\r
-   return FALSE;\r
-}\r
-/*===========================================================================*/\r
-/*  No support.                                                              */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglUseFontBitmapsW( HDC hdc,DWORD first,DWORD count,DWORD listBase )\r
-{\r
-   SetLastError( 0 );\r
-   return FALSE;\r
-}\r
-/*===========================================================================*/\r
-/*  No support.                                                              */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglUseFontOutlinesA( HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf )\r
-{\r
-   SetLastError( 0 );\r
-   return FALSE;\r
-}\r
-/*===========================================================================*/\r
-/*  No support.                                                              */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglUseFontOutlinesW( HDC hdc,DWORD first,DWORD count, DWORD listBase,FLOAT deviation, FLOAT extrusion,int format, LPGLYPHMETRICSFLOAT lpgmf )\r
-{\r
-   SetLastError( 0 );\r
-   return FALSE ;\r
-}\r
-/*===========================================================================*/\r
-/*  No support.                                                              */\r
-/*===========================================================================*/\r
-/* RETURN: FALSE.                                                            */\r
-/*===========================================================================*/\r
-BOOL APIENTRY  wglSwapLayerBuffers( HDC hdc, UINT fuPlanes )\r
-{\r
-   SetLastError( 0 );\r
-   return FALSE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will be hooked into the window that has been bound.  Right */\r
-/* now it is used to track the window size and position.  Also the we clean  */\r
-/* up the currrent context when the window is close/destroyed.               */\r
-/*                                                                           */\r
-/* TODO: there might be something wrong here as some games (Heretic II) don't*/\r
-/*      track the window quit right.                                         */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-LONG APIENTRY  wglMonitorProc( HWND hwnd, UINT message, UINT wParam, LONG lParam )\r
-{\r
-  WNDPROC       hOldProc;\r
-  GLint width,\r
-         height;\r
-\r
-  switch( message ) \r
-  {\r
-//      case WM_PAINT:\r
-//        break;\r
-//      case WM_ACTIVATE:\r
-//         break;\r
-//      case WM_SHOWWINDOW:\r
-//         break;\r
-\r
-    case UM_FATALSHUTDOWN:\r
-        /* Support the API until we die... */\r
-        MakeCurrent( pD3DDefault );\r
-        break;\r
-\r
-    case WM_MOVE:\r
-    case WM_DISPLAYCHANGE:\r
-    case WM_SIZE:\r
-        ResizeContext( pD3DCurrent->gl_ctx );\r
-        break;\r
-\r
-    case WM_CLOSE:\r
-    case WM_DESTROY:\r
-        /* Support the API until we die... */\r
-        hOldProc = pD3DCurrent->hOldProc;\r
-        DestroyContext( pD3DCurrent );\r
-        return (hOldProc)(hwnd,message,wParam,lParam);\r
-  }\r
-\r
-  return (pD3DCurrent->hOldProc)(hwnd,message,wParam,lParam);\r
-}\r
-\r
-/**********************************************************************/\r
-/*****              Miscellaneous device driver funcs             *****/\r
-/**********************************************************************/\r
-\r
-/*===========================================================================*/\r
-/*  Not reacting to this as I'm only supporting drawing to the back buffer   */\r
-/* right now.                                                                */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE.                                                             */\r
-/*===========================================================================*/\r
-static GLboolean SetBuffer( GLcontext *ctx, GLenum buffer )\r
-{\r
-   if (buffer == GL_BACK_LEFT)\r
-      return GL_TRUE;\r
-   else\r
-      return GL_FALSE;\r
-}\r
-/*===========================================================================*/\r
-/*  This proc will be called by Mesa when the viewport has been set.  So if  */\r
-/* we have a context and it isn't the default then we should let D3D know of */\r
-/* the change.                                                               */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void SetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-   RECT           rect;\r
-\r
-   /* Make sure we can set a viewport. */\r
-   if ( pContext->pShared && (pContext != pD3DDefault) )\r
-   {\r
-        // TODO: might be needed.\r
-     UpdateScreenPosHAL( pContext->pShared );\r
-       rect.left   = x;\r
-       rect.right  = x + w;\r
-       rect.top    = y;\r
-       rect.bottom = y + h;\r
-\r
-       // TODO: shared struct should make this call smaller\r
-     SetViewportHAL( pContext->pShared, &rect, 0.0F, 1.0F );\r
-   }\r
-}\r
-/*===========================================================================*/\r
-/*  This function could be better I guess but I decided just to grab the four*/\r
-/* components and store then seperately.  Makes it easier to use IMHO.       */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void ClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-   pContext->aClear = a;\r
-   pContext->bClear = b;\r
-   pContext->gClear = g;\r
-   pContext->rClear = r;\r
-}\r
-/*===========================================================================*/\r
-/*  This function could be better I guess but I decided just to grab the four*/\r
-/* components and store then seperately.  Makes it easier to use IMHO.       */\r
-/* (is there an echo in here?)                                               */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void SetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-   pContext->aCurrent = a;\r
-   pContext->bCurrent = b;\r
-   pContext->gCurrent = g;\r
-   pContext->rCurrent = r;\r
-}\r
-/*===========================================================================*/\r
-/*                                                                           */\r
-/*                                                                           */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static const char *RendererString( void )\r
-{\r
-  static char pszRender[64];\r
-\r
-  strcpy( pszRender, "altD3D " );\r
-\r
-  if ( pD3DCurrent->pShared->bHardware )\r
-    strcat( pszRender, "(HW)");\r
-  else\r
-    strcat( pszRender, "(SW)");\r
-\r
-  return (const char *)pszRender;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will choose which set of pointers Mesa will use based on   */\r
-/* whether we hard using hardware or software.  I have added another set of  */\r
-/* pointers that will do nothing but stop the API from crashing.             */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void SetupDDPointers( GLcontext *ctx )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-   // TODO: write a generic NULL support for the span render. \r
-   if ( pContext->pShared && pContext->pShared->bHardware )\r
-   {\r
-       ctx->Driver.UpdateState = SetupHWDDPointers;\r
-   }\r
-   else if ( pContext == pD3DDefault )\r
-   {\r
-       ctx->Driver.UpdateState = SetupNULLDDPointers;\r
-   }\r
-   else\r
-   {\r
-       ctx->Driver.UpdateState = SetupSWDDPointers;\r
-   }\r
-}\r
-/*===========================================================================*/\r
-/*  This function will populate all the Mesa driver hooks. This version of   */\r
-/* hooks will do nothing but support the API when we don't have a valid      */\r
-/* context bound.  This is mostly for applications that don't behave right   */\r
-/* and also to help exit as clean as possable when we have a FatalError.     */\r
-/*===========================================================================*/\r
-/* RETURN: pointer to the specific function.                                 */\r
-/*===========================================================================*/\r
-static void SetupNULLDDPointers( GLcontext *ctx )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-   /* Initialize all the pointers in the DD struct.  Do this whenever */\r
-   /* a new context is made current or we change buffers via set_buffer! */\r
-   ctx->Driver.UpdateState          = SetupNULLDDPointers;\r
-\r
-   /* State management hooks. */\r
-   ctx->Driver.Color                = NULLSetColor;\r
-   ctx->Driver.ClearColor           = NULLClearColor;\r
-   ctx->Driver.Clear                = NULLClearBuffers;\r
-   ctx->Driver.SetBuffer            = NULLSetBuffer;\r
-\r
-   /* Window management hooks. */\r
-   ctx->Driver.GetBufferSize        = NULLGetBufferSize;\r
-\r
-   /* Primitive rendering hooks. */\r
-   ctx->Driver.TriangleFunc         = NULL;\r
-   ctx->Driver.RenderVB             = NULL;\r
-\r
-   /* Pixel/span writing functions: */\r
-   ctx->Driver.WriteRGBASpan        = NULLWrSpRGBA;\r
-   ctx->Driver.WriteRGBSpan         = NULLWrSpRGB;\r
-   ctx->Driver.WriteMonoRGBASpan    = NULLWrSpRGBAMono;\r
-   ctx->Driver.WriteRGBAPixels      = NULLWrPiRGBA;\r
-   ctx->Driver.WriteMonoRGBAPixels  = NULLWrPiRGBAMono;\r
-\r
-   /* Pixel/span reading functions: */\r
-   ctx->Driver.ReadRGBASpan         = NULLReSpRGBA;\r
-   ctx->Driver.ReadRGBAPixels       = NULLRePiRGBA;\r
-\r
-   /* Misc. hooks. */\r
-   ctx->Driver.RendererString    = RendererString;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will populate all the Mesa driver hooks. There are two of  */\r
-/* these functions.  One if we have hardware support and one is there is only*/\r
-/* software.  These functions will be called by Mesa and by the wgl.c when we*/\r
-/* have resized (or created) the buffers.  The thing is that if a window gets*/\r
-/* resized we may loose hardware support or gain it...                       */\r
-/*===========================================================================*/\r
-/* RETURN: pointer to the specific function.                                 */\r
-/*===========================================================================*/\r
-static void SetupSWDDPointers( GLcontext *ctx )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-   /* Initialize all the pointers in the DD struct.  Do this whenever */\r
-   /* a new context is made current or we change buffers via set_buffer! */\r
-   ctx->Driver.UpdateState          = SetupSWDDPointers;\r
-\r
-   /* State management hooks. */\r
-   ctx->Driver.Color                = SetColor;\r
-   ctx->Driver.ClearColor           = ClearColor;\r
-   ctx->Driver.Clear                = ClearBuffers;\r
-   ctx->Driver.SetBuffer            = SetBuffer;\r
-\r
-   /* Window management hooks. */\r
-   ctx->Driver.GetBufferSize        = GetBufferSize;\r
-   ctx->Driver.Viewport             = SetViewport;\r
-\r
-   /* Primitive rendering hooks. */\r
-   ctx->Driver.TriangleFunc         = NULL;\r
-   ctx->Driver.RenderVB             = NULL;\r
-\r
-   /* Texture management hooks. */\r
-\r
-   /* Pixel/span writing functions: */\r
-   ctx->Driver.WriteRGBASpan        = WSpanRGBA;\r
-   ctx->Driver.WriteRGBSpan         = WSpanRGB;\r
-   ctx->Driver.WriteMonoRGBASpan    = WSpanRGBAMono;\r
-   ctx->Driver.WriteRGBAPixels      = WPixelsRGBA;\r
-   ctx->Driver.WriteMonoRGBAPixels  = WPixelsRGBAMono;\r
-\r
-   /* Pixel/span reading functions: */\r
-   ctx->Driver.ReadRGBASpan         = RSpanRGBA;\r
-   ctx->Driver.ReadRGBAPixels       = RPixelsRGBA;\r
-\r
-   /* Misc. hooks. */\r
-   ctx->Driver.Flush                = Flush;\r
-   ctx->Driver.RendererString    = RendererString;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will populate all the Mesa driver hooks. There are two of  */\r
-/* these functions.  One if we have hardware support and one is there is only*/\r
-/* software.  These functions will be called by Mesa and by the wgl.c when we*/\r
-/* have resized (or created) the buffers.  The thing is that if a window gets*/\r
-/* resized we may loose hardware support or gain it...                       */\r
-/*===========================================================================*/\r
-/* RETURN: pointer to the specific function.                                 */\r
-/*===========================================================================*/\r
-static void SetupHWDDPointers( GLcontext *ctx )\r
-{\r
-   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-   /* Initialize all the pointers in the DD struct.  Do this whenever */\r
-   /* a new context is made current or we change buffers via set_buffer! */\r
-   ctx->Driver.UpdateState          = SetupHWDDPointers;\r
-\r
-   /* State management hooks. */\r
-   ctx->Driver.Color                = SetColor;\r
-   ctx->Driver.ClearColor           = ClearColor;\r
-   ctx->Driver.Clear                = ClearBuffersD3D;\r
-   ctx->Driver.SetBuffer            = SetBuffer;\r
-\r
-   /* Window management hooks. */\r
-   ctx->Driver.GetBufferSize        = GetBufferSize;\r
-   ctx->Driver.Viewport             = SetViewport;\r
-\r
-   /* Primitive rendering hooks. */\r
-   ctx->Driver.TriangleFunc         = RenderOneTriangle;\r
-   ctx->Driver.LineFunc                          = RenderOneLine;\r
-   ctx->Driver.RenderVB             = RenderVertexBuffer;\r
-\r
-   /* Pixel/span writing functions: */\r
-   ctx->Driver.WriteRGBASpan        = WSpanRGBA;\r
-   ctx->Driver.WriteRGBSpan         = WSpanRGB;\r
-   ctx->Driver.WriteMonoRGBASpan    = WSpanRGBAMono;\r
-   ctx->Driver.WriteRGBAPixels      = WPixelsRGBA;\r
-   ctx->Driver.WriteMonoRGBAPixels  = WPixelsRGBAMono;\r
-\r
-   /* Pixel/span reading functions: */\r
-   ctx->Driver.ReadRGBASpan         = RSpanRGBA;\r
-   ctx->Driver.ReadRGBAPixels       = RPixelsRGBA;\r
-\r
-   /* Texture management hooks. */\r
-   //   ctx->Driver.BindTexture          = TextureBind;\r
-   ctx->Driver.TexImage             = TextureLoad;\r
-   ctx->Driver.TexSubImage          = TextureSubImage;\r
-\r
-   /* Misc. hooks. */\r
-   ctx->Driver.Flush                = Flush;\r
-   ctx->Driver.RendererString    = RendererString;\r
-}\r
-/*===========================================================================*/\r
-/*  This function will release all resources used by the DLL.  Every context */\r
-/* will be clobbered by releaseing all driver desources and then freeing the */\r
-/* context memory.  Most all the work is done in DestroyContext.             */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE.                                                             */\r
-/*===========================================================================*/\r
-static BOOL  TermOpenGL( HINSTANCE hInst )\r
-{\r
-  D3DMESACONTEXT *pTmp,\r
-                *pNext;\r
-\r
-  /* Just incase we are still getting paint msg. */\r
-  MakeCurrent( pD3DDefault );\r
-\r
-  /* Walk the list until we get back to the default context. */\r
-  for( pTmp = pD3DDefault->next; pTmp != pD3DDefault; pTmp = pNext )\r
-  {\r
-    pNext = pTmp->next;\r
-    DestroyContext( pTmp );\r
-  }\r
-  DestroyContext( pD3DDefault );\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  This function is an internal function that will clean up all the Mesa    */\r
-/* context bound to this D3D context.  Also any D3D stuff that this context  */\r
-/* uses will be unloaded.                                                    */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-static void DestroyContext( D3DMESACONTEXT *pContext )\r
-{\r
-  D3DMESACONTEXT        *pTmp;\r
-\r
-  /* Walk the list until we find the context before this one. */\r
-  for( pTmp = pD3DDefault; pTmp && (pTmp->next != pContext); pTmp = pTmp->next )\r
-    if ( pTmp == pTmp->next )\r
-        break;\r
-\r
-  /* If we never found it it must already be deleted. */\r
-  if ( pTmp->next != pContext )\r
-    return;\r
-\r
-  /* Make sure we are not using this context. */\r
-  if ( pContext == pD3DCurrent )\r
-    MakeCurrent( pD3DDefault );\r
-\r
-   /* Free the Mesa stuff. */\r
-   if ( pContext->gl_visual ) \r
-   {\r
-      _mesa_destroy_visual( pContext->gl_visual );\r
-      pContext->gl_visual = NULL;\r
-   }\r
-   if ( pContext->gl_buffer ) \r
-   {\r
-      _mesa_destroy_framebuffer( pContext->gl_buffer );\r
-      pContext->gl_buffer = NULL;\r
-   }\r
-   if ( pContext->gl_ctx )    \r
-   {\r
-      _mesa_destroy_context( pContext->gl_ctx );\r
-      pContext->gl_ctx = NULL;\r
-   }\r
-\r
-   /* Now dump the D3D. */\r
-   if ( pContext->pShared )\r
-       TermHAL( pContext->pShared );\r
-\r
-   /* Update the previous context's link. */\r
-   pTmp->next = pContext->next;\r
-\r
-   /* Gonzo. */\r
-   FREE( pContext );\r
-}\r
-/*===========================================================================*/\r
-/*  This function will pull the supplied context away from Win32.  Basicly it*/\r
-/* will remove the hook from the window Proc.                                */\r
-/*                                                                           */\r
-/* TODO: might want to serialize this stuff...                               */\r
-/*===========================================================================*/\r
-/* RETURN: TRUE, FALSE.                                                      */\r
-/*===========================================================================*/\r
-static BOOL UnBindWindow( D3DMESACONTEXT *pContext )\r
-{\r
-  if ( pContext == NULL )\r
-    return FALSE;\r
-\r
-  if ( pContext == pD3DDefault )\r
-    return TRUE;\r
-\r
-  /* Make sure we always have a context bound. */\r
-  if ( pContext == pD3DCurrent )\r
-    pD3DCurrent = pD3DDefault;\r
-\r
-  SetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC, (LONG)pContext->hOldProc );\r
-  pContext->hOldProc   = NULL;\r
-\r
-  return TRUE;\r
-}\r
-/*===========================================================================*/\r
-/*  There are two cases that allow for a faster clear when we know that the  */\r
-/* whole buffer is cleared and that there is no clipping.                    */\r
-/*===========================================================================*/\r
-/* RETURN: the original mask with the bits cleared that represents the buffer*\r
-/* or buffers we just cleared.                                               */\r
-/*===========================================================================*/\r
-GLbitfield ClearBuffersD3D( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height )\r
-{\r
-  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-  DWORD          dwFlags = 0;\r
-\r
-  if ( mask & GL_COLOR_BUFFER_BIT )\r
-  {\r
-    dwFlags |= D3DCLEAR_TARGET;\r
-    mask &= ~GL_COLOR_BUFFER_BIT;\r
-  }\r
-  if ( mask & GL_DEPTH_BUFFER_BIT )\r
-  {\r
-    dwFlags |= D3DCLEAR_ZBUFFER;\r
-    mask &= ~GL_DEPTH_BUFFER_BIT;\r
-  }\r
-  if ( dwFlags == 0 )\r
-    return mask;\r
-\r
-  ClearHAL( pContext->pShared, \r
-                 dwFlags, \r
-                 all, \r
-                 x, y, \r
-                 width, height, \r
-                 ((pContext->aClear<<24) | (pContext->rClear<<16) | (pContext->gClear<<8) | (pContext->bClear)), \r
-                 ctx->Depth.Clear, \r
-                 0 );\r
-\r
-  return mask;\r
-}\r
-\r
-\r
-\r
-/*===========================================================================*/\r
-/*  TEXTURE MANAGER: ok here is how I did textures.  Mesa-3.0 will keep track*/\r
-/* of all the textures for us.  So this means that at anytime we can go to   */\r
-/* the Mesa context and get the current texture.  With this in mind this is  */\r
-/* what I did.  I really don't care about what textures get or are loaded    */\r
-/* until I actually have to draw a tri that is textured.  At this point I    */\r
-/* must have the texture so I demand the texture by destorying all other     */\r
-/* texture surfaces if need be and load the current one.  This allows for the*/\r
-/* best preformance on low memory cards as time is not wasted loading and    */\r
-/* unload textures.                                                          */\r
-/*===========================================================================*/\r
-\r
-\r
-\r
-\r
-\r
-/*===========================================================================*/\r
-/*  TextureLoad will try and create a D3D surface from the supplied texture  */\r
-/* object if its level 0 (first).  The surface will be fully filled with the */\r
-/* texture.                                                                  */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void TextureLoad( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, const struct gl_texture_image *image )\r
-{\r
-  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-  /* TODO: only doing first LOD. */\r
-  if ( (ctx->DriverCtx == NULL) || (level != 0) )\r
-    return;\r
-\r
-  CreateTMgrHAL( pContext->pShared, \r
-                         tObj->Name, \r
-                         level,\r
-                         tObj->Image[level]->Format,\r
-                         (RECT *)NULL,\r
-                         tObj->Image[level]->Width, \r
-                         tObj->Image[level]->Height,\r
-                         TM_ACTION_LOAD,\r
-                         (void *)tObj->Image[level]->Data );\r
-}\r
-/*===========================================================================*/\r
-/*  TextureBind make sure that the texture is on the card.  Thats it.        */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void TextureBind( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj )\r
-{\r
-  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-\r
-  /* TODO: only doing first LOD. */\r
-  if ( (tObj->Image[0] == NULL) || (ctx->DriverCtx == NULL) )\r
-    return;\r
-\r
-  CreateTMgrHAL( pContext->pShared, \r
-                         tObj->Name, \r
-                         0,\r
-                         tObj->Image[0]->Format,\r
-                         (RECT *)NULL,\r
-                         tObj->Image[0]->Width, \r
-                         tObj->Image[0]->Height,\r
-                         TM_ACTION_BIND,\r
-                         (void *)tObj->Image[0]->Data );\r
-}\r
-/*===========================================================================*/\r
-/*  TextureSubImage will make sure that the texture being updated is updated */\r
-/* if its on the card.                                                       */\r
-/*===========================================================================*/\r
-/* RETURN:                                                                   */\r
-/*===========================================================================*/\r
-static void TextureSubImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLint internalFormat, const struct gl_texture_image *image )\r
-{\r
-  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;\r
-  RECT           rect;\r
-\r
-  /* TODO: only doing first LOD. */\r
-  if ( (ctx->DriverCtx == NULL) || (level > 0) )\r
-    return;\r
-\r
-  /* Create a dirty rectangle structure. */\r
-  rect.left   = xoffset;\r
-  rect.right  = xoffset + width;\r
-  rect.top    = yoffset;\r
-  rect.bottom = yoffset + height;\r
-  \r
-  CreateTMgrHAL( pContext->pShared, \r
-                         tObj->Name, \r
-                         0,\r
-                         tObj->Image[0]->Format, \r
-                         &rect,\r
-                         tObj->Image[0]->Width, \r
-                         tObj->Image[0]->Height,\r
-                         TM_ACTION_UPDATE,\r
-                         (void *)tObj->Image[0]->Data );\r
-}\r
-\r
+/*===========================================================================*/
+/*                                                                           */
+/* Mesa-3.0 Makefile for DirectX 6                                           */
+/*                                                                           */
+/* By Leigh McRae                                                            */
+/*                                                                           */
+/* http://www.altsoftware.com/                                               */
+/*                                                                           */
+/* Copyright (c) 1998-1997  alt.software inc.  All Rights Reserved           */
+/*===========================================================================*/
+#include "D3DMesa.h"
+/*===========================================================================*/
+/* Window managment.                                                         */
+/*===========================================================================*/
+static BOOL    InitOpenGL( HINSTANCE hInst );
+static BOOL    TermOpenGL( HINSTANCE hInst );
+static BOOL     ResizeContext( GLcontext *ctx );
+static BOOL    MakeCurrent( D3DMESACONTEXT *pContext );
+static void    DestroyContext( D3DMESACONTEXT *pContext );
+static BOOL    UnBindWindow( D3DMESACONTEXT *pContext );
+LONG APIENTRY  wglMonitorProc( HWND hwnd, UINT message, UINT wParam, LONG lParam );
+/*===========================================================================*/
+/* Mesa hooks.                                                               */
+/*===========================================================================*/
+static void SetupDDPointers( GLcontext *ctx );
+static void SetupSWDDPointers( GLcontext *ctx );
+static void SetupHWDDPointers( GLcontext *ctx );
+static void SetupNULLDDPointers( GLcontext *ctx );
+static const char *RendererString( void );
+
+/* State Management hooks. */
+static void       SetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a );
+static void       ClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a );
+static GLboolean SetBuffer( GLcontext *ctx, GLenum buffer );
+
+/* Window Management hooks. */
+static void GetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height );
+static void SetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h );
+static void Flush( GLcontext *ctx );
+
+/* Span rendering hooks. */
+void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );
+void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
+void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );
+void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
+void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
+void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
+void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
+GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+
+/* Primitve rendering hooks. */
+GLboolean  RenderVertexBuffer( GLcontext *ctx, GLboolean allDone );
+void             RenderOneTriangle( GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint pv );
+void     RenderOneLine( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv );
+GLbitfield ClearBuffersD3D( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+
+/* Texture Management hooks. */
+static void TextureBind( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj );
+static void TextureLoad( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, const struct gl_texture_image *image );
+static void TextureSubImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLint internalFormat, const struct gl_texture_image *image );
+/*===========================================================================*/
+/* Global variables.                                                         */
+/*===========================================================================*/
+D3DMESACONTEXT *pD3DCurrent,     
+              *pD3DDefault;     /* Thin support context. */
+
+struct __extensions__   ext[] = {
+
+    { (PROC)glPolygonOffsetEXT,        "glPolygonOffsetEXT"       },
+    { (PROC)glBlendEquationEXT,        "glBlendEquationEXT"       },
+    { (PROC)glBlendColorEXT,           "glBlendColorExt"          },
+    { (PROC)glVertexPointerEXT,        "glVertexPointerEXT"       },
+    { (PROC)glNormalPointerEXT,        "glNormalPointerEXT"       },
+    { (PROC)glColorPointerEXT,         "glColorPointerEXT"        },
+    { (PROC)glIndexPointerEXT,         "glIndexPointerEXT"        },
+    { (PROC)glTexCoordPointerEXT,      "glTexCoordPointer"        },
+    { (PROC)glEdgeFlagPointerEXT,      "glEdgeFlagPointerEXT"     },
+    { (PROC)glGetPointervEXT,          "glGetPointervEXT"         },
+    { (PROC)glArrayElementEXT,         "glArrayElementEXT"        },
+    { (PROC)glDrawArraysEXT,           "glDrawArrayEXT"           },
+    { (PROC)glAreTexturesResidentEXT,  "glAreTexturesResidentEXT" },
+    { (PROC)glBindTextureEXT,          "glBindTextureEXT"         },
+    { (PROC)glDeleteTexturesEXT,       "glDeleteTexturesEXT"      },
+    { (PROC)glGenTexturesEXT,          "glGenTexturesEXT"         },
+    { (PROC)glIsTextureEXT,            "glIsTextureEXT"           },
+    { (PROC)glPrioritizeTexturesEXT,   "glPrioritizeTexturesEXT"  },
+    { (PROC)glCopyTexSubImage3DEXT,    "glCopyTexSubImage3DEXT"   },
+    { (PROC)glTexImage3DEXT,           "glTexImage3DEXT"          },
+    { (PROC)glTexSubImage3DEXT,        "glTexSubImage3DEXT"       },
+};
+
+int             qt_ext = sizeof(ext) / sizeof(ext[0]);
+float   g_DepthScale,
+         g_MaxDepth;
+/*===========================================================================*/
+/*  When a process loads this DLL we will setup the linked list for context  */
+/* management and create a default context that will support the API until   */
+/* the user creates and binds thier own.  This THIN default context is useful*/
+/* to have around.                                                           */
+/*  When the process terminates we will clean up all resources here.         */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+BOOL APIENTRY   DllMain( HINSTANCE hInst, DWORD reason, LPVOID reserved )
+{
+  switch( reason ) 
+  {
+    case DLL_PROCESS_ATTACH:
+        return InitOpenGL( hInst );
+
+    case DLL_PROCESS_DETACH:
+        return TermOpenGL( hInst );
+  }     
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  The first thing we do when this dll is hit is connect to the dll that has*/
+/* handles all the DirectX 6 rendering.  I decided to use another dll as DX6 */
+/* is all C++ and Mesa-3.0 is C (thats a good thing).  This way I can write  */
+/* the DX6 in C++ and Mesa-3.0 in C without having to worry about linkage.   */
+/* I feel this is easy and better then using static wrappers as it is likely */
+/* faster and it allows me to just develope the one without compiling the    */
+/* other.                                                                    */
+/*  NOTE that at this point we don't have much other than a very thin context*/
+/* that will support the API calls only to the point of not causing the app  */
+/* to crash from the API table being empty.                                  */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+static BOOL  InitOpenGL( HINSTANCE hInst )
+{
+  /* Allocate and clear the default context. */
+  pD3DDefault = (PD3DMESACONTEXT)ALLOC( sizeof(D3DMESACONTEXT) );
+  if ( pD3DDefault == NULL )
+    return FALSE;
+  memset( pD3DDefault, 0, sizeof(D3DMESACONTEXT) );
+
+  /*  Clear the D3D vertex buffer so that values not used will be zero.  This */
+  /* save me from some redundant work.                                        */
+  memset( &D3DTLVertices, 0, sizeof(D3DTLVertices) );
+
+  /*  Update the link.  We uses a circular list so that it is easy to  */
+  /* add and search.  This context will also be used for head and tail.*/
+  pD3DDefault->next = pD3DDefault;
+
+  /*========================================================================*/
+  /* Do all core Mesa stuff.                                                */
+  /*========================================================================*/
+  pD3DDefault->gl_visual = _mesa_create_visual( TRUE,
+                                               FALSE,      /* db_flag */
+                                               GL_FALSE,   /* stereo */
+                                               8,8,8,8,    /* r, g, b, a bits */
+                                               0,          /* index bits */
+                                               16,         /* depth_bits */
+                                               8,          /* stencil_bits */
+                                               8,8,8,8,    /* accum_bits */
+                                                1 );
+
+  if ( pD3DDefault->gl_visual == NULL)  
+  {
+    FREE( pD3DDefault );
+    return FALSE;
+  }
+
+  /* Allocate a new Mesa context */
+  pD3DDefault->gl_ctx = _mesa_create_context( pD3DDefault->gl_visual, NULL, pD3DDefault, GL_TRUE );
+  if ( pD3DDefault->gl_ctx == NULL ) 
+  {
+    _mesa_destroy_visual( pD3DDefault->gl_visual );
+    FREE( pD3DDefault );
+    return FALSE;
+  }
+
+  /* Allocate a new Mesa frame buffer */
+  pD3DDefault->gl_buffer = _mesa_create_framebuffer( pD3DDefault->gl_visual );
+  if ( pD3DDefault->gl_buffer == NULL )
+  {
+    _mesa_destroy_visual( pD3DDefault->gl_visual );
+    _mesa_destroy_context( pD3DDefault->gl_ctx );
+    FREE( pD3DDefault );
+    return FALSE;
+  }
+  SetupDDPointers( pD3DDefault->gl_ctx );
+  _mesa_make_current( pD3DDefault->gl_ctx, pD3DDefault->gl_buffer );
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This function will create a new D3D context but will not create the D3D  */
+/* surfaces or even an instance of D3D (see at GetBufferSize). The only stuff*/
+/* done here is the internal Mesa stuff and some Win32 handles.              */
+/*===========================================================================*/
+/* RETURN: casted pointer to the context, NULL.                              */
+/*===========================================================================*/
+HGLRC APIENTRY wglCreateContext( HDC hdc )
+{
+  D3DMESACONTEXT        *pNewContext;
+  DWORD                 dwCoopFlags = DDSCL_NORMAL;
+  RECT                  rectClient;
+  POINT                 pt;
+
+  /* ALLOC and clear the new context. */
+  pNewContext = (PD3DMESACONTEXT)ALLOC( sizeof(D3DMESACONTEXT) );
+  if ( pNewContext == NULL )
+  {
+    SetLastError( 0 );
+    return (HGLRC)NULL;
+  }
+  memset( pNewContext, 0, sizeof(D3DMESACONTEXT) );
+
+  /*========================================================================*/
+  /* Do all core Mesa stuff.                                                */
+  /*========================================================================*/
+
+  /* TODO: support more then one visual. */
+  pNewContext->gl_visual = _mesa_create_visual( TRUE,
+                                                TRUE,       /* db_flag */
+                                                GL_FALSE,   /* stereo */
+                                                8,8,8,8,    /* r, g, b, a bits */
+                                                0,          /* index bits */
+                                                16,         /* depth_bits */
+                                                8,          /* stencil_bits */
+                                                16,16,16,16,/* accum_bits */
+                                                1 );
+  if ( pNewContext->gl_visual == NULL) 
+  {
+    FREE( pNewContext );
+    SetLastError( 0 );
+    return (HGLRC)NULL;
+  }
+
+  /* Allocate a new Mesa context */
+  pNewContext->gl_ctx = _mesa_create_context( pNewContext->gl_visual, NULL, pNewContext, GL_TRUE );
+  if ( pNewContext->gl_ctx == NULL ) 
+  {
+    _mesa_destroy_visual( pNewContext->gl_visual );
+    FREE( pNewContext );
+    SetLastError( 0 );
+    return (HGLRC)NULL;
+  }
+
+  /* Allocate a new Mesa frame buffer */
+  pNewContext->gl_buffer = _mesa_create_framebuffer( pNewContext->gl_visual );
+  if ( pNewContext->gl_buffer == NULL )
+  {
+    _mesa_destroy_visual( pNewContext->gl_visual );
+    _mesa_destroy_context( pNewContext->gl_ctx );
+    FREE( pNewContext );
+    SetLastError( 0 );
+    return (HGLRC)NULL;
+  }
+
+  /*========================================================================*/
+  /* Do all the driver stuff.                                               */
+  /*========================================================================*/
+  pNewContext->hdc  = hdc;
+  pNewContext->next = pD3DDefault->next;
+  pD3DDefault->next = pNewContext; /* Add to circular list. */
+
+  /* Create the HAL for the new context. */
+  pNewContext->pShared = InitHAL( WindowFromDC(hdc) );
+
+  return (HGLRC)pNewContext;
+}
+/*===========================================================================*/
+/*  This is a wrapper function that is supported by MakeCurrent.             */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+BOOL APIENTRY  wglMakeCurrent( HDC hdc, HGLRC hglrc )
+{
+   return MakeCurrent((D3DMESACONTEXT *)hglrc);
+}
+/*===========================================================================*/
+/*  MakeCurrent will unbind whatever context is current (if any) & then bind */
+/* the supplied context.  A context that is bound has it's window proc hooked*/
+/* with the wglMonitorProc and the context pointer is saved in pD3DCurrent.    */
+/* Once the context is bound we update the Mesa-3.0 hooks (SetDDPointers) and*/
+/* the viewport (Mesa-.30 and DX6).                                          */
+/*                                                                           */
+/* TODO: this function can't fail.                                           */
+/*===========================================================================*/
+/* RETURN: TRUE                                                              */
+/*===========================================================================*/
+static BOOL MakeCurrent( D3DMESACONTEXT *pContext )
+{
+   D3DMESACONTEXT *pNext;
+
+   /*====================================================================*/
+   /* This is a special case that is a request to have no context bound. */
+   /*====================================================================*/
+   if ( pContext == NULL )
+   {
+       /* Walk the whole list. We start and end at the Default context. */
+       for( pNext = pD3DDefault->next; pNext != pD3DDefault; pNext = pNext->next )
+         UnBindWindow( pNext );
+      
+       return TRUE;
+   }
+
+   /*=================================================*/
+   /* Make for a fast redundant use of this function. */
+   /*=================================================*/
+   if ( pD3DCurrent == pContext )
+      return TRUE;
+
+   /*=============================*/
+   /* Unbind the current context. */
+   /*=============================*/
+   UnBindWindow( pD3DCurrent );
+
+   /*=====================================*/
+   /* Let Mesa-3.0 we have a new context. */
+   /*=====================================*/
+   SetupDDPointers( pContext->gl_ctx );
+   _mesa_make_current( pContext->gl_ctx, pContext->gl_buffer );
+
+   /*  We are done so set the internal current context. */
+   if ( pContext != pD3DDefault )
+   {
+       ResizeContext( pContext->gl_ctx );
+       pContext->hOldProc = (WNDPROC)GetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC );
+       SetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC, (LONG)wglMonitorProc );
+   }
+   pD3DCurrent = pContext;
+
+   return TRUE;
+}
+/*===========================================================================*/
+/*  This function will only return the current window size.  I have re-done  */   
+/* this function so that it doesn't check the current size and react to it as*/   
+/* I should be able to have all the react code in the WM_SIZE message.  The  */   
+/* old version would check the current window size and create/resize the HAL */   
+/* surfaces if they have changed.  I needed to delay the creation if the     */   
+/* surfaces because sometimes I wouldn't have a window size so this is where */   
+/* I delayed it.  If you are reading this then all went ok!                  */   
+/*  The default context will return a zero sized window and I'm not sure if  */
+/* this is ok at this point (TODO).                                          */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void GetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height )
+{
+  D3DMESACONTEXT        *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+  /* Fall through for the default because that is one of the uses for it. */
+  if ( pContext == pD3DDefault )
+  {
+    *width  = 0;
+    *height = 0;
+  }
+  else
+  {
+    *width  = pContext->pShared->dwWidth;
+    *height = pContext->pShared->dwHeight;
+  }
+}
+/*===========================================================================*/
+/*                                                                           */
+/*                                                                           */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static BOOL ResizeContext( GLcontext *ctx )
+{
+  D3DMESACONTEXT        *pContext = (D3DMESACONTEXT *)ctx->DriverCtx,
+                   *pCurrentTemp;
+  RECT                  rectClient;
+  POINT                 pt;
+  DWORD                 dwWidth,
+                   dwHeight;
+  static BOOL           bDDrawLock = FALSE;
+
+  /* Make sure we have some values. */
+  if ( (pContext->hdc == NULL ) || 
+         (pContext->pShared->hwnd != WindowFromDC(pContext->hdc)) ||
+       (pContext == pD3DDefault) )
+    return FALSE;
+
+  /* Having problems with DDraw sending resize messages before I was done. */
+  if( bDDrawLock == TRUE )
+    return FALSE;
+
+  // TODO: don't think I need this anymore.
+  pCurrentTemp = pD3DCurrent;
+  pD3DCurrent = pD3DDefault;
+  bDDrawLock = TRUE;
+
+  /* Get the current window dimentions. */
+  UpdateScreenPosHAL( pContext->pShared );
+  dwWidth  = pContext->pShared->rectW.right - pContext->pShared->rectW.left;
+  dwHeight = pContext->pShared->rectW.bottom - pContext->pShared->rectW.top;
+
+  /* Is the size of the OffScreen Render different? */
+  if ( (dwWidth != pContext->pShared->dwWidth) || (dwHeight != pContext->pShared->dwHeight) )
+  {
+    /* Create all the D3D surfaces and device. */
+    CreateHAL( pContext->pShared );
+
+    /*  I did this so that software rendering would still work as */
+    /* I don't need to scale the z values twice.                  */
+    g_DepthScale        = (pContext->pShared->bHardware) ? 1.0 : ((float)0x00FFFFFF);
+    g_MaxDepth          = (pContext->pShared->bHardware) ? 1.0 : ((float)0x00FFFFFF);
+    gl_DepthRange( pContext->gl_ctx, ctx->Viewport.Near, ctx->Viewport.Far );
+
+    /* Make sure we have a viewport. */
+    gl_Viewport( pContext->gl_ctx, 0, 0, dwWidth, dwHeight );
+
+    /* Update Mesa as we might have changed from SW <-> HW. */
+    SetupDDPointers( pContext->gl_ctx );
+    _mesa_make_current( pContext->gl_ctx, pContext->gl_buffer );
+
+    /*  If we are in HW we need to load the current texture if there is one already. */
+    //    if ( (ctx->Texture.Set[ctx->Texture.CurrentSet].Current != NULL) &&
+    //      (pContext->pShared->bHardware == TRUE) )
+    //    {
+    //   CreateTMgrHAL( pContext->pShared,
+    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Name,
+    //                           0,     
+    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Format,
+    //                           (RECT *)NULL,
+    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Width,
+    //                           ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Height,
+    //                           TM_ACTION_BIND,
+    //                           (void *)ctx->Texture.Set[ctx->Texture.CurrentSet].Current->Image[0]->Data );
+    //    }
+  }
+
+  // TODO: don't think I need this anymore.
+  pD3DCurrent = pCurrentTemp;
+  bDDrawLock = FALSE;
+
+  return TRUE;
+}
+
+/*===========================================================================*
+/*  This function will Blt the render buffer to the PRIMARY surface. I repeat*/
+/* this code for the other SwapBuffer like functions and the flush (didn't   */
+/* want the function calling overhead).  Thsi could have been a macro...     */
+/*                                                                           */
+/* TODO: there are some problems with viewport/scissoring.                   */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+BOOL APIENTRY  wglSwapBuffers( HDC hdc )
+{
+  /* Fall through for the default because that is one of the uses for it. */
+  if ( pD3DCurrent == pD3DDefault )
+    return FALSE;
+
+  SwapBuffersHAL( pD3DCurrent->pShared );
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  Same as wglSwapBuffers.                                                  */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+BOOL APIENTRY  SwapBuffers( HDC hdc )
+{
+  /* Fall through for the default because that is one of the uses for it. */
+  if ( pD3DCurrent == pD3DDefault )
+    return FALSE;
+
+  SwapBuffersHAL( pD3DCurrent->pShared );
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This should be ok as none of the SwapBuffers will cause a redundant Blt  */
+/* as none of my Swap functions will call flush.  This should also allow     */
+/* sinlge buffered applications to work (not really worried though).  Some   */
+/* applications may flush then swap but then this is there fault IMHO.       */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void Flush( GLcontext *ctx )
+{
+  /* Fall through for the default because that is one of the uses for it. */
+  if ( pD3DCurrent == pD3DDefault )
+    return;
+
+  SwapBuffersHAL( pD3DCurrent->pShared );
+}
+/*===========================================================================*/
+/*  For now this function will ignore the supplied PF. If I'm going to allow */
+/* the user to choice the mode and device at startup I'm going to have to do */
+/* something different.                                                      */
+/*                                                                           */
+/* TODO: use the linked list of modes to build a pixel format to be returned */
+/*      to the caller.                                                       */
+/*===========================================================================*/
+/* RETURN: 1.                                                                */
+/*===========================================================================*/
+int APIENTRY   wglChoosePixelFormat( HDC hdc, CONST PIXELFORMATDESCRIPTOR *ppfd )
+{
+   return 1;
+}
+/*===========================================================================*/
+/*  See wglChoosePixelFormat.                                                */
+/*===========================================================================*/
+/* RETURN: 1.                                                                */
+/*===========================================================================*/
+int APIENTRY   ChoosePixelFormat( HDC hdc, CONST PIXELFORMATDESCRIPTOR *ppfd )
+{
+  return wglChoosePixelFormat(hdc,ppfd);
+}
+/*===========================================================================*/
+/*  This function (for now) returns a static PF everytime.  This is just to  */
+/* allow things to continue.                                                 */
+/*===========================================================================*/
+/* RETURN: 1.                                                                */
+/*===========================================================================*/
+int APIENTRY   wglDescribePixelFormat( HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd )
+{
+   static PIXELFORMATDESCRIPTOR  pfd = 
+   {
+      sizeof(PIXELFORMATDESCRIPTOR),   /* size */
+      1,                               /* version */
+      PFD_SUPPORT_OPENGL |
+      PFD_DRAW_TO_WINDOW |
+      PFD_DOUBLEBUFFER,                /* support double-buffering */
+      PFD_TYPE_RGBA,                   /* color type */
+      16,                              /* prefered color depth */
+      0, 0, 0, 0, 0, 0,                /* color bits (ignored) */
+      0,                               /* no alpha buffer */
+      0,                               /* alpha bits (ignored) */
+      0,                               /* no accumulation buffer */
+      0, 0, 0, 0,                      /* accum bits (ignored) */
+      16,                              /* depth buffer */
+      0,                               /* no stencil buffer */
+      0,                               /* no auxiliary buffers */
+      PFD_MAIN_PLANE,                  /* main layer */
+      0,                               /* reserved */
+      0, 0, 0,                         /* no layer, visible, damage masks */
+   };
+
+   /* Return the address of this static PF if one was requested. */
+   if ( ppfd != NULL )
+      memcpy( ppfd, &pfd, sizeof(PIXELFORMATDESCRIPTOR) );
+
+  return 1;
+}
+/*===========================================================================*/
+/*  See wglDescribePixelFormat.                                              */
+/*===========================================================================*/
+/* RETURN: 1.                                                                */
+/*===========================================================================*/
+int APIENTRY   DescribePixelFormat( HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd )
+{
+  return wglDescribePixelFormat(hdc,iPixelFormat,nBytes,ppfd);
+}
+/*===========================================================================*/
+/*  This function will always return 1 for now.  Just to allow for support.  */
+/*===========================================================================*/
+/* RETURN: 1.                                                                */
+/*===========================================================================*/
+int APIENTRY   wglGetPixelFormat( HDC hdc )
+{
+   return 1;
+}
+/*===========================================================================*/
+/*  See wglGetPixelFormat.                                                   */
+/*===========================================================================*/
+/* RETURN: 1.                                                                */
+/*===========================================================================*/
+int APIENTRY   GetPixelFormat( HDC hdc )
+{
+   return wglGetPixelFormat(hdc);
+}
+/*===========================================================================*/
+/*  This will aways work for now.                                            */
+/*===========================================================================*/
+/* RETURN: TRUE.                                                             */
+/*===========================================================================*/
+BOOL APIENTRY  wglSetPixelFormat( HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *ppfd )
+{
+   return TRUE;
+}
+/*===========================================================================*/
+/*  See wglSetPixelFormat.                                                   */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+BOOL APIENTRY  SetPixelFormat( HDC hdc, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *ppfd )
+{
+   return wglSetPixelFormat(hdc,iPixelFormat,ppfd);
+}
+/*===========================================================================*/
+/*  This is a wrapper function that is supported by my own internal function.*/
+/* that takes my own D3D Mesa context structure.  This so I can reuse the    */
+/* function (no need for speed).                                             */
+/*===========================================================================*/
+/* RETURN: TRUE.                                                             */
+/*===========================================================================*/
+BOOL APIENTRY  wglDeleteContext( HGLRC hglrc )
+{
+   DestroyContext( (D3DMESACONTEXT *)hglrc );
+
+   return TRUE;
+}
+/*===========================================================================*/
+/*  Simple getter function that uses a cast.                                 */
+/*===========================================================================*/
+/* RETURN: casted pointer to the context, NULL.                              */
+/*===========================================================================*/
+HGLRC APIENTRY wglGetCurrentContext( VOID )
+{
+   return (pD3DCurrent) ? (HGLRC)pD3DCurrent : (HGLRC)NULL;
+}
+/*===========================================================================*/
+/* No support.                                                               */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+BOOL APIENTRY  wglCopyContext( HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask )
+{
+   SetLastError( 0 );
+   return FALSE;
+}
+/*===========================================================================*/
+/* No support.                                                               */
+/*===========================================================================*/
+/* RETURN: NULL.                                                             */
+/*===========================================================================*/
+HGLRC APIENTRY wglCreateLayerContext( HDC hdc,int iLayerPlane )
+{
+   SetLastError( 0 );
+   return (HGLRC)NULL;
+}
+/*===========================================================================*/
+/*  Simple getter function.                                                  */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+HDC APIENTRY   wglGetCurrentDC( VOID )
+{
+   return (pD3DCurrent) ? pD3DCurrent->hdc : (HDC)NULL;
+}
+/*===========================================================================*/
+/*  Simply call that searches the supported extensions for a match & returns */
+/* the pointer to the function that lends support.                           */
+/*===========================================================================*/
+/* RETURN: pointer to API call, NULL.                                        */
+/*===========================================================================*/
+PROC APIENTRY  wglGetProcAddress( LPCSTR lpszProc )
+{
+   int   index;
+
+   for( index = 0; index < qt_ext; index++ )
+      if( !strcmp(lpszProc,ext[index].name) )
+        return ext[index].proc;
+
+   SetLastError( 0 );
+   return NULL;
+}
+/*===========================================================================*/
+/*  No support.                                                              */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+BOOL APIENTRY  wglShareLists( HGLRC hglrc1, HGLRC hglrc2 )
+{
+   SetLastError( 0 );
+   return FALSE;
+}
+/*===========================================================================*/
+/*  No support.                                                              */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+BOOL APIENTRY  wglUseFontBitmaps( HDC fontDevice, DWORD firstChar, DWORD numChars, DWORD listBase )
+{
+   SetLastError( 0 );
+   return FALSE;
+}
+/*===========================================================================*/
+/*  No support.                                                              */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+BOOL APIENTRY  wglUseFontBitmapsW( HDC hdc,DWORD first,DWORD count,DWORD listBase )
+{
+   SetLastError( 0 );
+   return FALSE;
+}
+/*===========================================================================*/
+/*  No support.                                                              */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+BOOL APIENTRY  wglUseFontOutlinesA( HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf )
+{
+   SetLastError( 0 );
+   return FALSE;
+}
+/*===========================================================================*/
+/*  No support.                                                              */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+BOOL APIENTRY  wglUseFontOutlinesW( HDC hdc,DWORD first,DWORD count, DWORD listBase,FLOAT deviation, FLOAT extrusion,int format, LPGLYPHMETRICSFLOAT lpgmf )
+{
+   SetLastError( 0 );
+   return FALSE ;
+}
+/*===========================================================================*/
+/*  No support.                                                              */
+/*===========================================================================*/
+/* RETURN: FALSE.                                                            */
+/*===========================================================================*/
+BOOL APIENTRY  wglSwapLayerBuffers( HDC hdc, UINT fuPlanes )
+{
+   SetLastError( 0 );
+   return FALSE;
+}
+/*===========================================================================*/
+/*  This function will be hooked into the window that has been bound.  Right */
+/* now it is used to track the window size and position.  Also the we clean  */
+/* up the currrent context when the window is close/destroyed.               */
+/*                                                                           */
+/* TODO: there might be something wrong here as some games (Heretic II) don't*/
+/*      track the window quit right.                                         */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+LONG APIENTRY  wglMonitorProc( HWND hwnd, UINT message, UINT wParam, LONG lParam )
+{
+  WNDPROC       hOldProc;
+  GLint width,
+         height;
+
+  switch( message ) 
+  {
+//      case WM_PAINT:
+//        break;
+//      case WM_ACTIVATE:
+//         break;
+//      case WM_SHOWWINDOW:
+//         break;
+
+    case UM_FATALSHUTDOWN:
+        /* Support the API until we die... */
+        MakeCurrent( pD3DDefault );
+        break;
+
+    case WM_MOVE:
+    case WM_DISPLAYCHANGE:
+    case WM_SIZE:
+        ResizeContext( pD3DCurrent->gl_ctx );
+        break;
+
+    case WM_CLOSE:
+    case WM_DESTROY:
+        /* Support the API until we die... */
+        hOldProc = pD3DCurrent->hOldProc;
+        DestroyContext( pD3DCurrent );
+        return (hOldProc)(hwnd,message,wParam,lParam);
+  }
+
+  return (pD3DCurrent->hOldProc)(hwnd,message,wParam,lParam);
+}
+
+/**********************************************************************/
+/*****              Miscellaneous device driver funcs             *****/
+/**********************************************************************/
+
+/*===========================================================================*/
+/*  Not reacting to this as I'm only supporting drawing to the back buffer   */
+/* right now.                                                                */
+/*===========================================================================*/
+/* RETURN: TRUE.                                                             */
+/*===========================================================================*/
+static GLboolean SetBuffer( GLcontext *ctx, GLenum buffer )
+{
+   if (buffer == GL_BACK_LEFT)
+      return GL_TRUE;
+   else
+      return GL_FALSE;
+}
+/*===========================================================================*/
+/*  This proc will be called by Mesa when the viewport has been set.  So if  */
+/* we have a context and it isn't the default then we should let D3D know of */
+/* the change.                                                               */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void SetViewport( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+   RECT           rect;
+
+   /* Make sure we can set a viewport. */
+   if ( pContext->pShared && (pContext != pD3DDefault) )
+   {
+        // TODO: might be needed.
+     UpdateScreenPosHAL( pContext->pShared );
+       rect.left   = x;
+       rect.right  = x + w;
+       rect.top    = y;
+       rect.bottom = y + h;
+
+       // TODO: shared struct should make this call smaller
+     SetViewportHAL( pContext->pShared, &rect, 0.0F, 1.0F );
+   }
+}
+/*===========================================================================*/
+/*  This function could be better I guess but I decided just to grab the four*/
+/* components and store then seperately.  Makes it easier to use IMHO.       */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void ClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+   pContext->aClear = a;
+   pContext->bClear = b;
+   pContext->gClear = g;
+   pContext->rClear = r;
+}
+/*===========================================================================*/
+/*  This function could be better I guess but I decided just to grab the four*/
+/* components and store then seperately.  Makes it easier to use IMHO.       */
+/* (is there an echo in here?)                                               */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void SetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+   pContext->aCurrent = a;
+   pContext->bCurrent = b;
+   pContext->gCurrent = g;
+   pContext->rCurrent = r;
+}
+/*===========================================================================*/
+/*                                                                           */
+/*                                                                           */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static const char *RendererString( void )
+{
+  static char pszRender[64];
+
+  strcpy( pszRender, "altD3D " );
+
+  if ( pD3DCurrent->pShared->bHardware )
+    strcat( pszRender, "(HW)");
+  else
+    strcat( pszRender, "(SW)");
+
+  return (const char *)pszRender;
+}
+/*===========================================================================*/
+/*  This function will choose which set of pointers Mesa will use based on   */
+/* whether we hard using hardware or software.  I have added another set of  */
+/* pointers that will do nothing but stop the API from crashing.             */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void SetupDDPointers( GLcontext *ctx )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+   // TODO: write a generic NULL support for the span render. 
+   if ( pContext->pShared && pContext->pShared->bHardware )
+   {
+       ctx->Driver.UpdateState = SetupHWDDPointers;
+   }
+   else if ( pContext == pD3DDefault )
+   {
+       ctx->Driver.UpdateState = SetupNULLDDPointers;
+   }
+   else
+   {
+       ctx->Driver.UpdateState = SetupSWDDPointers;
+   }
+}
+/*===========================================================================*/
+/*  This function will populate all the Mesa driver hooks. This version of   */
+/* hooks will do nothing but support the API when we don't have a valid      */
+/* context bound.  This is mostly for applications that don't behave right   */
+/* and also to help exit as clean as possable when we have a FatalError.     */
+/*===========================================================================*/
+/* RETURN: pointer to the specific function.                                 */
+/*===========================================================================*/
+static void SetupNULLDDPointers( GLcontext *ctx )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+   /* Initialize all the pointers in the DD struct.  Do this whenever */
+   /* a new context is made current or we change buffers via set_buffer! */
+   ctx->Driver.UpdateState          = SetupNULLDDPointers;
+
+   /* State management hooks. */
+   ctx->Driver.Color                = NULLSetColor;
+   ctx->Driver.ClearColor           = NULLClearColor;
+   ctx->Driver.Clear                = NULLClearBuffers;
+   ctx->Driver.SetBuffer            = NULLSetBuffer;
+
+   /* Window management hooks. */
+   ctx->Driver.GetBufferSize        = NULLGetBufferSize;
+
+   /* Primitive rendering hooks. */
+   ctx->Driver.TriangleFunc         = NULL;
+   ctx->Driver.RenderVB             = NULL;
+
+   /* Pixel/span writing functions: */
+   ctx->Driver.WriteRGBASpan        = NULLWrSpRGBA;
+   ctx->Driver.WriteRGBSpan         = NULLWrSpRGB;
+   ctx->Driver.WriteMonoRGBASpan    = NULLWrSpRGBAMono;
+   ctx->Driver.WriteRGBAPixels      = NULLWrPiRGBA;
+   ctx->Driver.WriteMonoRGBAPixels  = NULLWrPiRGBAMono;
+
+   /* Pixel/span reading functions: */
+   ctx->Driver.ReadRGBASpan         = NULLReSpRGBA;
+   ctx->Driver.ReadRGBAPixels       = NULLRePiRGBA;
+
+   /* Misc. hooks. */
+   ctx->Driver.RendererString    = RendererString;
+}
+/*===========================================================================*/
+/*  This function will populate all the Mesa driver hooks. There are two of  */
+/* these functions.  One if we have hardware support and one is there is only*/
+/* software.  These functions will be called by Mesa and by the wgl.c when we*/
+/* have resized (or created) the buffers.  The thing is that if a window gets*/
+/* resized we may loose hardware support or gain it...                       */
+/*===========================================================================*/
+/* RETURN: pointer to the specific function.                                 */
+/*===========================================================================*/
+static void SetupSWDDPointers( GLcontext *ctx )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+   /* Initialize all the pointers in the DD struct.  Do this whenever */
+   /* a new context is made current or we change buffers via set_buffer! */
+   ctx->Driver.UpdateState          = SetupSWDDPointers;
+
+   /* State management hooks. */
+   ctx->Driver.Color                = SetColor;
+   ctx->Driver.ClearColor           = ClearColor;
+   ctx->Driver.Clear                = ClearBuffers;
+   ctx->Driver.SetBuffer            = SetBuffer;
+
+   /* Window management hooks. */
+   ctx->Driver.GetBufferSize        = GetBufferSize;
+   ctx->Driver.Viewport             = SetViewport;
+
+   /* Primitive rendering hooks. */
+   ctx->Driver.TriangleFunc         = NULL;
+   ctx->Driver.RenderVB             = NULL;
+
+   /* Texture management hooks. */
+
+   /* Pixel/span writing functions: */
+   ctx->Driver.WriteRGBASpan        = WSpanRGBA;
+   ctx->Driver.WriteRGBSpan         = WSpanRGB;
+   ctx->Driver.WriteMonoRGBASpan    = WSpanRGBAMono;
+   ctx->Driver.WriteRGBAPixels      = WPixelsRGBA;
+   ctx->Driver.WriteMonoRGBAPixels  = WPixelsRGBAMono;
+
+   /* Pixel/span reading functions: */
+   ctx->Driver.ReadRGBASpan         = RSpanRGBA;
+   ctx->Driver.ReadRGBAPixels       = RPixelsRGBA;
+
+   /* Misc. hooks. */
+   ctx->Driver.Flush                = Flush;
+   ctx->Driver.RendererString    = RendererString;
+}
+/*===========================================================================*/
+/*  This function will populate all the Mesa driver hooks. There are two of  */
+/* these functions.  One if we have hardware support and one is there is only*/
+/* software.  These functions will be called by Mesa and by the wgl.c when we*/
+/* have resized (or created) the buffers.  The thing is that if a window gets*/
+/* resized we may loose hardware support or gain it...                       */
+/*===========================================================================*/
+/* RETURN: pointer to the specific function.                                 */
+/*===========================================================================*/
+static void SetupHWDDPointers( GLcontext *ctx )
+{
+   D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+   /* Initialize all the pointers in the DD struct.  Do this whenever */
+   /* a new context is made current or we change buffers via set_buffer! */
+   ctx->Driver.UpdateState          = SetupHWDDPointers;
+
+   /* State management hooks. */
+   ctx->Driver.Color                = SetColor;
+   ctx->Driver.ClearColor           = ClearColor;
+   ctx->Driver.Clear                = ClearBuffersD3D;
+   ctx->Driver.SetBuffer            = SetBuffer;
+
+   /* Window management hooks. */
+   ctx->Driver.GetBufferSize        = GetBufferSize;
+   ctx->Driver.Viewport             = SetViewport;
+
+   /* Primitive rendering hooks. */
+   ctx->Driver.TriangleFunc         = RenderOneTriangle;
+   ctx->Driver.LineFunc                          = RenderOneLine;
+   ctx->Driver.RenderVB             = RenderVertexBuffer;
+
+   /* Pixel/span writing functions: */
+   ctx->Driver.WriteRGBASpan        = WSpanRGBA;
+   ctx->Driver.WriteRGBSpan         = WSpanRGB;
+   ctx->Driver.WriteMonoRGBASpan    = WSpanRGBAMono;
+   ctx->Driver.WriteRGBAPixels      = WPixelsRGBA;
+   ctx->Driver.WriteMonoRGBAPixels  = WPixelsRGBAMono;
+
+   /* Pixel/span reading functions: */
+   ctx->Driver.ReadRGBASpan         = RSpanRGBA;
+   ctx->Driver.ReadRGBAPixels       = RPixelsRGBA;
+
+   /* Texture management hooks. */
+   //   ctx->Driver.BindTexture          = TextureBind;
+   ctx->Driver.TexImage             = TextureLoad;
+   ctx->Driver.TexSubImage          = TextureSubImage;
+
+   /* Misc. hooks. */
+   ctx->Driver.Flush                = Flush;
+   ctx->Driver.RendererString    = RendererString;
+}
+/*===========================================================================*/
+/*  This function will release all resources used by the DLL.  Every context */
+/* will be clobbered by releaseing all driver desources and then freeing the */
+/* context memory.  Most all the work is done in DestroyContext.             */
+/*===========================================================================*/
+/* RETURN: TRUE.                                                             */
+/*===========================================================================*/
+static BOOL  TermOpenGL( HINSTANCE hInst )
+{
+  D3DMESACONTEXT *pTmp,
+                *pNext;
+
+  /* Just incase we are still getting paint msg. */
+  MakeCurrent( pD3DDefault );
+
+  /* Walk the list until we get back to the default context. */
+  for( pTmp = pD3DDefault->next; pTmp != pD3DDefault; pTmp = pNext )
+  {
+    pNext = pTmp->next;
+    DestroyContext( pTmp );
+  }
+  DestroyContext( pD3DDefault );
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  This function is an internal function that will clean up all the Mesa    */
+/* context bound to this D3D context.  Also any D3D stuff that this context  */
+/* uses will be unloaded.                                                    */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+static void DestroyContext( D3DMESACONTEXT *pContext )
+{
+  D3DMESACONTEXT        *pTmp;
+
+  /* Walk the list until we find the context before this one. */
+  for( pTmp = pD3DDefault; pTmp && (pTmp->next != pContext); pTmp = pTmp->next )
+    if ( pTmp == pTmp->next )
+        break;
+
+  /* If we never found it it must already be deleted. */
+  if ( pTmp->next != pContext )
+    return;
+
+  /* Make sure we are not using this context. */
+  if ( pContext == pD3DCurrent )
+    MakeCurrent( pD3DDefault );
+
+   /* Free the Mesa stuff. */
+   if ( pContext->gl_visual ) 
+   {
+      _mesa_destroy_visual( pContext->gl_visual );
+      pContext->gl_visual = NULL;
+   }
+   if ( pContext->gl_buffer ) 
+   {
+      _mesa_destroy_framebuffer( pContext->gl_buffer );
+      pContext->gl_buffer = NULL;
+   }
+   if ( pContext->gl_ctx )    
+   {
+      _mesa_destroy_context( pContext->gl_ctx );
+      pContext->gl_ctx = NULL;
+   }
+
+   /* Now dump the D3D. */
+   if ( pContext->pShared )
+       TermHAL( pContext->pShared );
+
+   /* Update the previous context's link. */
+   pTmp->next = pContext->next;
+
+   /* Gonzo. */
+   FREE( pContext );
+}
+/*===========================================================================*/
+/*  This function will pull the supplied context away from Win32.  Basicly it*/
+/* will remove the hook from the window Proc.                                */
+/*                                                                           */
+/* TODO: might want to serialize this stuff...                               */
+/*===========================================================================*/
+/* RETURN: TRUE, FALSE.                                                      */
+/*===========================================================================*/
+static BOOL UnBindWindow( D3DMESACONTEXT *pContext )
+{
+  if ( pContext == NULL )
+    return FALSE;
+
+  if ( pContext == pD3DDefault )
+    return TRUE;
+
+  /* Make sure we always have a context bound. */
+  if ( pContext == pD3DCurrent )
+    pD3DCurrent = pD3DDefault;
+
+  SetWindowLong( pContext->pShared->hwnd, GWL_WNDPROC, (LONG)pContext->hOldProc );
+  pContext->hOldProc   = NULL;
+
+  return TRUE;
+}
+/*===========================================================================*/
+/*  There are two cases that allow for a faster clear when we know that the  */
+/* whole buffer is cleared and that there is no clipping.                    */
+/*===========================================================================*/
+/* RETURN: the original mask with the bits cleared that represents the buffer*
+/* or buffers we just cleared.                                               */
+/*===========================================================================*/
+GLbitfield ClearBuffersD3D( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height )
+{
+  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+  DWORD          dwFlags = 0;
+
+  if ( mask & GL_COLOR_BUFFER_BIT )
+  {
+    dwFlags |= D3DCLEAR_TARGET;
+    mask &= ~GL_COLOR_BUFFER_BIT;
+  }
+  if ( mask & GL_DEPTH_BUFFER_BIT )
+  {
+    dwFlags |= D3DCLEAR_ZBUFFER;
+    mask &= ~GL_DEPTH_BUFFER_BIT;
+  }
+  if ( dwFlags == 0 )
+    return mask;
+
+  ClearHAL( pContext->pShared, 
+                 dwFlags, 
+                 all, 
+                 x, y, 
+                 width, height, 
+                 ((pContext->aClear<<24) | (pContext->rClear<<16) | (pContext->gClear<<8) | (pContext->bClear)), 
+                 ctx->Depth.Clear, 
+                 0 );
+
+  return mask;
+}
+
+
+
+/*===========================================================================*/
+/*  TEXTURE MANAGER: ok here is how I did textures.  Mesa-3.0 will keep track*/
+/* of all the textures for us.  So this means that at anytime we can go to   */
+/* the Mesa context and get the current texture.  With this in mind this is  */
+/* what I did.  I really don't care about what textures get or are loaded    */
+/* until I actually have to draw a tri that is textured.  At this point I    */
+/* must have the texture so I demand the texture by destorying all other     */
+/* texture surfaces if need be and load the current one.  This allows for the*/
+/* best preformance on low memory cards as time is not wasted loading and    */
+/* unload textures.                                                          */
+/*===========================================================================*/
+
+
+
+
+
+/*===========================================================================*/
+/*  TextureLoad will try and create a D3D surface from the supplied texture  */
+/* object if its level 0 (first).  The surface will be fully filled with the */
+/* texture.                                                                  */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void TextureLoad( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint internalFormat, const struct gl_texture_image *image )
+{
+  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+  /* TODO: only doing first LOD. */
+  if ( (ctx->DriverCtx == NULL) || (level != 0) )
+    return;
+
+  CreateTMgrHAL( pContext->pShared, 
+                         tObj->Name, 
+                         level,
+                         tObj->Image[level]->Format,
+                         (RECT *)NULL,
+                         tObj->Image[level]->Width, 
+                         tObj->Image[level]->Height,
+                         TM_ACTION_LOAD,
+                         (void *)tObj->Image[level]->Data );
+}
+/*===========================================================================*/
+/*  TextureBind make sure that the texture is on the card.  Thats it.        */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void TextureBind( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj )
+{
+  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+
+  /* TODO: only doing first LOD. */
+  if ( (tObj->Image[0] == NULL) || (ctx->DriverCtx == NULL) )
+    return;
+
+  CreateTMgrHAL( pContext->pShared, 
+                         tObj->Name, 
+                         0,
+                         tObj->Image[0]->Format,
+                         (RECT *)NULL,
+                         tObj->Image[0]->Width, 
+                         tObj->Image[0]->Height,
+                         TM_ACTION_BIND,
+                         (void *)tObj->Image[0]->Data );
+}
+/*===========================================================================*/
+/*  TextureSubImage will make sure that the texture being updated is updated */
+/* if its on the card.                                                       */
+/*===========================================================================*/
+/* RETURN:                                                                   */
+/*===========================================================================*/
+static void TextureSubImage( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLint internalFormat, const struct gl_texture_image *image )
+{
+  D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
+  RECT           rect;
+
+  /* TODO: only doing first LOD. */
+  if ( (ctx->DriverCtx == NULL) || (level > 0) )
+    return;
+
+  /* Create a dirty rectangle structure. */
+  rect.left   = xoffset;
+  rect.right  = xoffset + width;
+  rect.top    = yoffset;
+  rect.bottom = yoffset + height;
+  
+  CreateTMgrHAL( pContext->pShared, 
+                         tObj->Name, 
+                         0,
+                         tObj->Image[0]->Format, 
+                         &rect,
+                         tObj->Image[0]->Width, 
+                         tObj->Image[0]->Height,
+                         TM_ACTION_UPDATE,
+                         (void *)tObj->Image[0]->Data );
+}
+
index 6e8a5b52180184fc163df96cc4b1bca92e0b86fb..fff79c36ad628b9e38187564675746ca57287ef4 100644 (file)
@@ -1,4 +1,28 @@
-/* $XFree86: xc/lib/GL/dri/dri_util.c,v 1.7 2003/04/28 17:01:25 dawes Exp $ */
+/*
+ * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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.
+ */
+
 /**
  * \file dri_util.c
  * DRI utility functions.
index 539d28d1149a74d9d54d5aa3feb36ce1a0ec1977..027cb7f461ef6a786cd61d978e08fcb1294f9943 100644 (file)
@@ -1,25 +1,3 @@
-/* $XFree86: xc/lib/GL/dri/dri_util.h,v 1.1 2002/02/22 21:32:52 dawes Exp $ */
-/**
- * \file dri_util.h
- * DRI utility functions definitions.
- *
- * This module acts as glue between GLX and the actual hardware driver.  A DRI
- * driver doesn't really \e have to use any of this - it's optional.  But, some
- * useful stuff is done here that otherwise would have to be duplicated in most
- * drivers.
- * 
- * Basically, these utility functions take care of some of the dirty details of
- * screen initialization, context creation, context binding, DRM setup, etc.
- *
- * These functions are compiled into each DRI driver so libGL.so knows nothing
- * about them.
- *
- * \sa dri_util.c.
- * 
- * \author Kevin E. Martin <kevin@precisioninsight.com>
- * \author Brian Paul <brian@precisioninsight.com>
- */
-
 /*
  * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
  * All Rights Reserved.
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+/**
+ * \file dri_util.h
+ * DRI utility functions definitions.
+ *
+ * This module acts as glue between GLX and the actual hardware driver.  A DRI
+ * driver doesn't really \e have to use any of this - it's optional.  But, some
+ * useful stuff is done here that otherwise would have to be duplicated in most
+ * drivers.
+ * 
+ * Basically, these utility functions take care of some of the dirty details of
+ * screen initialization, context creation, context binding, DRM setup, etc.
+ *
+ * These functions are compiled into each DRI driver so libGL.so knows nothing
+ * about them.
+ *
+ * \sa dri_util.c.
+ * 
+ * \author Kevin E. Martin <kevin@precisioninsight.com>
+ * \author Brian Paul <brian@precisioninsight.com>
+ */
 
 #ifndef _DRI_UTIL_H_
 #define _DRI_UTIL_H_
index d662e0b8b58818a3d2c2a515e8d8d7afe28ab9cb..b6b3c88b1450449ebefe143e4d5ae523dee947bb 100644 (file)
@@ -1576,8 +1576,9 @@ parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst,
    if (err) {
       program_error(ctx, Program->Position, "Bad attribute binding");
    }
-
-   Program->Base.InputsRead |= (1 << *inputReg);
+   else {
+      Program->Base.InputsRead |= (1 << *inputReg);
+   }
 
    return err;
 }
index b67b620eaa5137688fdd661367d69dd45bc144af..10c131d5549819c73fda9155b0c73d93fbdfc60a 100644 (file)
@@ -227,7 +227,7 @@ find_translated_vp(struct st_context *st,
             if (fpInAttrib >= 0) {
                GLuint fpInSlot = stfp->input_to_slot[fpInAttrib];
                if (fpInSlot != ~0) {
-                  GLuint vpOutSlot = stfp->cso->state.input_map[fpInSlot];
+                  GLuint vpOutSlot = stfp->input_map[fpInSlot];
                   xvp->output_to_slot[outAttr] = vpOutSlot;
                   numVpOuts++;
                }
index 48e5348d73cbfed7ebc975e72ac31a880d8e31f3..f3124d87c013f3f549c27bf22d89975663c586ab 100644 (file)
@@ -1,5 +1,34 @@
+/**************************************************************************
+ * 
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ **************************************************************************/
 
 
+#ifndef ST_ATOM_SHADER_H
+#define ST_ATOM_SHADER_H
+
 
 extern void
 st_remove_vertex_program(struct st_context *, struct st_vertex_program *);
@@ -7,3 +36,5 @@ st_remove_vertex_program(struct st_context *, struct st_vertex_program *);
 extern void
 st_remove_fragment_program(struct st_context *, struct st_fragment_program *);
 
+
+#endif /* ST_ATOM_SHADER_H */
index 78baf772f443f0d031dc7e7788bf0d41ee1b7f92..e712fd84cd5c8dca506863ab909d49eabea95259 100644 (file)
@@ -502,37 +502,30 @@ check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
 static void
 clear_color_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
 {
-   if (!check_clear_color_with_quad( ctx, rb ))
-   {
+   if (check_clear_color_with_quad( ctx, rb )) {
+      /* masking or scissoring */
+      clear_with_quad(ctx, GL_TRUE, GL_FALSE, GL_FALSE);
+   }
+   else {
       struct st_renderbuffer *strb = st_renderbuffer(rb);
 
       /* clear whole buffer w/out masking */
-      GLuint clearValue
-         = color_value(strb->surface->format, ctx->Color.ClearColor);
+      uint clearValue = color_value(strb->surface->format, ctx->Color.ClearColor);
       ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
    }
-   else {
-      /* masking or scissoring */
-      clear_with_quad(ctx, GL_TRUE, GL_FALSE, GL_FALSE);
-   }
 }
 
 
 static void
 clear_depth_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
 {
-   struct st_renderbuffer *strb = st_renderbuffer(rb);
-   /*
-   const GLboolean isDS = is_depth_stencil_format(strb->surface->format);
-   */
-
-   assert(strb->surface->format);
-
    if (check_clear_depth_with_quad(ctx, rb)) {
       /* scissoring or we have a combined depth/stencil buffer */
       clear_with_quad(ctx, GL_FALSE, GL_TRUE, GL_FALSE);
    }
    else {
+      struct st_renderbuffer *strb = st_renderbuffer(rb);
+
       /* simple clear of whole buffer */
       uint clearValue = depth_value(strb->surface->format, ctx->Depth.Clear);
       ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
@@ -543,13 +536,13 @@ clear_depth_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
 static void
 clear_stencil_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
 {
-   struct st_renderbuffer *strb = st_renderbuffer(rb);
-
    if (check_clear_stencil_with_quad(ctx, rb)) {
       /* masking or scissoring or combined depth/stencil buffer */
       clear_with_quad(ctx, GL_FALSE, GL_FALSE, GL_TRUE);
    }
    else {
+      struct st_renderbuffer *strb = st_renderbuffer(rb);
+
       /* simple clear of whole buffer */
       GLuint clearValue = ctx->Stencil.Clear;
       ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
@@ -560,11 +553,14 @@ clear_stencil_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
 static void
 clear_depth_stencil_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
 {
-   struct st_renderbuffer *strb = st_renderbuffer(rb);
-
-   assert(is_depth_stencil_format(strb->surface->format));
 
    if (check_clear_depth_stencil_with_quad(ctx, rb)) {
+      /* masking or scissoring */
+      clear_with_quad(ctx, GL_FALSE, GL_TRUE, GL_TRUE);
+   }
+   else {
+      struct st_renderbuffer *strb = st_renderbuffer(rb);
+
       /* clear whole buffer w/out masking */
       GLuint clearValue = depth_value(strb->surface->format, ctx->Depth.Clear);
 
@@ -581,10 +577,6 @@ clear_depth_stencil_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
 
       ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
    }
-   else {
-      /* masking or scissoring */
-      clear_with_quad(ctx, GL_FALSE, GL_TRUE, GL_TRUE);
-   }
 }
 
 
index 585cae37436549055d50f1ba8487a4d0808237b1..6c0d75cc550214c13c206f30abd58ffef61869b4 100644 (file)
@@ -456,6 +456,7 @@ make_texture(struct st_context *st,
 {
    GLcontext *ctx = st->ctx;
    struct pipe_context *pipe = st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    const struct gl_texture_format *mformat;
    struct pipe_texture *pt;
    enum pipe_format pipeFormat;
@@ -493,7 +494,7 @@ make_texture(struct st_context *st,
       /* we'll do pixel transfer in a fragment shader */
       ctx->_ImageTransferState = 0x0;
 
-      surface = pipe->get_tex_surface(pipe, pt, 0, 0, 0);
+      surface = screen->get_tex_surface(screen, pt, 0, 0, 0);
 
       /* map texture surface */
       dest = pipe_surface_map(surface);
@@ -649,7 +650,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
    /* XXX if DrawPixels image is larger than max texture size, break
     * it up into chunks.
     */
-   maxSize = 1 << (pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
+   maxSize = 1 << (pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
    assert(width <= maxSize);
    assert(height <= maxSize);
 
@@ -973,7 +974,7 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
          draw_textured_quad(ctx, x, y, ctx->Current.RasterPos[2],
                             width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY,
                             pt, stvp, stfp, color, GL_FALSE);
-        st->pipe->texture_release(st->pipe, &pt);
+         pipe_texture_reference(&pt, NULL);
       }
    }
    else {
@@ -993,6 +994,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
                     const GLubyte *bitmap)
 {
    struct pipe_context *pipe = ctx->st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_surface *surface;
    uint format = 0, cpp, comp;
    ubyte *dest;
@@ -1000,12 +1002,12 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
    int row, col;
 
    /* find a texture format we know */
-   if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_I8, PIPE_TEXTURE )) {
+   if (screen->is_format_supported( screen, PIPE_FORMAT_U_I8, PIPE_TEXTURE )) {
       format = PIPE_FORMAT_U_I8;
       cpp = 1;
       comp = 0;
    }
-   else if (pipe->is_format_supported( pipe, PIPE_FORMAT_A8R8G8B8_UNORM, PIPE_TEXTURE )) {
+   else if (screen->is_format_supported( screen, PIPE_FORMAT_A8R8G8B8_UNORM, PIPE_TEXTURE )) {
       format = PIPE_FORMAT_A8R8G8B8_UNORM;
       cpp = 4;
       comp = 3; /* alpha channel */ /*XXX little-endian dependency */
@@ -1030,7 +1032,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
       printf("st_Bitmap (sourcing from PBO not implemented yet)\n");
    }
 
-   surface = pipe->get_tex_surface(pipe, pt, 0, 0, 0);
+   surface = screen->get_tex_surface(screen, pt, 0, 0, 0);
 
    /* map texture surface */
    dest = pipe_surface_map(surface);
@@ -1124,7 +1126,7 @@ st_Bitmap(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
                          pt, stvp, stfp,
                          ctx->Current.RasterColor, GL_FALSE);
 
-      st->pipe->texture_release(st->pipe, &pt);
+      pipe_texture_reference(&pt, NULL);
    }
 }
 
@@ -1206,6 +1208,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
 {
    struct st_context *st = ctx->st;
    struct pipe_context *pipe = st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct st_renderbuffer *rbRead;
    struct st_vertex_program *stvp;
    struct st_fragment_program *stfp;
@@ -1213,7 +1216,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
    struct pipe_surface *psTex;
    struct pipe_texture *pt;
    GLfloat *color;
-   uint format;
+   enum pipe_format srcFormat, texFormat;
 
    /* make sure rendering has completed */
    pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE);
@@ -1233,6 +1236,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
       stvp = st_make_passthrough_vertex_shader(ctx->st, GL_FALSE);
    }
    else {
+      assert(type == GL_DEPTH);
       rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
       color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
       stfp = make_fragment_shader_z(ctx->st);
@@ -1240,14 +1244,43 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
    }
 
    psRead = rbRead->surface;
-   format = psRead->format;
+   srcFormat = psRead->format;
 
-   pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, format, 0, width, height,
-                         1, 0);
+   if (screen->is_format_supported(screen, srcFormat, PIPE_TEXTURE)) {
+      texFormat = srcFormat;
+   }
+   else {
+      /* srcFormat can't be used as a texture format */
+      if (type == GL_DEPTH) {
+         static const enum pipe_format zFormats[] = {
+            PIPE_FORMAT_Z16_UNORM,
+            PIPE_FORMAT_Z32_UNORM,
+            PIPE_FORMAT_S8Z24_UNORM,
+            PIPE_FORMAT_Z24S8_UNORM
+         };
+         uint i;
+         texFormat = 0;
+         for (i = 0; i < Elements(zFormats); i++) {
+            if (screen->is_format_supported(screen, zFormats[i],
+                                            PIPE_TEXTURE)) {
+               texFormat = zFormats[i];
+               break;
+            }
+         }
+         assert(texFormat); /* XXX no depth texture formats??? */
+      }
+      else {
+         /* todo */
+         assert(0);
+      }
+   }
+
+   pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, texFormat, 0,
+                          width, height, 1, 0);
    if (!pt)
       return;
 
-   psTex = pipe->get_tex_surface(pipe, pt, 0, 0, 0);
+   psTex = screen->get_tex_surface(screen, pt, 0, 0, 0);
 
    if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
       srcy = ctx->DrawBuffer->Height - srcy - height;
@@ -1257,7 +1290,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
     * front/back color buffers as surfaces (they're XImages and Pixmaps).
     * So, this var tells us if we can use surface_copy here...
     */
-   if (st->haveFramebufferSurfaces) {
+   if (st->haveFramebufferSurfaces && srcFormat == texFormat) {
       /* copy source framebuffer surface into mipmap/texture */
       pipe->surface_copy(pipe,
                          FALSE,
@@ -1282,7 +1315,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
                       pt, stvp, stfp, color, GL_TRUE);
 
    pipe_surface_reference(&psTex, NULL);
-   st->pipe->texture_release(st->pipe, &pt);
+   pipe_texture_reference(&pt, NULL);
 }
 
 
index 781425b54692da93af5734e849f6099b6c0a775b..5384252a8e511dcf57fcbec24649754741ed747a 100644 (file)
@@ -307,6 +307,7 @@ st_render_texture(GLcontext *ctx,
    struct st_renderbuffer *strb;
    struct gl_renderbuffer *rb;
    struct pipe_context *pipe = st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_texture *pt;
 
    assert(!att->Renderbuffer);
@@ -332,10 +333,10 @@ st_render_texture(GLcontext *ctx,
    rb->Height = pt->height[att->TextureLevel];
 
    /* the renderbuffer's surface is inside the texture */
-   strb->surface = pipe->get_tex_surface(pipe, pt,
-                                         att->CubeMapFace,
-                                         att->TextureLevel,
-                                         att->Zoffset);
+   strb->surface = screen->get_tex_surface(screen, pt,
+                                           att->CubeMapFace,
+                                           att->TextureLevel,
+                                           att->Zoffset);
    assert(strb->surface);
 
    init_renderbuffer_bits(strb, pt->format);
index 38ec4e0a5933de525f805a293a8f02e59285da22..45dc753dffe320ea035280034ea3b089743a5f9c 100644 (file)
@@ -1,3 +1,29 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
 
 #ifndef ST_CB_PROGRAM_H
 #define ST_CB_PROGRAM_H
index 5b0eb6022beb661640de4cfa2678c3750dc9876f..2ed228778e06479893e17a6bf530b18c6e0cee62 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "main/imports.h"
 #include "main/macros.h"
+#include "main/feedback.h"
 
 #include "st_context.h"
 #include "st_atom.h"
@@ -145,7 +146,7 @@ rastpos_point(struct draw_stage *stage, struct prim_header *prim)
    /* update raster pos */
    pos = prim->v[0]->data[0];
    ctx->Current.RasterPos[0] = pos[0];
-   ctx->Current.RasterPos[1] = height - 1 - pos[1];
+   ctx->Current.RasterPos[1] = height - pos[1]; /* invert Y */
    ctx->Current.RasterPos[2] = pos[2];
    ctx->Current.RasterPos[3] = pos[3];
 
@@ -163,6 +164,10 @@ rastpos_point(struct draw_stage *stage, struct prim_header *prim)
                     ctx->Current.RasterTexCoords[i],
                     VERT_RESULT_TEX0 + i, VERT_ATTRIB_TEX0 + i);
    }
+
+   if (ctx->RenderMode == GL_SELECT) {
+      _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] );
+   }
 }
 
 
index c344df0ff1e21384282f78e5ba8381dc4f389242..247519ab3de7adc27d3844de61399cc0fd5aebce 100644 (file)
@@ -35,6 +35,7 @@
 #include "main/macros.h"
 #include "main/version.h"
 #include "pipe/p_context.h"
+#include "pipe/p_screen.h"
 #include "pipe/p_winsys.h"
 #include "st_context.h"
 #include "st_cb_strings.h"
@@ -45,11 +46,11 @@ static const GLubyte *
 st_get_string(GLcontext * ctx, GLenum name)
 {
    struct st_context *st = st_context(ctx);
-   struct pipe_context *pipe = st->pipe;
+   struct pipe_screen *screen = st->pipe->screen;
 
    switch (name) {
    case GL_VENDOR: {
-      const char *vendor = pipe->get_vendor( pipe );
+      const char *vendor = screen->get_vendor( screen );
       const char *tungsten = "Tungsten Graphics, Inc.";
 
       /* Tungsten developed the state_tracker module (and much of
@@ -68,8 +69,8 @@ st_get_string(GLcontext * ctx, GLenum name)
    case GL_RENDERER:
       snprintf(st->renderer, sizeof(st->renderer), "Gallium %s, %s on %s", 
                ST_VERSION_STRING,
-              pipe->get_name( pipe ),
-              pipe->winsys->get_name( pipe->winsys ));
+              screen->get_name( screen ),
+              screen->winsys->get_name( screen->winsys ));
 
       return (GLubyte *) st->renderer;
 
index 778fb536bc74fdbf9f97d400f796ea201846d4e3..1ba31733120c447e5c76ed7602ecd0d5db1ecf70 100644 (file)
@@ -144,12 +144,11 @@ st_NewTextureObject(GLcontext * ctx, GLuint name, GLenum target)
 
 static void 
 st_DeleteTextureObject(GLcontext *ctx,
-                        struct gl_texture_object *texObj)
+                       struct gl_texture_object *texObj)
 {
    struct st_texture_object *stObj = st_texture_object(texObj);
-
    if (stObj->pt)
-      ctx->st->pipe->texture_release(ctx->st->pipe, &stObj->pt);
+      pipe_texture_release(&stObj->pt);
 
    _mesa_delete_texture_object(ctx, texObj);
 }
@@ -163,7 +162,7 @@ st_FreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
    DBG("%s\n", __FUNCTION__);
 
    if (stImage->pt) {
-      ctx->st->pipe->texture_release(ctx->st->pipe, &stImage->pt);
+      pipe_texture_release(&stImage->pt);
    }
 
    if (texImage->Data) {
@@ -537,7 +536,7 @@ st_TexImage(GLcontext * ctx,
     * Release any old malloced memory.
     */
    if (stImage->pt) {
-      ctx->st->pipe->texture_release(ctx->st->pipe, &stImage->pt);
+      pipe_texture_release(&stImage->pt);
       assert(!texImage->Data);
    }
    else if (texImage->Data) {
@@ -556,7 +555,7 @@ st_TexImage(GLcontext * ctx,
                                   stImage->face, stImage->level)) {
 
       DBG("release it\n");
-      ctx->st->pipe->texture_release(ctx->st->pipe, &stObj->pt);
+      pipe_texture_release(&stObj->pt);
       assert(!stObj->pt);
    }
 
@@ -573,7 +572,7 @@ st_TexImage(GLcontext * ctx,
        st_texture_match_image(stObj->pt, &stImage->base,
                                  stImage->face, stImage->level)) {
 
-      pipe_texture_reference(ctx->st->pipe, &stImage->pt, stObj->pt);
+      pipe_texture_reference(&stImage->pt, stObj->pt);
       assert(stImage->pt);
    }
 
@@ -1025,6 +1024,7 @@ fallback_copy_texsubimage(GLcontext *ctx,
                           GLsizei width, GLsizei height)
 {
    struct pipe_context *pipe = ctx->st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    const uint face = texture_face(target);
    struct pipe_texture *pt = stImage->pt;
    struct pipe_surface *src_surf, *dest_surf;
@@ -1042,8 +1042,7 @@ fallback_copy_texsubimage(GLcontext *ctx,
 
    src_surf = strb->surface;
 
-   dest_surf = pipe->get_tex_surface(pipe, pt,
-                                    face, level, destZ);
+   dest_surf = screen->get_tex_surface(screen, pt, face, level, destZ);
 
    /* buffer for one row */
    data = (GLfloat *) malloc(width * 4 * sizeof(GLfloat));
@@ -1096,6 +1095,7 @@ do_copy_texsubimage(GLcontext *ctx,
    struct gl_framebuffer *fb = ctx->ReadBuffer;
    struct st_renderbuffer *strb;
    struct pipe_context *pipe = ctx->st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_surface *dest_surface;
    uint dest_format, src_format;
    uint do_flip = FALSE;
@@ -1126,8 +1126,8 @@ do_copy_texsubimage(GLcontext *ctx,
    src_format = strb->surface->format;
    dest_format = stImage->pt->format;
 
-   dest_surface = pipe->get_tex_surface(pipe, stImage->pt, stImage->face,
-                                       stImage->level, destZ);
+   dest_surface = screen->get_tex_surface(screen, stImage->pt, stImage->face,
+                                          stImage->level, destZ);
 
    if (src_format == dest_format &&
        ctx->_ImageTransferState == 0x0 &&
@@ -1352,7 +1352,7 @@ copy_image_data_to_texture(struct st_context *st,
                             stImage->face
                             );
 
-      st->pipe->texture_release(st->pipe, &stImage->pt);
+      pipe_texture_release(&stImage->pt);
    }
    else {
       assert(stImage->base.Data != NULL);
@@ -1371,7 +1371,7 @@ copy_image_data_to_texture(struct st_context *st,
       stImage->base.Data = NULL;
    }
 
-   pipe_texture_reference(st->pipe, &stImage->pt, stObj->pt);
+   pipe_texture_reference(&stImage->pt, stObj->pt);
 }
 
 
@@ -1408,7 +1408,7 @@ st_finalize_texture(GLcontext *ctx,
     */
    if (firstImage->base.Border) {
       if (stObj->pt) {
-         ctx->st->pipe->texture_release(ctx->st->pipe, &stObj->pt);
+         pipe_texture_release(&stObj->pt);
       }
       return GL_FALSE;
    }
@@ -1424,9 +1424,9 @@ st_finalize_texture(GLcontext *ctx,
        firstImage->pt->last_level >= stObj->lastLevel) {
 
       if (stObj->pt)
-         ctx->st->pipe->texture_release(ctx->st->pipe, &stObj->pt);
+         pipe_texture_release(&stObj->pt);
 
-      pipe_texture_reference(ctx->st->pipe, &stObj->pt, firstImage->pt);
+      pipe_texture_reference(&stObj->pt, firstImage->pt);
    }
 
    if (firstImage->base.IsCompressed) {
@@ -1450,7 +1450,7 @@ st_finalize_texture(GLcontext *ctx,
        stObj->pt->depth[0] != firstImage->base.Depth ||
        stObj->pt->cpp != cpp ||
        stObj->pt->compressed != firstImage->base.IsCompressed)) {
-      ctx->st->pipe->texture_release(ctx->st->pipe, &stObj->pt);
+      pipe_texture_release(&stObj->pt);
    }
 
 
index 97d28d77c4b0407588910f62ac5a76529de61748..99d2a5fb9e92aa73896fafbef7da0d1101e0f6db 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
+#include "pipe/p_screen.h"
 
 #include "st_context.h"
 #include "st_extensions.h"
@@ -64,19 +65,19 @@ static int clamp(int a, int min, int max)
  */
 void st_init_limits(struct st_context *st)
 {
-   struct pipe_context *pipe = st->pipe;
+   struct pipe_screen *screen = st->pipe->screen;
    struct gl_constants *c = &st->ctx->Const;
 
    c->MaxTextureLevels
-      = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
+      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
             MAX_TEXTURE_LEVELS);
 
    c->Max3DTextureLevels
-      = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
+      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
             MAX_3D_TEXTURE_LEVELS);
 
    c->MaxCubeTextureLevels
-      = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
+      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
             MAX_CUBE_TEXTURE_LEVELS);
 
    c->MaxTextureRectSize
@@ -84,31 +85,31 @@ void st_init_limits(struct st_context *st)
 
    c->MaxTextureImageUnits
       = c->MaxTextureCoordUnits
-      = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
+      = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
             MAX_TEXTURE_IMAGE_UNITS);
 
    c->MaxDrawBuffers
-      = clamp(pipe->get_param(pipe, PIPE_CAP_MAX_RENDER_TARGETS),
+      = clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
               1, MAX_DRAW_BUFFERS);
 
    c->MaxLineWidth
-      = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_LINE_WIDTH));
+      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH));
    c->MaxLineWidthAA
-      = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_LINE_WIDTH_AA));
+      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH_AA));
 
    c->MaxPointSize
-      = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_POINT_WIDTH));
+      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH));
    c->MaxPointSizeAA
-      = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_POINT_WIDTH_AA));
+      = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH_AA));
 
    c->MaxTextureMaxAnisotropy
-      = max(2.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_TEXTURE_ANISOTROPY));
+      = max(2.0, screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_ANISOTROPY));
 
    c->MaxTextureLodBias
-      = pipe->get_paramf(pipe, PIPE_CAP_MAX_TEXTURE_LOD_BIAS);
+      = screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_LOD_BIAS);
 
    st->bitmap_texcoord_bias
-      = pipe->get_paramf(pipe, PIPE_CAP_BITMAP_TEXCOORD_BIAS);
+      = screen->get_paramf(screen, PIPE_CAP_BITMAP_TEXCOORD_BIAS);
 }
 
 
@@ -117,7 +118,7 @@ void st_init_limits(struct st_context *st)
  */
 void st_init_extensions(struct st_context *st)
 {
-   struct pipe_context *pipe = st->pipe;
+   struct pipe_screen *screen = st->pipe->screen;
    GLcontext *ctx = st->ctx;
 
    /*
@@ -163,11 +164,11 @@ void st_init_extensions(struct st_context *st)
    /*
     * Extensions that depend on the driver/hardware:
     */
-   if (pipe->get_param(pipe, PIPE_CAP_MAX_RENDER_TARGETS) > 0) {
+   if (screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS) > 0) {
       ctx->Extensions.ARB_draw_buffers = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_GLSL)) {
+   if (screen->get_param(screen, PIPE_CAP_GLSL)) {
       ctx->Extensions.ARB_fragment_shader = GL_TRUE;
       ctx->Extensions.ARB_vertex_shader = GL_TRUE;
       ctx->Extensions.ARB_shader_objects = GL_TRUE;
@@ -175,37 +176,37 @@ void st_init_extensions(struct st_context *st)
       ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_NPOT_TEXTURES)) {
+   if (screen->get_param(screen, PIPE_CAP_NPOT_TEXTURES)) {
       ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
       ctx->Extensions.NV_texture_rectangle = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS) > 1) {
+   if (screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS) > 1) {
       ctx->Extensions.ARB_multitexture = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_TWO_SIDED_STENCIL)) {
+   if (screen->get_param(screen, PIPE_CAP_TWO_SIDED_STENCIL)) {
       ctx->Extensions.ATI_separate_stencil = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_S3TC)) {
+   if (screen->get_param(screen, PIPE_CAP_S3TC)) {
       ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_ANISOTROPIC_FILTER)) {
+   if (screen->get_param(screen, PIPE_CAP_ANISOTROPIC_FILTER)) {
       ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_POINT_SPRITE)) {
+   if (screen->get_param(screen, PIPE_CAP_POINT_SPRITE)) {
       ctx->Extensions.ARB_point_sprite = GL_TRUE;
       ctx->Extensions.NV_point_sprite = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_OCCLUSION_QUERY)) {
+   if (screen->get_param(screen, PIPE_CAP_OCCLUSION_QUERY)) {
       ctx->Extensions.ARB_occlusion_query = GL_TRUE;
    }
 
-   if (pipe->get_param(pipe, PIPE_CAP_TEXTURE_SHADOW_MAP)) {
+   if (screen->get_param(screen, PIPE_CAP_TEXTURE_SHADOW_MAP)) {
       ctx->Extensions.ARB_depth_texture = GL_TRUE;
       ctx->Extensions.ARB_shadow = GL_TRUE;
       ctx->Extensions.EXT_shadow_funcs = GL_TRUE;
index 2a23445ca2be431c1ac8273fb373827efcda4763..9aeda65a5c8cc36d0f59ad3fe5e60388dd3ae203 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
+#include "pipe/p_screen.h"
 #include "st_context.h"
 #include "st_format.h"
 
@@ -288,9 +289,10 @@ default_rgba_format(struct pipe_context *pipe, uint type)
       PIPE_FORMAT_R8G8B8A8_UNORM,
       PIPE_FORMAT_R5G6B5_UNORM
    };
+   struct pipe_screen *screen = pipe->screen;
    uint i;
    for (i = 0; i < Elements(colorFormats); i++) {
-      if (pipe->is_format_supported( pipe, colorFormats[i], type )) {
+      if (screen->is_format_supported( screen, colorFormats[i], type )) {
          return colorFormats[i];
       }
    }
@@ -304,7 +306,8 @@ default_rgba_format(struct pipe_context *pipe, uint type)
 static GLuint
 default_deep_rgba_format(struct pipe_context *pipe, uint type)
 {
-   if (pipe->is_format_supported(pipe, PIPE_FORMAT_R16G16B16A16_SNORM, type)) {
+   struct pipe_screen *screen = pipe->screen;
+   if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SNORM, type)) {
       return PIPE_FORMAT_R16G16B16A16_SNORM;
    }
    return PIPE_FORMAT_NONE;
@@ -323,9 +326,10 @@ default_depth_format(struct pipe_context *pipe, uint type)
       PIPE_FORMAT_S8Z24_UNORM,
       PIPE_FORMAT_Z24S8_UNORM
    };
+   struct pipe_screen *screen = pipe->screen;
    uint i;
    for (i = 0; i < Elements(zFormats); i++) {
-      if (pipe->is_format_supported( pipe, zFormats[i], type )) {
+      if (screen->is_format_supported( screen, zFormats[i], type )) {
          return zFormats[i];
       }
    }
@@ -341,6 +345,7 @@ default_depth_format(struct pipe_context *pipe, uint type)
 enum pipe_format
 st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
 {
+   struct pipe_screen *screen = pipe->screen;
    uint surfType = PIPE_SURFACE;
 
    switch (internalFormat) {
@@ -359,12 +364,12 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
 
    case GL_RGBA4:
    case GL_RGBA2:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_A4R4G4B4_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_A4R4G4B4_UNORM, surfType ))
          return PIPE_FORMAT_A4R4G4B4_UNORM;
       return default_rgba_format( pipe, surfType );
 
    case GL_RGB5_A1:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_A1R5G5B5_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_A1R5G5B5_UNORM, surfType ))
          return PIPE_FORMAT_A1R5G5B5_UNORM;
       return default_rgba_format( pipe, surfType );
 
@@ -377,9 +382,9 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
    case GL_RGB5:
    case GL_RGB4:
    case GL_R3_G3_B2:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_A1R5G5B5_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_A1R5G5B5_UNORM, surfType ))
          return PIPE_FORMAT_A1R5G5B5_UNORM;
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_R5G6B5_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_R5G6B5_UNORM, surfType ))
          return PIPE_FORMAT_R5G6B5_UNORM;
       return default_rgba_format( pipe, surfType );
 
@@ -389,7 +394,7 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
    case GL_ALPHA12:
    case GL_ALPHA16:
    case GL_COMPRESSED_ALPHA:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_A8, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_U_A8, surfType ))
          return PIPE_FORMAT_U_A8;
       return default_rgba_format( pipe, surfType );
 
@@ -400,7 +405,7 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
    case GL_LUMINANCE12:
    case GL_LUMINANCE16:
    case GL_COMPRESSED_LUMINANCE:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_L8, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_U_L8, surfType ))
          return PIPE_FORMAT_U_A8;
       return default_rgba_format( pipe, surfType );
 
@@ -413,7 +418,7 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
    case GL_LUMINANCE12_ALPHA12:
    case GL_LUMINANCE16_ALPHA16:
    case GL_COMPRESSED_LUMINANCE_ALPHA:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_A8_L8, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_U_A8_L8, surfType ))
          return PIPE_FORMAT_U_A8_L8;
       return default_rgba_format( pipe, surfType );
 
@@ -423,7 +428,7 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
    case GL_INTENSITY12:
    case GL_INTENSITY16:
    case GL_COMPRESSED_INTENSITY:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_I8, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_U_I8, surfType ))
          return PIPE_FORMAT_U_I8;
       return default_rgba_format( pipe, surfType );
 
@@ -454,17 +459,17 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
 #endif
 
    case GL_DEPTH_COMPONENT16:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z16_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z16_UNORM, surfType ))
          return PIPE_FORMAT_Z16_UNORM;
       /* fall-through */
    case GL_DEPTH_COMPONENT24:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_S8Z24_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, surfType ))
          return PIPE_FORMAT_S8Z24_UNORM;
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z24S8_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, surfType ))
          return PIPE_FORMAT_Z24S8_UNORM;
       /* fall-through */
    case GL_DEPTH_COMPONENT32:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z32_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z32_UNORM, surfType ))
          return PIPE_FORMAT_Z32_UNORM;
       /* fall-through */
    case GL_DEPTH_COMPONENT:
@@ -475,19 +480,19 @@ st_choose_renderbuffer_format(struct pipe_context *pipe, GLint internalFormat)
    case GL_STENCIL_INDEX4_EXT:
    case GL_STENCIL_INDEX8_EXT:
    case GL_STENCIL_INDEX16_EXT:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_S8, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_U_S8, surfType ))
          return PIPE_FORMAT_U_S8;
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_S8Z24_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, surfType ))
          return PIPE_FORMAT_S8Z24_UNORM;
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z24S8_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, surfType ))
          return PIPE_FORMAT_Z24S8_UNORM;
       return PIPE_FORMAT_NONE;
 
    case GL_DEPTH_STENCIL_EXT:
    case GL_DEPTH24_STENCIL8_EXT:
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_S8Z24_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, surfType ))
          return PIPE_FORMAT_S8Z24_UNORM;
-      if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z24S8_UNORM, surfType ))
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, surfType ))
          return PIPE_FORMAT_Z24S8_UNORM;
       return PIPE_FORMAT_NONE;
 
index bca3fa5c3833a8ffa9d4f68623f26645e718a9a6..d46a9178b19bc95c8f854ec69af00971619036fb 100644 (file)
 
 
 #include "main/imports.h"
+#include "main/buffers.h"
 #include "main/context.h"
 #include "main/framebuffer.h"
+#include "main/matrix.h"
 #include "main/renderbuffer.h"
 #include "st_public.h"
 #include "st_context.h"
@@ -124,6 +126,17 @@ void st_resize_framebuffer( struct st_framebuffer *stfb,
    if (stfb->Base.Width != width || stfb->Base.Height != height) {
       GET_CURRENT_CONTEXT(ctx);
       if (ctx) {
+         if (stfb->InitWidth == 0 && stfb->InitHeight == 0) {
+            /* didn't have a valid size until now */
+            stfb->InitWidth = width;
+            stfb->InitHeight = height;
+            if (ctx->Viewport.Width <= 1) {
+               /* set context's initial viewport/scissor size */
+               _mesa_set_viewport(ctx, 0, 0, width, height);
+               _mesa_set_scissor(ctx, 0, 0, width, height);
+            }
+         }
+
          _mesa_resize_framebuffer(ctx, &stfb->Base, width, height);
 
          assert(stfb->Base.Width == width);
index c9765b20036ac993abd99fbdabce05d643ed2940..243dc0b1d083ecb7827030f1e356bce0b4e71bcc 100644 (file)
@@ -227,6 +227,7 @@ st_render_mipmap(struct st_context *st,
                  uint baseLevel, uint lastLevel)
 {
    struct pipe_context *pipe = st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_framebuffer_state fb;
    struct pipe_sampler_state sampler;
    void *sampler_cso;
@@ -237,7 +238,7 @@ st_render_mipmap(struct st_context *st,
    assert(target != GL_TEXTURE_3D); /* not done yet */
 
    /* check if we can render in the texture's format */
-   if (!pipe->is_format_supported(pipe, pt->format, PIPE_SURFACE)) {
+   if (!screen->is_format_supported(screen, pt->format, PIPE_SURFACE)) {
       return FALSE;
    }
 
@@ -275,7 +276,7 @@ st_render_mipmap(struct st_context *st,
       /*
        * Setup framebuffer / dest surface
        */
-      fb.cbufs[0] = pipe->get_tex_surface(pipe, pt, face, dstLevel, zslice);
+      fb.cbufs[0] = screen->get_tex_surface(screen, pt, face, dstLevel, zslice);
       pipe->set_framebuffer_state(pipe, &fb);
 
       /*
@@ -324,6 +325,7 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
                          struct gl_texture_object *texObj)
 {
    struct pipe_context *pipe = ctx->st->pipe;
+   struct pipe_screen *screen = pipe->screen;
    struct pipe_winsys *ws = pipe->winsys;
    struct pipe_texture *pt = st_get_texobj_texture(texObj);
    const uint baseLevel = texObj->BaseLevel;
@@ -344,8 +346,8 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
       const ubyte *srcData;
       ubyte *dstData;
 
-      srcSurf = pipe->get_tex_surface(pipe, pt, face, srcLevel, zslice);
-      dstSurf = pipe->get_tex_surface(pipe, pt, face, dstLevel, zslice);
+      srcSurf = screen->get_tex_surface(screen, pt, face, srcLevel, zslice);
+      dstSurf = screen->get_tex_surface(screen, pt, face, dstLevel, zslice);
 
       srcData = (ubyte *) ws->buffer_map(ws, srcSurf->buffer,
                                          PIPE_BUFFER_USAGE_CPU_READ)
index 4cd4b96a5894f7da125dba365200021b979dcde1..3ababf13397a190384dea90a437a833dd6af2065 100644 (file)
@@ -1,64 +1,64 @@
-/**************************************************************************\r
- * \r
- * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.\r
- * All Rights Reserved.\r
- * \r
- * Permission is hereby granted, free of charge, to any person obtaining a\r
- * copy of this software and associated documentation files (the\r
- * "Software"), to deal in the Software without restriction, including\r
- * without limitation the rights to use, copy, modify, merge, publish,\r
- * distribute, sub license, and/or sell copies of the Software, and to\r
- * permit persons to whom the Software is furnished to do so, subject to\r
- * the following conditions:\r
- * \r
- * The above copyright notice and this permission notice (including the\r
- * next paragraph) shall be included in all copies or substantial portions\r
- * of the Software.\r
- * \r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\r
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- * \r
- **************************************************************************/\r
-\r
-\r
-#ifndef ST_MESA_TO_TGSI_H\r
-#define ST_MESA_TO_TGSI_H\r
-\r
-#include "mtypes.h"\r
-\r
-\r
-#if defined __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-struct tgsi_token;\r
-struct gl_program;\r
-\r
-GLboolean\r
-tgsi_translate_mesa_program(\r
-   uint procType,\r
-   const struct gl_program *program,\r
-   GLuint numInputs,\r
-   const GLuint inputMapping[],\r
-   const ubyte inputSemanticName[],\r
-   const ubyte inputSemanticIndex[],\r
-   const GLuint interpMode[],\r
-   GLuint numOutputs,\r
-   const GLuint outputMapping[],\r
-   const ubyte outputSemanticName[],\r
-   const ubyte outputSemanticIndex[],\r
-   struct tgsi_token *tokens,\r
-   GLuint maxTokens );\r
-\r
-\r
-#if defined __cplusplus\r
-} /* extern "C" */\r
-#endif\r
-\r
-#endif /* ST_MESA_TO_TGSI_H */\r
-\r
+/**************************************************************************
+ * 
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * 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, sub license, 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 (including the
+ * next paragraph) 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ **************************************************************************/
+
+
+#ifndef ST_MESA_TO_TGSI_H
+#define ST_MESA_TO_TGSI_H
+
+#include "mtypes.h"
+
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+struct tgsi_token;
+struct gl_program;
+
+GLboolean
+tgsi_translate_mesa_program(
+   uint procType,
+   const struct gl_program *program,
+   GLuint numInputs,
+   const GLuint inputMapping[],
+   const ubyte inputSemanticName[],
+   const ubyte inputSemanticIndex[],
+   const GLuint interpMode[],
+   GLuint numOutputs,
+   const GLuint outputMapping[],
+   const ubyte outputSemanticName[],
+   const ubyte outputSemanticIndex[],
+   struct tgsi_token *tokens,
+   GLuint maxTokens );
+
+
+#if defined __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* ST_MESA_TO_TGSI_H */
+
index dc992ee9c24ffcc4b543b09a2d262a1a44339404..aa252c845ad94438b66f56128244af48b466ce1d 100644 (file)
@@ -311,7 +311,7 @@ st_translate_fragment_program(struct st_context *st,
 
          defaultInputMapping[attr] = slot;
 
-         fs.input_map[slot] = vslot++;
+         stfp->input_map[slot] = vslot++;
 
          fs.num_inputs++;
 
index 25cf3e94a8f3a585f01b7e191d7ffafe170351c6..31558af6cedcd016013819f13c29af296d9b5ce3 100644 (file)
@@ -57,6 +57,9 @@ struct st_fragment_program
    GLuint input_to_slot[FRAG_ATTRIB_MAX];  /**< Maps FRAG_ATTRIB_x to slot */
    GLuint num_input_slots;
 
+   /** map FP input back to VP output */
+   GLuint input_map[PIPE_MAX_SHADER_INPUTS];
+
    /** The program in TGSI format */
    struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];
 
index ad284170e44593c022fb2ab229f9f0eefc20d269..cbc6f849982978f883c01b0513129a6be4fc611f 100644 (file)
@@ -77,6 +77,7 @@ st_texture_create(struct st_context *st,
                  GLuint compress_byte)
 {
    struct pipe_texture pt, *newtex;
+   struct pipe_screen *screen = st->pipe->screen;
 
    assert(target <= PIPE_TEXTURE_CUBE);
 
@@ -85,6 +86,7 @@ st_texture_create(struct st_context *st,
        _mesa_lookup_enum_by_nr(format), last_level);
 
    assert(format);
+   assert(screen->is_format_supported(screen, format, PIPE_TEXTURE));
 
    memset(&pt, 0, sizeof(pt));
    pt.target = target;
@@ -96,7 +98,7 @@ st_texture_create(struct st_context *st,
    pt.compressed = compress_byte ? 1 : 0;
    pt.cpp = pt.compressed ? compress_byte : st_sizeof_format(format);
 
-   newtex = st->pipe->texture_create(st->pipe, &pt);
+   newtex = screen->texture_create(screen, &pt);
 
    assert(!newtex || newtex->refcount == 1);
 
@@ -183,11 +185,12 @@ GLubyte *
 st_texture_image_map(struct st_context *st, struct st_texture_image *stImage,
                     GLuint zoffset)
 {
+   struct pipe_screen *screen = st->pipe->screen;
    struct pipe_texture *pt = stImage->pt;
    DBG("%s \n", __FUNCTION__);
 
-   stImage->surface = st->pipe->get_tex_surface(st->pipe, pt, stImage->face,
-                                               stImage->level, zoffset);
+   stImage->surface = screen->get_tex_surface(screen, pt, stImage->face,
+                                              stImage->level, zoffset);
 
    return pipe_surface_map(stImage->surface);
 }
@@ -239,6 +242,7 @@ st_texture_image_data(struct pipe_context *pipe,
                       void *src,
                       GLuint src_row_pitch, GLuint src_image_pitch)
 {
+   struct pipe_screen *screen = pipe->screen;
    GLuint depth = dst->depth[level];
    GLuint i;
    GLuint height = 0;
@@ -251,7 +255,7 @@ st_texture_image_data(struct pipe_context *pipe,
       if(dst->compressed)
         height /= 4;
 
-      dst_surface = pipe->get_tex_surface(pipe, dst, face, level, i);
+      dst_surface = screen->get_tex_surface(screen, dst, face, level, i);
 
       st_surface_data(pipe, dst_surface,
                      0, 0,                             /* dstx, dsty */
@@ -275,6 +279,7 @@ st_texture_image_copy(struct pipe_context *pipe,
                       struct pipe_texture *src,
                       GLuint face)
 {
+   struct pipe_screen *screen = pipe->screen;
    GLuint width = dst->width[dstLevel];
    GLuint height = dst->height[dstLevel];
    GLuint depth = dst->depth[dstLevel];
@@ -299,8 +304,8 @@ st_texture_image_copy(struct pipe_context *pipe,
       assert(src->width[srcLevel] == width);
       assert(src->height[srcLevel] == height);
 
-      dst_surface = pipe->get_tex_surface(pipe, dst, face, dstLevel, i);
-      src_surface = pipe->get_tex_surface(pipe, src, face, srcLevel, i);
+      dst_surface = screen->get_tex_surface(screen, dst, face, dstLevel, i);
+      src_surface = screen->get_tex_surface(screen, src, face, srcLevel, i);
 
       pipe->surface_copy(pipe,
                          FALSE,
index 3dcf9027e5cadc3f4413b646abfd549b1b8c10ec..845cf90a9a45b62cca713f20112571e8f8baca78 100644 (file)
--- a/winddk.py
+++ b/winddk.py
@@ -1,6 +1,8 @@
-"""engine.SCons.Tool.msvc
+"""winddk
 
-Tool-specific initialization for Microsoft Visual C/C++.
+Tool-specific initialization for Microsoft Windows DDK.
+
+Based on engine.SCons.Tool.msvc.
 
 There normally shouldn't be any need to import this module directly.
 It will usually be imported through the generic SCons.Tool.Tool()
@@ -9,7 +11,8 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The SCons Foundation
+# Copyright (c) 2001-2007 The SCons Foundation
+# Copyright (c) 2008 Tungsten Graphics, Inc.
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,8 +34,6 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/msvc.py 2523 2007/12/12 09:37:41 knight"
-
 import os.path
 import re
 import string