From c98a55ab11d3a3c2a4fb9f3070319ec23a048409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Mon, 8 Feb 2016 15:53:16 +0100 Subject: [PATCH] merge ttk branch to master --- CMakeLists.txt | 158 +- cmake_modules/netgen_fixup.cmake | 49 + libsrc/csg/CMakeLists.txt | 4 +- libsrc/geom2d/CMakeLists.txt | 4 +- libsrc/interface/CMakeLists.txt | 2 +- libsrc/meshing/CMakeLists.txt | 2 +- libsrc/meshing/meshclass.cpp | 4 +- libsrc/occ/CMakeLists.txt | 2 +- libsrc/stlgeom/CMakeLists.txt | 4 +- libsrc/visualization/CMakeLists.txt | 2 +- ng/CMakeLists.txt | 13 +- ng/Togl2.1/CMakeLists.txt | 17 + ng/Togl2.1/GL_unused/glext.h | 8459 +++++++++++++++++++++ ng/Togl2.1/GL_unused/glxext.h | 833 +++ ng/Togl2.1/GL_unused/wglext.h | 776 ++ ng/Togl2.1/LICENSE | 28 + ng/Togl2.1/Makefile.in | 572 ++ ng/Togl2.1/README.bin | 73 + ng/Togl2.1/README.stubs | 21 + ng/Togl2.1/Togl.py | 129 + ng/Togl2.1/Xmu/CmapAlloc.c | 335 + ng/Togl2.1/Xmu/CrCmap.c | 523 ++ ng/Togl2.1/Xmu/DelCmap.c | 67 + ng/Togl2.1/Xmu/LookupCmap.c | 311 + ng/Togl2.1/Xmu/README.togl | 3 + ng/Togl2.1/Xmu/StdCmap.c | 219 + ng/Togl2.1/Xmu/StdCmap.h | 112 + ng/Togl2.1/aclocal.m4 | 80 + ng/Togl2.1/ben.rgb | Bin 0 -> 49959 bytes ng/Togl2.1/configure | 10187 ++++++++++++++++++++++++++ ng/Togl2.1/configure.in | 281 + ng/Togl2.1/doc/README.txt | 2 + ng/Togl2.1/doc/capi.html | 652 ++ ng/Togl2.1/doc/download.html | 340 + ng/Togl2.1/doc/faq.html | 112 + ng/Togl2.1/doc/header.js | 20 + ng/Togl2.1/doc/index.html | 150 + ng/Togl2.1/doc/stereo.html | 171 + ng/Togl2.1/doc/tclapi.html | 774 ++ ng/Togl2.1/doc/upgrading.html | 109 + ng/Togl2.1/doc/using.html | 180 + ng/Togl2.1/double.c | 279 + ng/Togl2.1/double.tcl | 96 + ng/Togl2.1/gears.c | 491 ++ ng/Togl2.1/gears.tcl | 90 + ng/Togl2.1/image.c | 249 + ng/Togl2.1/image.h | 14 + ng/Togl2.1/index.c | 227 + ng/Togl2.1/index.tcl | 50 + ng/Togl2.1/multisample.tcl | 96 + ng/Togl2.1/overlay.c | 214 + ng/Togl2.1/overlay.tcl | 37 + ng/Togl2.1/pbuffer.c | 489 ++ ng/Togl2.1/pbuffer.tcl | 115 + ng/Togl2.1/pkgIndex.tcl.in | 5 + ng/Togl2.1/stereo.c | 343 + ng/Togl2.1/stereo.tcl | 106 + ng/Togl2.1/tclconfig/install-sh | 119 + ng/Togl2.1/tclconfig/tcl.m4 | 4105 +++++++++++ ng/Togl2.1/texture.c | 663 ++ ng/Togl2.1/texture.tcl | 278 + ng/Togl2.1/togl.c | 5405 ++++++++++++++ ng/Togl2.1/togl.decls | 195 + ng/Togl2.1/togl.h | 145 + ng/Togl2.1/toglAGL.c | 293 + ng/Togl2.1/toglDecls.h | 546 ++ ng/Togl2.1/toglFont.c | 447 ++ ng/Togl2.1/toglGLX.c | 481 ++ ng/Togl2.1/toglProcAddr.c | 61 + ng/Togl2.1/toglStubInit.c | 69 + ng/Togl2.1/toglStubLib.c | 59 + ng/Togl2.1/toglWGL.c | 595 ++ ng/Togl2.1/togl_ws.h.in | 7 + ng/Togl2.1/toglpy.h | 81 + ng/Togl2.1/tree2.rgba | Bin 0 -> 66048 bytes ng/dialog.tcl | 674 +- ng/drawing.tcl | 82 +- ng/drawing_togl17.tcl | 166 + ng/fonts.hpp | 2357 ++++++ ng/menustat.tcl | 70 +- ng/ng.tcl | 30 +- ng/ngpkg.cpp | 82 +- ng/ngvisual.tcl | 293 +- ng/variables.tcl | 2 +- nglib/CMakeLists.txt | 2 +- python/__init__.py | 6 +- 86 files changed, 45491 insertions(+), 503 deletions(-) create mode 100644 cmake_modules/netgen_fixup.cmake create mode 100644 ng/Togl2.1/CMakeLists.txt create mode 100644 ng/Togl2.1/GL_unused/glext.h create mode 100644 ng/Togl2.1/GL_unused/glxext.h create mode 100644 ng/Togl2.1/GL_unused/wglext.h create mode 100644 ng/Togl2.1/LICENSE create mode 100644 ng/Togl2.1/Makefile.in create mode 100644 ng/Togl2.1/README.bin create mode 100644 ng/Togl2.1/README.stubs create mode 100644 ng/Togl2.1/Togl.py create mode 100644 ng/Togl2.1/Xmu/CmapAlloc.c create mode 100644 ng/Togl2.1/Xmu/CrCmap.c create mode 100644 ng/Togl2.1/Xmu/DelCmap.c create mode 100644 ng/Togl2.1/Xmu/LookupCmap.c create mode 100644 ng/Togl2.1/Xmu/README.togl create mode 100644 ng/Togl2.1/Xmu/StdCmap.c create mode 100644 ng/Togl2.1/Xmu/StdCmap.h create mode 100644 ng/Togl2.1/aclocal.m4 create mode 100644 ng/Togl2.1/ben.rgb create mode 100755 ng/Togl2.1/configure create mode 100755 ng/Togl2.1/configure.in create mode 100644 ng/Togl2.1/doc/README.txt create mode 100644 ng/Togl2.1/doc/capi.html create mode 100644 ng/Togl2.1/doc/download.html create mode 100644 ng/Togl2.1/doc/faq.html create mode 100644 ng/Togl2.1/doc/header.js create mode 100644 ng/Togl2.1/doc/index.html create mode 100644 ng/Togl2.1/doc/stereo.html create mode 100644 ng/Togl2.1/doc/tclapi.html create mode 100644 ng/Togl2.1/doc/upgrading.html create mode 100644 ng/Togl2.1/doc/using.html create mode 100644 ng/Togl2.1/double.c create mode 100644 ng/Togl2.1/double.tcl create mode 100644 ng/Togl2.1/gears.c create mode 100644 ng/Togl2.1/gears.tcl create mode 100644 ng/Togl2.1/image.c create mode 100644 ng/Togl2.1/image.h create mode 100644 ng/Togl2.1/index.c create mode 100644 ng/Togl2.1/index.tcl create mode 100644 ng/Togl2.1/multisample.tcl create mode 100644 ng/Togl2.1/overlay.c create mode 100644 ng/Togl2.1/overlay.tcl create mode 100644 ng/Togl2.1/pbuffer.c create mode 100644 ng/Togl2.1/pbuffer.tcl create mode 100644 ng/Togl2.1/pkgIndex.tcl.in create mode 100644 ng/Togl2.1/stereo.c create mode 100644 ng/Togl2.1/stereo.tcl create mode 100755 ng/Togl2.1/tclconfig/install-sh create mode 100644 ng/Togl2.1/tclconfig/tcl.m4 create mode 100644 ng/Togl2.1/texture.c create mode 100644 ng/Togl2.1/texture.tcl create mode 100644 ng/Togl2.1/togl.c create mode 100644 ng/Togl2.1/togl.decls create mode 100644 ng/Togl2.1/togl.h create mode 100644 ng/Togl2.1/toglAGL.c create mode 100755 ng/Togl2.1/toglDecls.h create mode 100644 ng/Togl2.1/toglFont.c create mode 100644 ng/Togl2.1/toglGLX.c create mode 100644 ng/Togl2.1/toglProcAddr.c create mode 100755 ng/Togl2.1/toglStubInit.c create mode 100644 ng/Togl2.1/toglStubLib.c create mode 100644 ng/Togl2.1/toglWGL.c create mode 100644 ng/Togl2.1/togl_ws.h.in create mode 100644 ng/Togl2.1/toglpy.h create mode 100644 ng/Togl2.1/tree2.rgba create mode 100644 ng/drawing_togl17.tcl create mode 100644 ng/fonts.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 660494af..5d89de64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,11 @@ if(NOT INSTALL_DIR) set(INSTALL_DIR "/opt/netgen" CACHE PATH "Prefix prepended to install directories") endif(NOT INSTALL_DIR) -set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "Prefix prepended to install directories" FORCE) +if(APPLE) + set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR}/Netgen.app/Contents/Resources" CACHE INTERNAL "Prefix prepended to install directories" FORCE) +else(APPLE) + set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "Prefix prepended to install directories" FORCE) +endif(APPLE) ####################################################################### # use rpath @@ -89,7 +93,15 @@ include_directories ("${PROJECT_BINARY_DIR}") set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake_modules") -set(ng_install_dir RUNTIME DESTINATION bin COMPONENT netgen LIBRARY DESTINATION lib COMPONENT netgen_devel ARCHIVE DESTINATION lib COMPONENT netgen_devel) + +if(APPLE) + set(ng_install_dir_bin ../MacOS) + set(ng_install_dir_lib ../MacOS) +else(APPLE) + set(ng_install_dir_bin bin) + set(ng_install_dir_lib lib) +endif(APPLE) +set(ng_install_dir RUNTIME DESTINATION ${ng_install_dir_bin} COMPONENT netgen LIBRARY DESTINATION ${ng_install_dir_lib} COMPONENT netgen_devel ARCHIVE DESTINATION ${ng_install_dir_lib} COMPONENT netgen_devel) include (CheckIncludeFiles) check_include_files (dlfcn.h HAVE_DLFCN_H) @@ -147,19 +159,19 @@ include_directories(${ZLIB_INCLUDE_DIRS}) ####################################################################### if (USE_GUI) set(CMAKE_THREAD_PREFER_PTHREAD ON) - find_package(TclStub 8.5 REQUIRED) + find_package(TCL 8.5) find_package(Threads REQUIRED) - find_package(X11 REQUIRED) if(APPLE) - set(OPENGL_glu_LIBRARY "/opt/X11/lib/libGLU.dylib") - set(OPENGL_gl_LIBRARY "/opt/X11/lib/libGL.dylib") + find_library(OPENGL_gl_LIBRARY AppKit REQUIRED) + else(APPLE) + find_package(X11 REQUIRED) endif(APPLE) find_package(OpenGL REQUIRED) find_library(LIBPTHREAD NAMES pthread HINTS ${MY_LIB_DIR} ) add_definitions(-DTCL -DOPENGL) include_directories(${TCL_INCLUDE_PATH}) -# include_directories(${TK_INCLUDE_PATH}) + include_directories(${TK_INCLUDE_PATH}) if(WIN32) get_filename_component(MY_LIB_DIR ${TK_LIBRARY} DIRECTORY) @@ -170,7 +182,12 @@ if (USE_GUI) install( DIRECTORY "${MY_LIB_DIR}/../bin" DESTINATION . COMPONENT netgen ) else(WIN32) set(LIBTOGL togl) - ADD_DEFINITIONS(-DTOGL_X11) + add_definitions(-DUSE_TOGL_2) + if(APPLE) + ADD_DEFINITIONS(-DTOGL_NSOPENGL) + else(APPLE) + ADD_DEFINITIONS(-DTOGL_X11) + endif(APPLE) endif(WIN32) endif (USE_GUI) @@ -272,16 +289,29 @@ endif(INSTALL_PROFILES) ####################################################################### if(INSTALL_DEPENDENCIES) - include (InstallRequiredSystemLibraries) - message("***********************************************") - find_library(LIBGOMP NAMES gomp.1) - find_library(LIBSTDCXX NAMES stdc++.6) - message("gomp: ${LIBGOMP}") - message("stdc++: ${LIBSTDCXX}") - get_filename_component(MY_LIB_DIR ${TK_LIBRARY} DIRECTORY) - message("my_tcl lib dir: ${MY_LIB_DIR}") - install( DIRECTORY "${MY_LIB_DIR}" DESTINATION . COMPONENT netgen ) - install( FILES "${Boost_LIBRARIES}" ${LIBGOMP} ${LIBSTDCXX} DESTINATION lib COMPONENT netgen ) + include (InstallRequiredSystemLibraries) + find_library(LIBGOMP NAMES gomp.1) + find_library(LIBSTDCXX NAMES stdc++.6) + find_library(LIBGCCS NAMES gcc_s.1) + install( FILES "${Boost_LIBRARIES}" ${LIBGOMP} ${LIBSTDCXX} ${LIBGCCS} DESTINATION ${ng_install_dir_lib} COMPONENT netgen ) + get_filename_component(MY_LIB_DIR ${TK_LIBRARY} DIRECTORY) + if(APPLE) + install( DIRECTORY "${TIX_LIBRARY}" DESTINATION ${ng_install_dir_lib} COMPONENT netgen ) + install( DIRECTORY "${TK_DND_LIBRARY}" DESTINATION ${ng_install_dir_lib} COMPONENT netgen ) + endif(APPLE) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/fixup.cmake "\ +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/netgen_fixup.cmake) +set(APP ${INSTALL_DIR}/Netgen.app) +message(\${APP}) + +file(GLOB libs ${CMAKE_INSTALL_PREFIX}/${ng_install_dir_lib}/*.dylib ${CMAKE_INSTALL_PREFIX}/${ng_install_dir_lib}/*.so) +# set(libs ${CMAKE_INSTALL_PREFIX}/${ng_install_dir_lib}/libTix8.4.3.dylib) +message(\"\${libs}\") +netgen_fixup_bundle( \${APP}/Contents/MacOS/netgen_main \"\${libs}\" ${CMAKE_INSTALL_PREFIX}/${ng_install_dir_lib} ) +execute_process(COMMAND ln -s /Applications ${INSTALL_DIR}/Applications) +execute_process(COMMAND hdiutil create -volname Netgen -srcfolder ${INSTALL_DIR} -ov -format UDZO Netgen.dmg) +") + add_custom_target(bundle COMMAND ${CMAKE_COMMAND} "-P" "${CMAKE_CURRENT_BINARY_DIR}/fixup.cmake") endif(INSTALL_DEPENDENCIES) ####################################################################### @@ -305,15 +335,15 @@ include(CTest) ####################################################################### # Debian packager -set(CPACK_SOURCE_GENERATOR "TGZ") -set(CPACK_SOURCE_IGNORE_FILES "/cmake/;/build/;/.gz/;~$;${CPACK_SOURCE_IGNORE_FILES}") -set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION} ) - -set(CPACK_PACKAGE_NAME netgen) -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "automatic 3d tetrahedral mesh generator") -set(CPACK_PACKAGE_DESCRIPTION "NETGEN is an automatic 3d tetrahedral mesh generator. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STL file format. The connection to a geometry kernel allows the handling of IGES and STEP files. NETGEN contains modules for mesh optimization and hierarchical mesh refinement. Netgen is open source based on the LGPL license. It is available for Unix/Linux and Windows.") - if(UNIX) + set(CPACK_SOURCE_GENERATOR "TGZ") + set(CPACK_SOURCE_IGNORE_FILES "/cmake/;/build/;/.gz/;~$;${CPACK_SOURCE_IGNORE_FILES}") + set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION} ) + + set(CPACK_PACKAGE_NAME netgen) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "automatic 3d tetrahedral mesh generator") + set(CPACK_PACKAGE_DESCRIPTION "NETGEN is an automatic 3d tetrahedral mesh generator. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STL file format. The connection to a geometry kernel allows the handling of IGES and STEP files. NETGEN contains modules for mesh optimization and hierarchical mesh refinement. Netgen is open source based on the LGPL license. It is available for Unix/Linux and Windows.") + set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/netgen") execute_process(COMMAND grep CODENAME /etc/lsb-release OUTPUT_VARIABLE temp OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) @@ -337,51 +367,55 @@ if(UNIX) endif(UNIX) if(APPLE) - set(CPACK_GENERATOR "Bundle") - set(CPACK_BUNDLE_NAME "Netgen") - set(CPACK_PACKAGE_FILE_NAME "netgen-${PACKAGE_VERSION}") - set(CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/netgen.icns) -# set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/netgen.icns) - # create some auxiliary files set(mac_startup ${CMAKE_CURRENT_BINARY_DIR}/startup.sh) - file(WRITE ${mac_startup} "#!/bin/sh\n") - file(APPEND ${mac_startup} "Netgen_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/Resources\\/bin\\/startup.sh//'`\"\n") - file(APPEND ${mac_startup} "Netgen_RESOURCES=\"$Netgen_BUNDLE/Contents/Resources\"\n") - file(APPEND ${mac_startup} "export DYLD_LIBRARY_PATH=$Netgen_RESOURCES/lib:$DYLD_LIBRARY_PATH\n") - file(APPEND ${mac_startup} "export NETGENDIR=$Netgen_RESOURCES/bin\n") - file(APPEND ${mac_startup} "cd $Netgen_RESOURCES\n") - file(APPEND ${mac_startup} "$Netgen_RESOURCES/bin/netgen\n") - install(PROGRAMS ${mac_startup} DESTINATION bin) + file(WRITE ${mac_startup} "\ +#!/bin/sh +Netgen_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/MacOS\\/startup.sh//'`\" +Netgen_MACOS=\"$Netgen_BUNDLE/Contents/MacOS\" +export NETGENDIR=$Netgen_MACOS +export DYLD_LIBRARY_PATH=$Netgen_MACOS:$DYLD_LIBRARY_PATH +# export TIX_LIBRARY=$Netgen_MACOS/library +# export TCLLIBPATH=$Netgen_MACOS:$TCLLIBPATH +export PYTHONPATH=$Netgen_BUNDLE/Contents/Resources/lib/python3.5/site-packages:$PYTHONPATH +cd $Netgen_MACOS +$Netgen_MACOS/netgen_main +") + install(PROGRAMS ${mac_startup} DESTINATION ${ng_install_dir_bin}) set(mac_ngsuite ${CMAKE_CURRENT_BINARY_DIR}/ngsuite.sh) - file(WRITE ${mac_ngsuite} "#!/bin/sh\n") - file(APPEND ${mac_ngsuite} "Netgen_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/MacOS\\/Netgen//'`\"\n") - file(APPEND ${mac_ngsuite} "Netgen_RESOURCES=\"$Netgen_BUNDLE/Contents/Resources\"\n") - file(APPEND ${mac_ngsuite} "open -a /Applications/Utilities/Terminal.app $Netgen_RESOURCES/bin/startup.sh\n") - set(CPACK_BUNDLE_STARTUP_COMMAND ${mac_ngsuite}) + file(WRITE ${mac_ngsuite} "\ +#!/bin/sh +Netgen_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/MacOS\\/Netgen//'`\" +Netgen_MACOS=\"$Netgen_BUNDLE/Contents/MacOS\" +open -a /Applications/Utilities/Terminal.app $Netgen_MACOS/startup.sh +") + install(PROGRAMS ${mac_ngsuite} DESTINATION ../MacOS RENAME Netgen) set(mac_plist ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) - file(WRITE ${mac_plist} "\n") - file(APPEND ${mac_plist} "\n") - file(APPEND ${mac_plist} "\n") - file(APPEND ${mac_plist} "\n") - file(APPEND ${mac_plist} " CFBundleDevelopmentRegion\n") - file(APPEND ${mac_plist} " English\n") - file(APPEND ${mac_plist} " CFBundleExecutable\n") - file(APPEND ${mac_plist} " Netgen\n") - file(APPEND ${mac_plist} " CFBundleIconFile\n") - file(APPEND ${mac_plist} " Netgen.icns\n") - file(APPEND ${mac_plist} "\n") - file(APPEND ${mac_plist} "\n") - set(CPACK_BUNDLE_PLIST ${mac_plist}) -# set(CPACK_DMG_FORMAT "UDRW") -# set(CPACK_DMG_DS_STORE .DS_Store_dmg) -# set(CPACK_DMG_BACKGROUND_IMAGE sculpture312.png) + file(WRITE ${mac_plist} " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Netgen + CFBundleIconFile + Netgen.icns + NSHighResolutionCapable + True + + +") + install(FILES ${mac_plist} DESTINATION ../) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/netgen.icns DESTINATION . RENAME Netgen.icns) endif(APPLE) -include(CPack) +if(NOT APPLE) + include(CPack) +endif() ####################################################################### # uninstall target diff --git a/cmake_modules/netgen_fixup.cmake b/cmake_modules/netgen_fixup.cmake new file mode 100644 index 00000000..c26947ed --- /dev/null +++ b/cmake_modules/netgen_fixup.cmake @@ -0,0 +1,49 @@ +include(BundleUtilities) +function(netgen_fixup_bundle app libs dirs) + message(STATUS "fixup_bundle") + message(STATUS " app='${app}'") + message(STATUS " libs='${libs}'") + message(STATUS " dirs='${dirs}'") + + get_bundle_and_executable("${app}" bundle executable valid) + if(valid) + get_filename_component(exepath "${executable}" PATH) + + message(STATUS "fixup_bundle: preparing...") + get_bundle_keys("${app}" "${libs}" "${dirs}" keys) + + message(STATUS "fixup_bundle: copying...") + list(LENGTH keys n) + math(EXPR n ${n}*2) + + set(i 0) + foreach(key ${keys}) + math(EXPR i ${i}+1) + if(${${key}_COPYFLAG}) + set(item "${${key}_ITEM}") + if(item MATCHES "[^/]+\\.framework/") + copy_resolved_framework_into_bundle("${${key}_RESOLVED_ITEM}" + "${${key}_RESOLVED_EMBEDDED_ITEM}") + else() + copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}" + "${${key}_RESOLVED_EMBEDDED_ITEM}") + endif() + endif() + endforeach() + + message(STATUS "fixup_bundle: fixing...") + foreach(key ${keys}) + math(EXPR i ${i}+1) + message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'") + fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}") + endforeach() + + message(STATUS "fixup_bundle: cleaning up...") + clear_bundle_keys(keys) + + else() + message(SEND_ERROR "error: fixup_bundle: not a valid bundle") + endif() + + message(STATUS "fixup_bundle: done") +endfunction() diff --git a/libsrc/csg/CMakeLists.txt b/libsrc/csg/CMakeLists.txt index d8ae2381..110c8bad 100644 --- a/libsrc/csg/CMakeLists.txt +++ b/libsrc/csg/CMakeLists.txt @@ -14,7 +14,7 @@ endif(APPLE) if(NOT WIN32) target_link_libraries(csg mesh ${PYTHON_LIBS}) target_link_libraries(csg ${PYTHON_LIBS}) - install( TARGETS csg DESTINATION lib COMPONENT netgen) + install( TARGETS csg ${ng_install_dir}) endif(NOT WIN32) @@ -25,7 +25,7 @@ if(USE_GUI) if(APPLE) set_target_properties( csgvis PROPERTIES SUFFIX ".so") endif(APPLE) - install( TARGETS csgvis DESTINATION lib COMPONENT netgen) + install( TARGETS csgvis ${ng_install_dir}) endif(NOT WIN32) endif(USE_GUI) diff --git a/libsrc/geom2d/CMakeLists.txt b/libsrc/geom2d/CMakeLists.txt index 0708d6c1..99e5c1f8 100644 --- a/libsrc/geom2d/CMakeLists.txt +++ b/libsrc/geom2d/CMakeLists.txt @@ -6,14 +6,14 @@ endif(APPLE) if(NOT WIN32) target_link_libraries(geom2d mesh ${PYTHON_LIBS}) - install( TARGETS geom2d DESTINATION lib COMPONENT netgen) + install( TARGETS geom2d ${ng_install_dir}) endif(NOT WIN32) if(USE_GUI) add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp) if(NOT WIN32) target_link_libraries(geom2dvis geom2d) - install( TARGETS geom2dvis DESTINATION lib COMPONENT netgen) + install( TARGETS geom2dvis ${ng_install_dir}) endif(NOT WIN32) endif(USE_GUI) diff --git a/libsrc/interface/CMakeLists.txt b/libsrc/interface/CMakeLists.txt index 326084bb..0872f18c 100644 --- a/libsrc/interface/CMakeLists.txt +++ b/libsrc/interface/CMakeLists.txt @@ -20,6 +20,6 @@ if(NOT WIN32) if(USE_GUI) target_link_libraries(interface visual) endif(USE_GUI) - install( TARGETS interface DESTINATION lib COMPONENT netgen ) + install( TARGETS interface ${ng_install_dir}) endif(NOT WIN32) diff --git a/libsrc/meshing/CMakeLists.txt b/libsrc/meshing/CMakeLists.txt index 2e3e72bc..10324cce 100644 --- a/libsrc/meshing/CMakeLists.txt +++ b/libsrc/meshing/CMakeLists.txt @@ -30,6 +30,6 @@ endif(APPLE) if(NOT WIN32) target_link_libraries( mesh ${ZLIB_LIBRARIES} ${MPI_CXX_LIBRARIES} ${PYTHON_LIBS} ${METIS_LIBRARY}) - install( TARGETS mesh DESTINATION lib COMPONENT netgen ) + install( TARGETS mesh ${ng_install_dir}) endif(NOT WIN32) diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 58494097..dba48a4d 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -5585,8 +5585,8 @@ namespace netgen bcnames[bcnr] = nullptr; for (auto & fd : facedecoding) - if (fd.BCProperty() < bcnames.Size()) - fd.SetBCName (bcnames[fd.BCProperty()]); + if (fd.BCProperty() <= bcnames.Size()) + fd.SetBCName (bcnames[fd.BCProperty()-1]); } const string & Mesh ::GetBCName ( int bcnr ) const diff --git a/libsrc/occ/CMakeLists.txt b/libsrc/occ/CMakeLists.txt index 4f563090..640eab0b 100644 --- a/libsrc/occ/CMakeLists.txt +++ b/libsrc/occ/CMakeLists.txt @@ -9,6 +9,6 @@ add_library(occvis ${NG_LIB_TYPE} occpkg.cpp vsocc.cpp) if(NOT WIN32) target_link_libraries( occ ${OCC_LIBRARIES} ${PYTHON_LIBS}) target_link_libraries( occvis occ ) - install( TARGETS occ occvis DESTINATION lib COMPONENT netgen ) + install( TARGETS occ occvis ${ng_install_dir}) endif(NOT WIN32) diff --git a/libsrc/stlgeom/CMakeLists.txt b/libsrc/stlgeom/CMakeLists.txt index cc75c62b..a78658ae 100644 --- a/libsrc/stlgeom/CMakeLists.txt +++ b/libsrc/stlgeom/CMakeLists.txt @@ -6,7 +6,7 @@ add_library(stl ${NG_LIB_TYPE} if(NOT WIN32) target_link_libraries( stl mesh ${PYTHON_LIBS}) target_link_libraries( stl ${PYTHON_LIBS}) - install( TARGETS stl DESTINATION lib COMPONENT netgen ) + install( TARGETS stl ${ng_install_dir}) endif(NOT WIN32) if(USE_GUI) @@ -15,7 +15,7 @@ if(USE_GUI) ) if(NOT WIN32) target_link_libraries( stlvis stl ) - install( TARGETS stlvis DESTINATION lib COMPONENT netgen ) + install( TARGETS stlvis ${ng_install_dir}) endif(NOT WIN32) endif(USE_GUI) diff --git a/libsrc/visualization/CMakeLists.txt b/libsrc/visualization/CMakeLists.txt index 819bac34..f3273e40 100644 --- a/libsrc/visualization/CMakeLists.txt +++ b/libsrc/visualization/CMakeLists.txt @@ -13,7 +13,7 @@ add_library(visual ${NG_LIB_TYPE} ${LIB_VISUAL_SOURCES}) if(NOT WIN32) target_link_libraries( visual ${PYTHON_LIBS} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TCL_LIBRARY} ) - install( TARGETS visual DESTINATION lib COMPONENT netgen ) + install( TARGETS visual ${ng_install_dir}) endif(NOT WIN32) diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt index 81f18394..7c2da51d 100644 --- a/ng/CMakeLists.txt +++ b/ng/CMakeLists.txt @@ -14,6 +14,9 @@ if(USE_GUI) endif(NOT WIN32) install(TARGETS netgen ${ng_install_dir}) + if(APPLE) + set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen_main) + endif(APPLE) endif(USE_GUI) @@ -31,12 +34,16 @@ endif(USE_PYTHON) install(FILES dialog.tcl menustat.tcl ngicon.tcl ng.tcl - ngvisual.tcl sockets.tcl drawing.tcl nghelp.tcl ngshell.tcl + ngvisual.tcl sockets.tcl nghelp.tcl ngshell.tcl ngtesting.tcl parameters.tcl variables.tcl csgeom.tcl stlgeom.tcl occgeom.tcl acisgeom.tcl netgen.ocf - DESTINATION bin COMPONENT netgen) + DESTINATION ${ng_install_dir_bin} COMPONENT netgen) + if(USE_GUI AND NOT WIN32) - add_subdirectory(Togl-1.7) + add_subdirectory(Togl2.1) + install(FILES drawing.tcl DESTINATION ${ng_install_dir_bin} COMPONENT netgen) +else() + install(FILES drawing_togl17.tcl RENAME drawing.tcl DESTINATION ${ng_install_dir_bin} COMPONENT netgen) endif(USE_GUI AND NOT WIN32) diff --git a/ng/Togl2.1/CMakeLists.txt b/ng/Togl2.1/CMakeLists.txt new file mode 100644 index 00000000..aa127330 --- /dev/null +++ b/ng/Togl2.1/CMakeLists.txt @@ -0,0 +1,17 @@ +add_definitions("-DPACKAGE_NAME=\"Togl\" -DPACKAGE_TARNAME=\"togl\" -DPACKAGE_VERSION=\"2.1\" -DPACKAGE_STRING=\"Togl\ 2.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=0 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -DAUTOSTEREOD=\"\"") + +include_directories("${TCL_INCLUDE_PATH}/tcl-private/generic" "${TCL_INCLUDE_PATH}/tcl-private/unix") +include_directories("${TCL_INCLUDE_PATH}/tk-private/generic" "${TCL_INCLUDE_PATH}/tk-private/unix") +include_directories("${TCL_INCLUDE_PATH}/tk-private/generic/ttk") +include_directories("${TK_INCLUDE_PATH}/../PrivateHeaders") + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -fomit-frame-pointer -Wall -Wno-implicit-int") + +if(APPLE) + set(CMAKE_C_COMPILER "gcc") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") +endif(APPLE) + +add_library(togl togl.c toglProcAddr.c toglStubInit.c) +target_link_libraries(togl ${OPENGL_LIBRARIES} -ldl) +set_target_properties(togl PROPERTIES POSITION_INDEPENDENT_CODE ON ) diff --git a/ng/Togl2.1/GL_unused/glext.h b/ng/Togl2.1/GL_unused/glext.h new file mode 100644 index 00000000..c0941aa8 --- /dev/null +++ b/ng/Togl2.1/GL_unused/glext.h @@ -0,0 +1,8459 @@ +#ifndef __glext_h_ +#define __glext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glext.h last updated 2008/11/14 */ +/* Current version at http://www.opengl.org/registry/ */ +#define GL_GLEXT_VERSION 44 + +#ifndef GL_VERSION_1_2 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_RESCALE_NORMAL 0x803A +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#endif + +#ifndef GL_ARB_imaging +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#endif + +#ifndef GL_VERSION_1_3 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_MULTISAMPLE_BIT 0x20000000 +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +#endif + +#ifndef GL_VERSION_1_4 +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_COMPARE_R_TO_TEXTURE 0x884E +#endif + +#ifndef GL_VERSION_1_5 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE +#define GL_FOG_COORD GL_FOG_COORDINATE +#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE +#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE +#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE +#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER +#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING +#define GL_SRC0_RGB GL_SOURCE0_RGB +#define GL_SRC1_RGB GL_SOURCE1_RGB +#define GL_SRC2_RGB GL_SOURCE2_RGB +#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA +#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA +#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA +#endif + +#ifndef GL_VERSION_2_0 +#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_COORDS 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#endif + +#ifndef GL_VERSION_2_1 +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_SLUMINANCE_ALPHA 0x8C44 +#define GL_SLUMINANCE8_ALPHA8 0x8C45 +#define GL_SLUMINANCE 0x8C46 +#define GL_SLUMINANCE8 0x8C47 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_COMPRESSED_SLUMINANCE 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +#endif + +#ifndef GL_VERSION_3_0 +#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB +#define GL_CLIP_DISTANCE0 GL_CLIP_PLANE0 +#define GL_CLIP_DISTANCE1 GL_CLIP_PLANE1 +#define GL_CLIP_DISTANCE2 GL_CLIP_PLANE2 +#define GL_CLIP_DISTANCE3 GL_CLIP_PLANE3 +#define GL_CLIP_DISTANCE4 GL_CLIP_PLANE4 +#define GL_CLIP_DISTANCE5 GL_CLIP_PLANE5 +#define GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_DEPTH_BUFFER 0x8223 +#define GL_STENCIL_BUFFER 0x8224 +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_ALPHA_INTEGER 0x8D97 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +/* Reuse tokens from ARB_depth_buffer_float */ +/* reuse GL_DEPTH_COMPONENT32F */ +/* reuse GL_DEPTH32F_STENCIL8 */ +/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ +/* Reuse tokens from ARB_framebuffer_object */ +/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_DEFAULT */ +/* reuse GL_FRAMEBUFFER_UNDEFINED */ +/* reuse GL_DEPTH_STENCIL_ATTACHMENT */ +/* reuse GL_INDEX */ +/* reuse GL_MAX_RENDERBUFFER_SIZE */ +/* reuse GL_DEPTH_STENCIL */ +/* reuse GL_UNSIGNED_INT_24_8 */ +/* reuse GL_DEPTH24_STENCIL8 */ +/* reuse GL_TEXTURE_STENCIL_SIZE */ +/* reuse GL_TEXTURE_RED_TYPE */ +/* reuse GL_TEXTURE_GREEN_TYPE */ +/* reuse GL_TEXTURE_BLUE_TYPE */ +/* reuse GL_TEXTURE_ALPHA_TYPE */ +/* reuse GL_TEXTURE_LUMINANCE_TYPE */ +/* reuse GL_TEXTURE_INTENSITY_TYPE */ +/* reuse GL_TEXTURE_DEPTH_TYPE */ +/* reuse GL_UNSIGNED_NORMALIZED */ +/* reuse GL_FRAMEBUFFER_BINDING */ +/* reuse GL_DRAW_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_BINDING */ +/* reuse GL_READ_FRAMEBUFFER */ +/* reuse GL_DRAW_FRAMEBUFFER */ +/* reuse GL_READ_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_SAMPLES */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +/* reuse GL_FRAMEBUFFER_COMPLETE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ +/* reuse GL_FRAMEBUFFER_UNSUPPORTED */ +/* reuse GL_MAX_COLOR_ATTACHMENTS */ +/* reuse GL_COLOR_ATTACHMENT0 */ +/* reuse GL_COLOR_ATTACHMENT1 */ +/* reuse GL_COLOR_ATTACHMENT2 */ +/* reuse GL_COLOR_ATTACHMENT3 */ +/* reuse GL_COLOR_ATTACHMENT4 */ +/* reuse GL_COLOR_ATTACHMENT5 */ +/* reuse GL_COLOR_ATTACHMENT6 */ +/* reuse GL_COLOR_ATTACHMENT7 */ +/* reuse GL_COLOR_ATTACHMENT8 */ +/* reuse GL_COLOR_ATTACHMENT9 */ +/* reuse GL_COLOR_ATTACHMENT10 */ +/* reuse GL_COLOR_ATTACHMENT11 */ +/* reuse GL_COLOR_ATTACHMENT12 */ +/* reuse GL_COLOR_ATTACHMENT13 */ +/* reuse GL_COLOR_ATTACHMENT14 */ +/* reuse GL_COLOR_ATTACHMENT15 */ +/* reuse GL_DEPTH_ATTACHMENT */ +/* reuse GL_STENCIL_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER */ +/* reuse GL_RENDERBUFFER */ +/* reuse GL_RENDERBUFFER_WIDTH */ +/* reuse GL_RENDERBUFFER_HEIGHT */ +/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ +/* reuse GL_STENCIL_INDEX1 */ +/* reuse GL_STENCIL_INDEX4 */ +/* reuse GL_STENCIL_INDEX8 */ +/* reuse GL_STENCIL_INDEX16 */ +/* reuse GL_RENDERBUFFER_RED_SIZE */ +/* reuse GL_RENDERBUFFER_GREEN_SIZE */ +/* reuse GL_RENDERBUFFER_BLUE_SIZE */ +/* reuse GL_RENDERBUFFER_ALPHA_SIZE */ +/* reuse GL_RENDERBUFFER_DEPTH_SIZE */ +/* reuse GL_RENDERBUFFER_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ +/* reuse GL_MAX_SAMPLES */ +/* Reuse tokens from ARB_framebuffer_sRGB */ +/* reuse GL_FRAMEBUFFER_SRGB */ +/* Reuse tokens from ARB_half_float_vertex */ +/* reuse GL_HALF_FLOAT */ +/* Reuse tokens from ARB_map_buffer_range */ +/* reuse GL_MAP_READ_BIT */ +/* reuse GL_MAP_WRITE_BIT */ +/* reuse GL_MAP_INVALIDATE_RANGE_BIT */ +/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ +/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ +/* reuse GL_MAP_UNSYNCHRONIZED_BIT */ +/* Reuse tokens from ARB_texture_compression_rgtc */ +/* reuse GL_COMPRESSED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_RG_RGTC2 */ +/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ +/* Reuse tokens from ARB_texture_rg */ +/* reuse GL_RG */ +/* reuse GL_RG_INTEGER */ +/* reuse GL_R8 */ +/* reuse GL_R16 */ +/* reuse GL_RG8 */ +/* reuse GL_RG16 */ +/* reuse GL_R16F */ +/* reuse GL_R32F */ +/* reuse GL_RG16F */ +/* reuse GL_RG32F */ +/* reuse GL_R8I */ +/* reuse GL_R8UI */ +/* reuse GL_R16I */ +/* reuse GL_R16UI */ +/* reuse GL_R32I */ +/* reuse GL_R32UI */ +/* reuse GL_RG8I */ +/* reuse GL_RG8UI */ +/* reuse GL_RG16I */ +/* reuse GL_RG16UI */ +/* reuse GL_RG32I */ +/* reuse GL_RG32UI */ +/* Reuse tokens from ARB_vertex_array_object */ +/* reuse GL_VERTEX_ARRAY_BINDING */ +#endif + +#ifndef GL_ARB_multitexture +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +#endif + +#ifndef GL_ARB_multisample +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +#endif + +#ifndef GL_ARB_texture_env_add +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif + +#ifndef GL_ARB_texture_compression +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif + +#ifndef GL_ARB_point_parameters +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif + +#ifndef GL_ARB_texture_env_crossbar +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif + +#ifndef GL_ARB_shadow +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif + +#ifndef GL_ARB_window_pos +#endif + +#ifndef GL_ARB_vertex_program +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +#endif + +#ifndef GL_ARB_fragment_program +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +#endif + +#ifndef GL_ARB_shader_objects +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#endif + +#ifndef GL_ARB_point_sprite +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif + +#ifndef GL_ARB_color_buffer_float +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D +#endif + +#ifndef GL_ARB_half_float_pixel +#define GL_HALF_FLOAT_ARB 0x140B +#endif + +#ifndef GL_ARB_texture_float +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#endif + +#ifndef GL_ARB_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif + +#ifndef GL_ARB_depth_buffer_float +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#endif + +#ifndef GL_ARB_draw_instanced +#endif + +#ifndef GL_ARB_framebuffer_object +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_INDEX 0x8222 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#endif + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#endif + +#ifndef GL_ARB_geometry_shader4 +#define GL_LINES_ADJACENCY_ARB 0x000A +#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B +#define GL_TRIANGLES_ADJACENCY_ARB 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D +#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 +#define GL_GEOMETRY_SHADER_ARB 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 +/* reuse GL_MAX_VARYING_COMPONENTS */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +#endif + +#ifndef GL_ARB_half_float_vertex +#define GL_HALF_FLOAT 0x140B +#endif + +#ifndef GL_ARB_instanced_arrays +#endif + +#ifndef GL_ARB_map_buffer_range +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#endif + +#ifndef GL_ARB_texture_buffer_object +#define GL_TEXTURE_BUFFER_ARB 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E +#endif + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#endif + +#ifndef GL_ARB_texture_rg +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_R16 0x822A +#define GL_RG8 0x822B +#define GL_RG16 0x822C +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#endif + +#ifndef GL_ARB_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#endif + +#ifndef GL_EXT_abgr +#define GL_ABGR_EXT 0x8000 +#endif + +#ifndef GL_EXT_blend_color +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +#endif + +#ifndef GL_EXT_texture +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#endif + +#ifndef GL_EXT_texture3D +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +#endif + +#ifndef GL_SGIS_texture_filter4 +#define GL_FILTER4_SGIS 0x8146 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +#endif + +#ifndef GL_EXT_subtexture +#endif + +#ifndef GL_EXT_copy_texture +#endif + +#ifndef GL_EXT_histogram +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +#endif + +#ifndef GL_EXT_convolution +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +#endif + +#ifndef GL_SGI_color_matrix +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#endif + +#ifndef GL_SGI_color_table +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +#endif + +#ifndef GL_SGIS_pixel_texture +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +#endif + +#ifndef GL_SGIX_pixel_texture +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +#endif + +#ifndef GL_SGIS_texture4D +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +#endif + +#ifndef GL_SGI_texture_color_table +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#endif + +#ifndef GL_EXT_cmyka +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#endif + +#ifndef GL_EXT_texture_object +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +#endif + +#ifndef GL_SGIS_detail_texture +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +#endif + +#ifndef GL_SGIS_sharpen_texture +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +#endif + +#ifndef GL_EXT_packed_pixels +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#endif + +#ifndef GL_SGIS_texture_lod +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#endif + +#ifndef GL_SGIS_multisample +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +#endif + +#ifndef GL_EXT_rescale_normal +#define GL_RESCALE_NORMAL_EXT 0x803A +#endif + +#ifndef GL_EXT_vertex_array +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +#endif + +#ifndef GL_EXT_misc_attribute +#endif + +#ifndef GL_SGIS_generate_mipmap +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#endif + +#ifndef GL_SGIX_clipmap +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#endif + +#ifndef GL_SGIX_shadow +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#endif + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#endif + +#ifndef GL_SGIS_texture_border_clamp +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#endif + +#ifndef GL_EXT_blend_minmax +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_BLEND_EQUATION_EXT 0x8009 +#endif + +#ifndef GL_EXT_blend_subtract +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#endif + +#ifndef GL_EXT_blend_logic_op +#endif + +#ifndef GL_SGIX_interlace +#define GL_INTERLACE_SGIX 0x8094 +#endif + +#ifndef GL_SGIX_pixel_tiles +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#endif + +#ifndef GL_SGIS_texture_select +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#endif + +#ifndef GL_SGIX_sprite +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +#endif + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#endif + +#ifndef GL_EXT_point_parameters +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +#endif + +#ifndef GL_SGIX_instruments +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +#endif + +#ifndef GL_SGIX_texture_scale_bias +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#endif + +#ifndef GL_SGIX_framezoom +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +#endif + +#ifndef GL_SGIX_tag_sample_buffer +#endif + +#ifndef GL_FfdMaskSGIX +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#endif + +#ifndef GL_SGIX_polynomial_ffd +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +#endif + +#ifndef GL_SGIX_reference_plane +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +#endif + +#ifndef GL_SGIX_flush_raster +#endif + +#ifndef GL_SGIX_depth_texture +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#endif + +#ifndef GL_SGIS_fog_function +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +#endif + +#ifndef GL_SGIX_fog_offset +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#endif + +#ifndef GL_HP_image_transform +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_CUBIC_HP 0x815F +#define GL_AVERAGE_HP 0x8160 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +#endif + +#ifndef GL_HP_convolution_border_modes +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#endif + +#ifndef GL_INGR_palette_buffer +#endif + +#ifndef GL_SGIX_texture_add_env +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#endif + +#ifndef GL_EXT_color_subtable +#endif + +#ifndef GL_PGI_vertex_hints +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#endif + +#ifndef GL_PGI_misc_hints +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +#endif + +#ifndef GL_EXT_paletted_texture +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +#endif + +#ifndef GL_EXT_clip_volume_hint +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#endif + +#ifndef GL_SGIX_list_priority +#define GL_LIST_PRIORITY_SGIX 0x8182 +#endif + +#ifndef GL_SGIX_ir_instrument1 +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#endif + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#endif + +#ifndef GL_SGIX_texture_lod_bias +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#endif + +#ifndef GL_SGIX_shadow_ambient +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#endif + +#ifndef GL_EXT_index_texture +#endif + +#ifndef GL_EXT_index_material +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +#endif + +#ifndef GL_EXT_index_func +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +#endif + +#ifndef GL_EXT_index_array_formats +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +#endif + +#ifndef GL_SGIX_ycrcb +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#endif + +#ifndef GL_SGIX_fragment_lighting +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +#endif + +#ifndef GL_IBM_rasterpos_clip +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#endif + +#ifndef GL_HP_texture_lighting +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#endif + +#ifndef GL_EXT_draw_range_elements +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +#endif + +#ifndef GL_WIN_phong_shading +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB +#endif + +#ifndef GL_WIN_specular_fog +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#endif + +#ifndef GL_EXT_light_texture +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +/* reuse GL_FRAGMENT_DEPTH_EXT */ +#endif + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 +#endif + +#ifndef GL_SGIX_impact_pixel_texture +#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 +#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 +#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 +#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 +#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 +#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 +#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A +#endif + +#ifndef GL_EXT_bgra +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 +#endif + +#ifndef GL_SGIX_async +#define GL_ASYNC_MARKER_SGIX 0x8329 +#endif + +#ifndef GL_SGIX_async_pixel +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#endif + +#ifndef GL_SGIX_async_histogram +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#endif + +#ifndef GL_INTEL_texture_scissor +#endif + +#ifndef GL_INTEL_parallel_arrays +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +#endif + +#ifndef GL_HP_occlusion_test +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif + +#ifndef GL_EXT_pixel_transform +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +#endif + +#ifndef GL_EXT_pixel_transform_color_table +#endif + +#ifndef GL_EXT_shared_texture_palette +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#endif + +#ifndef GL_EXT_separate_specular_color +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#endif + +#ifndef GL_EXT_secondary_color +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +#endif + +#ifndef GL_EXT_texture_perturb_normal +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF +#endif + +#ifndef GL_EXT_multi_draw_arrays +#endif + +#ifndef GL_EXT_fog_coord +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +#endif + +#ifndef GL_REND_screen_coordinates +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#endif + +#ifndef GL_EXT_coordinate_frame +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 +#endif + +#ifndef GL_EXT_texture_env_combine +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A +#endif + +#ifndef GL_APPLE_specular_vector +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#endif + +#ifndef GL_APPLE_transform_hint +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#endif + +#ifndef GL_SGIX_fog_scale +#define GL_FOG_SCALE_SGIX 0x81FC +#define GL_FOG_SCALE_VALUE_SGIX 0x81FD +#endif + +#ifndef GL_SUNX_constant_data +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +#endif + +#ifndef GL_SUN_global_alpha +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +#endif + +#ifndef GL_SUN_triangle_list +#define GL_RESTART_SUN 0x0001 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +#endif + +#ifndef GL_SUN_vertex +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +#endif + +#ifndef GL_INGR_color_clamp +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#endif + +#ifndef GL_INGR_interlace_read +#define GL_INTERLACE_READ_INGR 0x8568 +#endif + +#ifndef GL_EXT_stencil_wrap +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 +#endif + +#ifndef GL_EXT_422_pixels +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF +#endif + +#ifndef GL_NV_texgen_reflection +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 +#endif + +#ifndef GL_EXT_texture_cube_map +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#endif + +#ifndef GL_SUN_convolution_border_modes +#define GL_WRAP_BORDER_SUN 0x81D4 +#endif + +#ifndef GL_EXT_texture_env_add +#endif + +#ifndef GL_EXT_texture_lod_bias +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +#ifndef GL_EXT_vertex_weighting +#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT GL_MODELVIEW +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +#endif + +#ifndef GL_NV_light_max_exponent +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif + +#ifndef GL_NV_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +#endif + +#ifndef GL_NV_register_combiners +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +/* reuse GL_TEXTURE0_ARB */ +/* reuse GL_TEXTURE1_ARB */ +/* reuse GL_ZERO */ +/* reuse GL_NONE */ +/* reuse GL_FOG */ +#endif + +#ifndef GL_NV_fog_distance +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +/* reuse GL_EYE_PLANE */ +#endif + +#ifndef GL_NV_texgen_emboss +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F +#endif + +#ifndef GL_NV_blend_square +#endif + +#ifndef GL_NV_texture_env_combine4 +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B +#endif + +#ifndef GL_MESA_resize_buffers +#endif + +#ifndef GL_MESA_window_pos +#endif + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif + +#ifndef GL_IBM_cull_vertex +#define GL_CULL_VERTEX_IBM 103050 +#endif + +#ifndef GL_IBM_multimode_draw_arrays +#endif + +#ifndef GL_IBM_vertex_array_lists +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +#endif + +#ifndef GL_SGIX_subsample +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#endif + +#ifndef GL_SGIX_ycrcb_subsample +#endif + +#ifndef GL_SGIX_ycrcba +#define GL_YCRCB_SGIX 0x8318 +#define GL_YCRCBA_SGIX 0x8319 +#endif + +#ifndef GL_SGI_depth_pass_instrument +#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 +#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 +#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 +#endif + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif + +#ifndef GL_3DFX_multisample +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +#endif + +#ifndef GL_3DFX_tbuffer +#endif + +#ifndef GL_EXT_multisample +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +#endif + +#ifndef GL_SGIX_vertex_preclip +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#endif + +#ifndef GL_SGIX_convolution_accuracy +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#endif + +#ifndef GL_SGIX_resample +#define GL_PACK_RESAMPLE_SGIX 0x842C +#define GL_UNPACK_RESAMPLE_SGIX 0x842D +#define GL_RESAMPLE_REPLICATE_SGIX 0x842E +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#endif + +#ifndef GL_SGIS_point_line_texgen +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#endif + +#ifndef GL_SGIS_texture_color_mask +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +#endif + +#ifndef GL_EXT_texture_env_dot3 +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT3_RGBA_EXT 0x8741 +#endif + +#ifndef GL_ATI_texture_mirror_once +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#endif + +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#endif + +#ifndef GL_NV_evaluators +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +#endif + +#ifndef GL_NV_packed_depth_stencil +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#endif + +#ifndef GL_NV_register_combiners2 +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +#endif + +#ifndef GL_NV_texture_compression_vtc +#endif + +#ifndef GL_NV_texture_rectangle +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#endif + +#ifndef GL_NV_texture_shader +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV +#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV +#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#endif + +#ifndef GL_NV_texture_shader2 +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#endif + +#ifndef GL_NV_vertex_array_range2 +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#endif + +#ifndef GL_NV_vertex_program +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +#endif + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#endif + +#ifndef GL_SGIX_scalebias_hint +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#endif + +#ifndef GL_OML_interlace +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 +#endif + +#ifndef GL_OML_subsample +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#endif + +#ifndef GL_OML_resample +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#endif + +#ifndef GL_NV_copy_depth_to_color +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#endif + +#ifndef GL_ATI_envmap_bumpmap +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C +#endif + +#ifndef GL_ATI_fragment_shader +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_RED_BIT_ATI 0x00000001 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 +#endif + +#ifndef GL_ATI_pn_triangles +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +#endif + +#ifndef GL_ATI_vertex_array_object +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +#endif + +#ifndef GL_EXT_vertex_shader +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +#endif + +#ifndef GL_ATI_vertex_streams +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SOURCE_ATI 0x8774 +#endif + +#ifndef GL_ATI_element_array +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +#endif + +#ifndef GL_SUN_mesh_array +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_DEPTH_CLAMP_NV 0x864F +#endif + +#ifndef GL_NV_occlusion_query +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +#endif + +#ifndef GL_NV_point_sprite +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif + +#ifndef GL_NV_vertex_program1_1 +#endif + +#ifndef GL_EXT_shadow_funcs +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif + +#ifndef GL_APPLE_element_array +#define GL_ELEMENT_ARRAY_APPLE 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A +#endif + +#ifndef GL_APPLE_fence +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#endif + +#ifndef GL_S3_s3tc +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif + +#ifndef GL_ATI_texture_float +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif + +#ifndef GL_NV_float_buffer +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif + +#ifndef GL_NV_fragment_program +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +#endif + +#ifndef GL_NV_half_float +#define GL_HALF_FLOAT_NV 0x140B +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +#endif + +#ifndef GL_NV_primitive_restart +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif + +#ifndef GL_NV_vertex_program2 +#endif + +#ifndef GL_ATI_map_object_buffer +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#endif + +#ifndef GL_OES_read_format +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +#endif + +#ifndef GL_MESA_pack_invert +#define GL_PACK_INVERT_MESA 0x8758 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif + +#ifndef GL_NV_fragment_program_option +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#endif + +#ifndef GL_NV_vertex_program2_option +/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ +/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ +#endif + +#ifndef GL_NV_vertex_program3 +/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ +#endif + +#ifndef GL_EXT_framebuffer_object +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +#endif + +#ifndef GL_GREMEDY_string_marker +#endif + +#ifndef GL_EXT_packed_depth_stencil +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#endif + +#ifndef GL_EXT_stencil_clear_tag +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +#endif + +#ifndef GL_EXT_texture_sRGB +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +#endif + +#ifndef GL_EXT_framebuffer_multisample +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +#endif + +#ifndef GL_MESAX_texture_stack +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#endif + +#ifndef GL_EXT_timer_query +#define GL_TIME_ELAPSED_EXT 0x88BF +#endif + +#ifndef GL_EXT_gpu_program_parameters +#endif + +#ifndef GL_APPLE_flush_buffer_range +#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 +#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 +#endif + +#ifndef GL_NV_gpu_program4 +#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +#endif + +#ifndef GL_NV_geometry_program4 +#define GL_LINES_ADJACENCY_EXT 0x000A +#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B +#define GL_TRIANGLES_ADJACENCY_EXT 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +#endif + +#ifndef GL_EXT_geometry_shader4 +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */ +/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */ +/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */ +/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */ +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +/* reuse GL_LINES_ADJACENCY_EXT */ +/* reuse GL_LINE_STRIP_ADJACENCY_EXT */ +/* reuse GL_TRIANGLES_ADJACENCY_EXT */ +/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ +/* reuse GL_PROGRAM_POINT_SIZE_EXT */ +#endif + +#ifndef GL_NV_vertex_program4 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD +#endif + +#ifndef GL_EXT_gpu_shader4 +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#endif + +#ifndef GL_EXT_draw_instanced +#endif + +#ifndef GL_EXT_packed_float +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#endif + +#ifndef GL_EXT_texture_array +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ +#endif + +#ifndef GL_EXT_texture_buffer_object +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +#endif + +#ifndef GL_EXT_texture_compression_latc +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#endif + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif + +#ifndef GL_EXT_texture_shared_exponent +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#endif + +#ifndef GL_NV_depth_buffer_float +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +#endif + +#ifndef GL_NV_fragment_program4 +#endif + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +#endif + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#endif + +#ifndef GL_NV_geometry_shader4 +#endif + +#ifndef GL_NV_parameter_buffer_object +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 +#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 +#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 +#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 +#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 +#endif + +#ifndef GL_EXT_draw_buffers2 +#endif + +#ifndef GL_NV_transform_feedback +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#endif + +#ifndef GL_EXT_bindable_uniform +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +#endif + +#ifndef GL_EXT_texture_integer +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGB8UI_EXT 0x8D7D +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGB32I_EXT 0x8D83 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGB16I_EXT 0x8D89 +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGB8I_EXT 0x8D8F +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +#endif + +#ifndef GL_GREMEDY_frame_terminator +#endif + +#ifndef GL_NV_conditional_render +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +#endif + +#ifndef GL_NV_present_video +#define GL_FRAME_NV 0x8E26 +#define GL_FIELDS_NV 0x8E27 +#define GL_CURRENT_TIME_NV 0x8E28 +#define GL_NUM_FILL_STREAMS_NV 0x8E29 +#define GL_PRESENT_TIME_NV 0x8E2A +#define GL_PRESENT_DURATION_NV 0x8E2B +#endif + +#ifndef GL_EXT_transform_feedback +#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F +#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C +#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D +#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 +#define GL_RASTERIZER_DISCARD_EXT 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 +#endif + +#ifndef GL_EXT_direct_state_access +#define GL_PROGRAM_MATRIX_EXT 0x8E2D +#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E +#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F +#endif + +#ifndef GL_EXT_vertex_array_bgra +/* reuse GL_BGRA */ +#endif + +#ifndef GL_EXT_texture_swizzle +#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 +#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 +#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 +#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_SAMPLE_POSITION_NV 0x8E50 +#define GL_SAMPLE_MASK_NV 0x8E51 +#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 +#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 +#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 +#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 +#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 +#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 +#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 +#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 +#endif + + +/*************************************************************/ + +#include +#ifndef GL_VERSION_2_0 +/* GL type for program/shader text */ +typedef char GLchar; /* native character */ +#endif + +#ifndef GL_VERSION_1_5 +/* GL types for handling large vertex buffer objects */ +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +#endif + +#ifndef GL_ARB_vertex_buffer_object +/* GL types for handling large vertex buffer objects */ +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +#endif + +#ifndef GL_ARB_shader_objects +/* GL types for handling shader object handles and program/shader text */ +typedef char GLcharARB; /* native character */ +typedef unsigned int GLhandleARB; /* shader object handle */ +#endif + +/* GL types for "half" precision (s10e5) float data in host memory */ +#ifndef GL_ARB_half_float_pixel +typedef unsigned short GLhalfARB; +#endif + +#ifndef GL_NV_half_float +typedef unsigned short GLhalfNV; +#endif + +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glxext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GL_EXT_timer_query extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +#elif defined(__sun__) || defined(__digital__) +#include +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include +#elif defined(__SCO__) || defined(__USLC__) +#include +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +#include /* Fallback option */ +#endif +#endif + +#ifndef GL_EXT_timer_query +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +#endif + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf); +GLAPI void APIENTRY glBlendEquation (GLenum); +GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); +GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei); +GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei); +GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint); +GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei); +GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); +GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); +GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean); +GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean); +GLAPI void APIENTRY glResetHistogram (GLenum); +GLAPI void APIENTRY glResetMinmax (GLenum); +GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTexture (GLenum); +GLAPI void APIENTRY glClientActiveTexture (GLenum); +GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble); +GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat); +GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint); +GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort); +GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *); +GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble); +GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat); +GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint); +GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort); +GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *); +GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint); +GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *); +GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *); +GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *); +GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *); +GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *); +GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *); +GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean); +GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); +#endif + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glFogCoordf (GLfloat); +GLAPI void APIENTRY glFogCoordfv (const GLfloat *); +GLAPI void APIENTRY glFogCoordd (GLdouble); +GLAPI void APIENTRY glFogCoorddv (const GLdouble *); +GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei); +GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); +GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat); +GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *); +GLAPI void APIENTRY glPointParameteri (GLenum, GLint); +GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *); +GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte); +GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *); +GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *); +GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *); +GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint); +GLAPI void APIENTRY glSecondaryColor3iv (const GLint *); +GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *); +GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte); +GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *); +GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint); +GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *); +GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort); +GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *); +GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos2dv (const GLdouble *); +GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos2fv (const GLfloat *); +GLAPI void APIENTRY glWindowPos2i (GLint, GLint); +GLAPI void APIENTRY glWindowPos2iv (const GLint *); +GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort); +GLAPI void APIENTRY glWindowPos2sv (const GLshort *); +GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos3dv (const GLdouble *); +GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos3fv (const GLfloat *); +GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint); +GLAPI void APIENTRY glWindowPos3iv (const GLint *); +GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glWindowPos3sv (const GLshort *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +#endif + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *); +GLAPI GLboolean APIENTRY glIsQuery (GLuint); +GLAPI void APIENTRY glBeginQuery (GLenum, GLuint); +GLAPI void APIENTRY glEndQuery (GLenum); +GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *); +GLAPI void APIENTRY glBindBuffer (GLenum, GLuint); +GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsBuffer (GLuint); +GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum); +GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *); +GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *); +GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum); +GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum); +GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum); +GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *); +GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint); +GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint); +GLAPI void APIENTRY glAttachShader (GLuint, GLuint); +GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *); +GLAPI void APIENTRY glCompileShader (GLuint); +GLAPI GLuint APIENTRY glCreateProgram (void); +GLAPI GLuint APIENTRY glCreateShader (GLenum); +GLAPI void APIENTRY glDeleteProgram (GLuint); +GLAPI void APIENTRY glDeleteShader (GLuint); +GLAPI void APIENTRY glDetachShader (GLuint, GLuint); +GLAPI void APIENTRY glDisableVertexAttribArray (GLuint); +GLAPI void APIENTRY glEnableVertexAttribArray (GLuint); +GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); +GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); +GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *); +GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *); +GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); +GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); +GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *); +GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *); +GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *); +GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *); +GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *); +GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *); +GLAPI GLboolean APIENTRY glIsProgram (GLuint); +GLAPI GLboolean APIENTRY glIsShader (GLuint); +GLAPI void APIENTRY glLinkProgram (GLuint); +GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *); +GLAPI void APIENTRY glUseProgram (GLuint); +GLAPI void APIENTRY glUniform1f (GLint, GLfloat); +GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform1i (GLint, GLint); +GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint); +GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glValidateProgram (GLuint); +GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble); +GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat); +GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort); +GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *); +GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); +GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *); +GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *); +GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *); +GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *); +GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *); +GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +#endif + +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +/* OpenGL 3.0 also reuses entry points from these extensions: */ +/* ARB_framebuffer_object */ +/* ARB_map_buffer_range */ +/* ARB_vertex_array_object */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaski (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); +GLAPI void APIENTRY glGetBooleani_v (GLenum, GLuint, GLboolean *); +GLAPI void APIENTRY glGetIntegeri_v (GLenum, GLuint, GLint *); +GLAPI void APIENTRY glEnablei (GLenum, GLuint); +GLAPI void APIENTRY glDisablei (GLenum, GLuint); +GLAPI GLboolean APIENTRY glIsEnabledi (GLenum, GLuint); +GLAPI void APIENTRY glBeginTransformFeedback (GLenum); +GLAPI void APIENTRY glEndTransformFeedback (void); +GLAPI void APIENTRY glBindBufferRange (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); +GLAPI void APIENTRY glBindBufferBase (GLenum, GLuint, GLuint); +GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLint *, GLenum); +GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLint *); +GLAPI void APIENTRY glClampColor (GLenum, GLenum); +GLAPI void APIENTRY glBeginConditionalRender (GLuint, GLenum); +GLAPI void APIENTRY glEndConditionalRender (void); +GLAPI void APIENTRY glVertexAttribI1i (GLuint, GLint); +GLAPI void APIENTRY glVertexAttribI2i (GLuint, GLint, GLint); +GLAPI void APIENTRY glVertexAttribI3i (GLuint, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexAttribI4i (GLuint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexAttribI1ui (GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI2ui (GLuint, GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI3ui (GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI4ui (GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI1iv (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI2iv (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI3iv (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI4iv (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI1uiv (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI2uiv (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI3uiv (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI4uiv (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI4bv (GLuint, const GLbyte *); +GLAPI void APIENTRY glVertexAttribI4sv (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttribI4ubv (GLuint, const GLubyte *); +GLAPI void APIENTRY glVertexAttribI4usv (GLuint, const GLushort *); +GLAPI void APIENTRY glVertexAttribIPointer (GLuint, GLint, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glGetVertexAttribIiv (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint, GLenum, GLuint *); +GLAPI void APIENTRY glGetUniformuiv (GLuint, GLint, GLuint *); +GLAPI void APIENTRY glBindFragDataLocation (GLuint, GLuint, const GLchar *); +GLAPI GLint APIENTRY glGetFragDataLocation (GLuint, const GLchar *); +GLAPI void APIENTRY glUniform1ui (GLint, GLuint); +GLAPI void APIENTRY glUniform2ui (GLint, GLuint, GLuint); +GLAPI void APIENTRY glUniform3ui (GLint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glUniform4ui (GLint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glUniform1uiv (GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glUniform2uiv (GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glUniform3uiv (GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glUniform4uiv (GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glTexParameterIiv (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glTexParameterIuiv (GLenum, GLenum, const GLuint *); +GLAPI void APIENTRY glGetTexParameterIiv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetTexParameterIuiv (GLenum, GLenum, GLuint *); +GLAPI void APIENTRY glClearBufferiv (GLenum, GLint, const GLint *); +GLAPI void APIENTRY glClearBufferuiv (GLenum, GLint, const GLuint *); +GLAPI void APIENTRY glClearBufferfv (GLenum, GLint, const GLfloat *); +GLAPI void APIENTRY glClearBufferfi (GLenum, GLint, GLfloat, GLint); +GLAPI const GLubyte * APIENTRY glGetStringi (GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +#endif + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveTextureARB (GLenum); +GLAPI void APIENTRY glClientActiveTextureARB (GLenum); +GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble); +GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat); +GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint); +GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort); +GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *); +GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble); +GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat); +GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint); +GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort); +GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *); +GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint); +GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *); +GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *); +GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *); +GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *); +GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +#endif + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); +#endif + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 +#endif + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 +#endif + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat); +GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *); +GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *); +GLAPI void APIENTRY glWeightivARB (GLint, const GLint *); +GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *); +GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *); +GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *); +GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *); +GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *); +GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glVertexBlendARB (GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint); +GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *); +GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *); +GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *); +GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 +#endif + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 +#endif + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 +#endif + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *); +GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *); +GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint); +GLAPI void APIENTRY glWindowPos2ivARB (const GLint *); +GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort); +GLAPI void APIENTRY glWindowPos2svARB (const GLshort *); +GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *); +GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *); +GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint); +GLAPI void APIENTRY glWindowPos3ivARB (const GLint *); +GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glWindowPos3svARB (const GLshort *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +#endif + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble); +GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat); +GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort); +GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *); +GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); +GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *); +GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *); +GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *); +GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *); +GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *); +GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); +GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint); +GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint); +GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint); +GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *); +GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *); +GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *); +GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *); +GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *); +GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *); +GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *); +GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *); +GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *); +GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *); +GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *); +GLAPI GLboolean APIENTRY glIsProgramARB (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +#endif + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 +/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint); +GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsBufferARB (GLuint); +GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); +GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *); +GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *); +GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum); +GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum); +GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *); +GLAPI GLboolean APIENTRY glIsQueryARB (GLuint); +GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint); +GLAPI void APIENTRY glEndQueryARB (GLenum); +GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB); +GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum); +GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB); +GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum); +GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); +GLAPI void APIENTRY glCompileShaderARB (GLhandleARB); +GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); +GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB); +GLAPI void APIENTRY glLinkProgramARB (GLhandleARB); +GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB); +GLAPI void APIENTRY glValidateProgramARB (GLhandleARB); +GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat); +GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform1iARB (GLint, GLint); +GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint); +GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *); +GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *); +GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); +GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); +GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *); +GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); +GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *); +GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *); +GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *); +GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); +GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#endif + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 +#endif + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClampColorARB (GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +#endif + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel 1 +#endif + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float 1 +#endif + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 +#endif + +#ifndef GL_ARB_depth_buffer_float +#define GL_ARB_depth_buffer_float 1 +#endif + +#ifndef GL_ARB_draw_instanced +#define GL_ARB_draw_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif + +#ifndef GL_ARB_framebuffer_object +#define GL_ARB_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint); +GLAPI void APIENTRY glBindRenderbuffer (GLenum, GLuint); +GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenRenderbuffers (GLsizei, GLuint *); +GLAPI void APIENTRY glRenderbufferStorage (GLenum, GLenum, GLsizei, GLsizei); +GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum, GLenum, GLint *); +GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint); +GLAPI void APIENTRY glBindFramebuffer (GLenum, GLuint); +GLAPI void APIENTRY glDeleteFramebuffers (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenFramebuffers (GLsizei, GLuint *); +GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum); +GLAPI void APIENTRY glFramebufferTexture1D (GLenum, GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glFramebufferTexture2D (GLenum, GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glFramebufferTexture3D (GLenum, GLenum, GLenum, GLuint, GLint, GLint); +GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum, GLenum, GLenum, GLuint); +GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGenerateMipmap (GLenum); +GLAPI void APIENTRY glBlitFramebuffer (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); +GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GLAPI void APIENTRY glFramebufferTextureLayer (GLenum, GLenum, GLuint, GLint, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif + +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB 1 +#endif + +#ifndef GL_ARB_geometry_shader4 +#define GL_ARB_geometry_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriARB (GLuint, GLenum, GLint); +GLAPI void APIENTRY glFramebufferTextureARB (GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum, GLenum, GLuint, GLint, GLint); +GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum, GLenum, GLuint, GLint, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif + +#ifndef GL_ARB_half_float_vertex +#define GL_ARB_half_float_vertex 1 +#endif + +#ifndef GL_ARB_instanced_arrays +#define GL_ARB_instanced_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisor (GLuint, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +#endif + +#ifndef GL_ARB_map_buffer_range +#define GL_ARB_map_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMapBufferRange (GLenum, GLintptr, GLsizeiptr, GLbitfield); +GLAPI void APIENTRY glFlushMappedBufferRange (GLenum, GLintptr, GLsizeiptr); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +#endif + +#ifndef GL_ARB_texture_buffer_object +#define GL_ARB_texture_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferARB (GLenum, GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#endif + +#ifndef GL_ARB_texture_compression_rgtc +#define GL_ARB_texture_compression_rgtc 1 +#endif + +#ifndef GL_ARB_texture_rg +#define GL_ARB_texture_rg 1 +#endif + +#ifndef GL_ARB_vertex_array_object +#define GL_ARB_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArray (GLuint); +GLAPI void APIENTRY glDeleteVertexArrays (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenVertexArrays (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsVertexArray (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); +#endif + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 +#endif + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +#endif + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +#endif + +#ifndef GL_EXT_texture +#define GL_EXT_texture 1 +#endif + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +#endif + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); +GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); +GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei); +GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +#endif + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean); +GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean); +GLAPI void APIENTRY glResetHistogramEXT (GLenum); +GLAPI void APIENTRY glResetMinmaxEXT (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); +#endif + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint); +GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei); +GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); +GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +#endif + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix 1 +#endif + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei); +GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); +#endif + +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenSGIX (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +#endif + +#ifndef GL_SGIS_pixel_texture +#define GL_SGIS_pixel_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint); +GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *); +GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat); +GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *); +GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *); +GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); +#endif + +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +#endif + +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table 1 +#endif + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka 1 +#endif + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *); +GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint); +GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint); +GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +#endif + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *); +GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#endif + +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *); +GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +#endif + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels 1 +#endif + +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod 1 +#endif + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean); +GLAPI void APIENTRY glSamplePatternSGIS (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +#endif + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal 1 +#endif + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glArrayElementEXT (GLint); +GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); +GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei); +GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *); +GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *); +GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); +GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); +GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); +GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); +typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_misc_attribute +#define GL_EXT_misc_attribute 1 +#endif + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 +#endif + +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap 1 +#endif + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 +#endif + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp 1 +#endif + +#ifndef GL_SGIS_texture_border_clamp +#define GL_SGIS_texture_border_clamp 1 +#endif + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationEXT (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 +#endif + +#ifndef GL_EXT_blend_logic_op +#define GL_EXT_blend_logic_op 1 +#endif + +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace 1 +#endif + +#ifndef GL_SGIX_pixel_tiles +#define GL_SGIX_pixel_tiles 1 +#endif + +#ifndef GL_SGIX_texture_select +#define GL_SGIX_texture_select 1 +#endif + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat); +GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *); +GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint); +GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer 1 +#endif + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat); +GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_SGIS_point_parameters +#define GL_SGIS_point_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat); +GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_SGIX_instruments +#define GL_SGIX_instruments 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); +GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *); +GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *); +GLAPI void APIENTRY glReadInstrumentsSGIX (GLint); +GLAPI void APIENTRY glStartInstrumentsSGIX (void); +GLAPI void APIENTRY glStopInstrumentsSGIX (GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +#endif + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias 1 +#endif + +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameZoomSGIX (GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +#endif + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTagSampleBufferSGIX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +#endif + +#ifndef GL_SGIX_polynomial_ffd +#define GL_SGIX_polynomial_ffd 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *); +GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *); +GLAPI void APIENTRY glDeformSGIX (GLbitfield); +GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +#endif + +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +#endif + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushRasterSGIX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); +#endif + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 +#endif + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *); +GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +#endif + +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset 1 +#endif + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint); +GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes 1 +#endif + +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env 1 +#endif + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +#endif + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints 1 +#endif + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glHintPGI (GLenum, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); +#endif + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint 1 +#endif + +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat); +GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *); +GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint); +GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +#endif + +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 1 +#endif + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_SGIX_calligraphic_fragment 1 +#endif + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias 1 +#endif + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient 1 +#endif + +#ifndef GL_EXT_index_texture +#define GL_EXT_index_texture 1 +#endif + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +#endif + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +#endif + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats 1 +#endif + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei); +GLAPI void APIENTRY glUnlockArraysEXT (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); +#endif + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *); +GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +#endif + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb 1 +#endif + +#ifndef GL_SGIX_fragment_lighting +#define GL_SGIX_fragment_lighting 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum); +GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint); +GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat); +GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *); +GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint); +GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *); +GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint); +GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +#endif + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip 1 +#endif + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting 1 +#endif + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +#endif + +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading 1 +#endif + +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog 1 +#endif + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyTextureEXT (GLenum); +GLAPI void APIENTRY glTextureLightEXT (GLenum); +GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +#endif + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax 1 +#endif + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 +#endif + +#ifndef GL_SGIX_async +#define GL_SGIX_async 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint); +GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *); +GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *); +GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei); +GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei); +GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +#endif + +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel 1 +#endif + +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram 1 +#endif + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *); +GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *); +GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *); +GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +#endif + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 +#endif + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint); +GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +#endif + +#ifndef GL_EXT_pixel_transform_color_table +#define GL_EXT_pixel_transform_color_table 1 +#endif + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette 1 +#endif + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 +#endif + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte); +GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *); +GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *); +GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *); +GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint); +GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *); +GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *); +GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte); +GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *); +GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint); +GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *); +GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort); +GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *); +GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureNormalEXT (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +#endif + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); +GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFogCoordfEXT (GLfloat); +GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *); +GLAPI void APIENTRY glFogCoorddEXT (GLdouble); +GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *); +GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates 1 +#endif + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte); +GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *); +GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *); +GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *); +GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint); +GLAPI void APIENTRY glTangent3ivEXT (const GLint *); +GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glTangent3svEXT (const GLshort *); +GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte); +GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *); +GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *); +GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *); +GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint); +GLAPI void APIENTRY glBinormal3ivEXT (const GLint *); +GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glBinormal3svEXT (const GLshort *); +GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 +#endif + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector 1 +#endif + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint 1 +#endif + +#ifndef GL_SGIX_fog_scale +#define GL_SGIX_fog_scale 1 +#endif + +#ifndef GL_SUNX_constant_data +#define GL_SUNX_constant_data 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFinishTextureSUNX (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); +#endif + +#ifndef GL_SUN_global_alpha +#define GL_SUN_global_alpha 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte); +GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort); +GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint); +GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat); +GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble); +GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte); +GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort); +GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +#endif + +#ifndef GL_SUN_triangle_list +#define GL_SUN_triangle_list 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint); +GLAPI void APIENTRY glReplacementCodeusSUN (GLushort); +GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte); +GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *); +GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *); +GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *); +GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); +#endif + +#ifndef GL_SUN_vertex +#define GL_SUN_vertex 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat); +GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *); +GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *); +GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +#endif + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif + +#ifndef GL_INGR_blend_func_separate +#define GL_INGR_blend_func_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +#endif + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp 1 +#endif + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read 1 +#endif + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 +#endif + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels 1 +#endif + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 +#endif + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes 1 +#endif + +#ifndef GL_EXT_texture_env_add +#define GL_EXT_texture_env_add 1 +#endif + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#endif + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexWeightfEXT (GLfloat); +GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *); +GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +#endif + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 +#endif + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); +GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); +#endif + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *); +GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat); +GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *); +GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint); +GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean); +GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +#endif + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 +#endif + +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss 1 +#endif + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 +#endif + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 +#endif + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glResizeBuffersMESA (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); +#endif + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *); +GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *); +GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint); +GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *); +GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort); +GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *); +GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *); +GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *); +GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint); +GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *); +GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort); +GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *); +GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *); +GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *); +GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *); +GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +#endif + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex 1 +#endif + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint); +GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +#endif + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); +GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); +GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint); +GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); +GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); +GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); +GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); +GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +#endif + +#ifndef GL_SGIX_subsample +#define GL_SGIX_subsample 1 +#endif + +#ifndef GL_SGIX_ycrcba +#define GL_SGIX_ycrcba 1 +#endif + +#ifndef GL_SGIX_ycrcb_subsample +#define GL_SGIX_ycrcb_subsample 1 +#endif + +#ifndef GL_SGIX_depth_pass_instrument +#define GL_SGIX_depth_pass_instrument 1 +#endif + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 1 +#endif + +#ifndef GL_3DFX_multisample +#define GL_3DFX_multisample 1 +#endif + +#ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTbufferMask3DFX (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +#endif + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean); +GLAPI void APIENTRY glSamplePatternEXT (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +#endif + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip 1 +#endif + +#ifndef GL_SGIX_convolution_accuracy +#define GL_SGIX_convolution_accuracy 1 +#endif + +#ifndef GL_SGIX_resample +#define GL_SGIX_resample 1 +#endif + +#ifndef GL_SGIS_point_line_texgen +#define GL_SGIS_point_line_texgen 1 +#endif + +#ifndef GL_SGIS_texture_color_mask +#define GL_SGIS_texture_color_mask 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +#endif + +#ifndef GL_SGIX_igloo_interface +#define GL_SGIX_igloo_interface 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +#endif + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 1 +#endif + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 +#endif + +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsFenceNV (GLuint); +GLAPI GLboolean APIENTRY glTestFenceNV (GLuint); +GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glFinishFenceNV (GLuint); +GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#endif + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *); +GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *); +GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +#endif + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 +#endif + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +#endif + +#ifndef GL_NV_texture_compression_vtc +#define GL_NV_texture_compression_vtc 1 +#endif + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 +#endif + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 +#endif + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 1 +#endif + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 +#endif + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *); +GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint); +GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *); +GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *); +GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *); +GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *); +GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *); +GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *); +GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *); +GLAPI GLboolean APIENTRY glIsProgramNV (GLuint); +GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *); +GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *); +GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *); +GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *); +GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *); +GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *); +GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum); +GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble); +GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat); +GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort); +GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *); +GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *); +GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); +GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *); +GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *); +GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *); +GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *); +GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *); +GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *); +GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *); +GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *); +GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); +GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); +typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +#endif + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp 1 +#endif + +#ifndef GL_SGIX_scalebias_hint +#define GL_SGIX_scalebias_hint 1 +#endif + +#ifndef GL_OML_interlace +#define GL_OML_interlace 1 +#endif + +#ifndef GL_OML_subsample +#define GL_OML_subsample 1 +#endif + +#ifndef GL_OML_resample +#define GL_OML_resample 1 +#endif + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 +#endif + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *); +GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *); +GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +#endif + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint); +GLAPI void APIENTRY glBindFragmentShaderATI (GLuint); +GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint); +GLAPI void APIENTRY glBeginFragmentShaderATI (void); +GLAPI void APIENTRY glEndFragmentShaderATI (void); +GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum); +GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum); +GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +#endif + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint); +GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +#endif + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum); +GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint); +GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum); +GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glFreeObjectBufferATI (GLuint); +GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint); +GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint); +GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +#endif + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginVertexShaderEXT (void); +GLAPI void APIENTRY glEndVertexShaderEXT (void); +GLAPI void APIENTRY glBindVertexShaderEXT (GLuint); +GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint); +GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint); +GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint); +GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint); +GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint); +GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint); +GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *); +GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *); +GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *); +GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *); +GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *); +GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *); +GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *); +GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *); +GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *); +GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *); +GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *); +GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint); +GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint); +GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum); +GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum); +GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum); +GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum); +GLAPI GLuint APIENTRY glBindParameterEXT (GLenum); +GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum); +GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *); +GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *); +GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *); +GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *); +GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); +typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +#endif + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort); +GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint); +GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat); +GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble); +GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort); +GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint); +GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte); +GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *); +GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort); +GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *); +GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint); +GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *); +GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *); +GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *); +GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum); +GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint); +GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +#endif + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *); +GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei); +GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +#endif + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +#endif + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 +#endif + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 +#endif + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 +#endif + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *); +GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint); +GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint); +GLAPI void APIENTRY glEndOcclusionQueryNV (void); +GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint); +GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +#endif + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 +#endif + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 +#endif + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 +#endif + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 +#endif + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *); +GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei); +GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei); +GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei); +GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *); +GLAPI void APIENTRY glSetFenceAPPLE (GLuint); +GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint); +GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint); +GLAPI void APIENTRY glFinishFenceAPPLE (GLuint); +GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint); +GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint); +GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *); +GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *); +GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 +#endif + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_ATI_pixel_format_float 1 +/* This is really a WGL extension, but defines some associated GL enums. + * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. + */ +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 +#endif + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 +#endif + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 +#endif + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 +/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *); +GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *); +GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *); +GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#endif + +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *); +GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV); +GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glFogCoordhNV (GLhalfNV); +GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *); +GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV); +GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *); +GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +#endif + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveRestartNV (void); +GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 +#endif + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 +#endif + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint); +GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint); +GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +#endif + +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +#endif + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 +#endif + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 +#endif + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 +#endif + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 +#endif + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint); +GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint); +GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *); +GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei); +GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *); +GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint); +GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint); +GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *); +GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum); +GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint); +GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint); +GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGenerateMipmapEXT (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +#endif + +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); +#endif + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil 1 +#endif + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +#endif + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB 1 +#endif + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack 1 +#endif + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *); +GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); +#endif + +#ifndef GL_EXT_gpu_program_parameters +#define GL_EXT_gpu_program_parameters 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +#endif + +#ifndef GL_APPLE_flush_buffer_range +#define GL_APPLE_flush_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint); +GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); +#endif + +#ifndef GL_NV_gpu_program4 +#define GL_NV_gpu_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *); +GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *); +GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *); +GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *); +GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *); +GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *); +GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *); +GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *); +GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *); +GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *); +GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *); +GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +#endif + +#ifndef GL_NV_geometry_program4 +#define GL_NV_geometry_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint); +GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint); +GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +#endif + +#ifndef GL_EXT_geometry_shader4 +#define GL_EXT_geometry_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +#endif + +#ifndef GL_NV_vertex_program4 +#define GL_NV_vertex_program4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint); +GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint); +GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *); +GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *); +GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *); +GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *); +GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *); +GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *); +GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); +#endif + +#ifndef GL_EXT_gpu_shader4 +#define GL_EXT_gpu_shader4 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *); +GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *); +GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *); +GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint); +GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint); +GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +#endif + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +#endif + +#ifndef GL_EXT_packed_float +#define GL_EXT_packed_float 1 +#endif + +#ifndef GL_EXT_texture_array +#define GL_EXT_texture_array 1 +#endif + +#ifndef GL_EXT_texture_buffer_object +#define GL_EXT_texture_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +#endif + +#ifndef GL_EXT_texture_compression_latc +#define GL_EXT_texture_compression_latc 1 +#endif + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc 1 +#endif + +#ifndef GL_EXT_texture_shared_exponent +#define GL_EXT_texture_shared_exponent 1 +#endif + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble); +GLAPI void APIENTRY glClearDepthdNV (GLdouble); +GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +#endif + +#ifndef GL_NV_fragment_program4 +#define GL_NV_fragment_program4 1 +#endif + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +#endif + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_EXT_framebuffer_sRGB 1 +#endif + +#ifndef GL_NV_geometry_shader4 +#define GL_NV_geometry_shader4 1 +#endif + +#ifndef GL_NV_parameter_buffer_object +#define GL_NV_parameter_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *); +GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +#endif + +#ifndef GL_EXT_draw_buffers2 +#define GL_EXT_draw_buffers2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); +GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *); +GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *); +GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint); +GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint); +GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +#endif + +#ifndef GL_NV_transform_feedback +#define GL_NV_transform_feedback 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum); +GLAPI void APIENTRY glEndTransformFeedbackNV (void); +GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum); +GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); +GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr); +GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint); +GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum); +GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *); +GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *); +GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *); +GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +#endif + +#ifndef GL_EXT_bindable_uniform +#define GL_EXT_bindable_uniform 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint); +GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint); +GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +#endif + +#ifndef GL_EXT_texture_integer +#define GL_EXT_texture_integer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *); +GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *); +GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +#endif + +#ifndef GL_GREMEDY_frame_terminator +#define GL_GREMEDY_frame_terminator 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); +#endif + +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint, GLenum); +GLAPI void APIENTRY glEndConditionalRenderNV (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#endif + +#ifndef GL_NV_present_video +#define GL_NV_present_video 1 +#endif + +#ifndef GL_EXT_transform_feedback +#define GL_EXT_transform_feedback 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum); +GLAPI void APIENTRY glEndTransformFeedbackEXT (void); +GLAPI void APIENTRY glBindBufferRangeEXT (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); +GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum, GLuint, GLuint, GLintptr); +GLAPI void APIENTRY glBindBufferBaseEXT (GLenum, GLuint, GLuint); +GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLint *, GLenum); +GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLint *location); +#endif + +#ifndef GL_EXT_direct_state_access +#define GL_EXT_direct_state_access 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield); +GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield); +GLAPI void APIENTRY glMatrixLoadfEXT (GLenum, const GLfloat *); +GLAPI void APIENTRY glMatrixLoaddEXT (GLenum, const GLdouble *); +GLAPI void APIENTRY glMatrixMultfEXT (GLenum, const GLfloat *); +GLAPI void APIENTRY glMatrixMultdEXT (GLenum, const GLdouble *); +GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum); +GLAPI void APIENTRY glMatrixRotatefEXT (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glMatrixRotatedEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMatrixScalefEXT (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glMatrixScaledEXT (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMatrixFrustumEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMatrixOrthoEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glMatrixPopEXT (GLenum); +GLAPI void APIENTRY glMatrixPushEXT (GLenum); +GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum, const GLfloat *); +GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum, const GLdouble *); +GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum, const GLfloat *); +GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum, const GLdouble *); +GLAPI void APIENTRY glTextureParameterfEXT (GLuint, GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glTextureParameterfvEXT (GLuint, GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glTextureParameteriEXT (GLuint, GLenum, GLenum, GLint); +GLAPI void APIENTRY glTextureParameterivEXT (GLuint, GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); +GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); +GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei); +GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glGetTextureImageEXT (GLuint, GLenum, GLint, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint, GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint, GLenum, GLint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint, GLenum, GLint, GLenum, GLint *); +GLAPI void APIENTRY glTextureImage3DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum, GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum, GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum, GLenum, GLenum, GLint); +GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum, GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); +GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); +GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei); +GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum, GLenum, GLint, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum, GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum, GLenum, GLint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum, GLenum, GLint, GLenum, GLint *); +GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +GLAPI void APIENTRY glBindMultiTextureEXT (GLenum, GLenum, GLuint); +GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum, GLuint); +GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum, GLuint); +GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum, GLint, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum, GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum, GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexEnviEXT (GLenum, GLenum, GLenum, GLint); +GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum, GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexGendEXT (GLenum, GLenum, GLenum, GLdouble); +GLAPI void APIENTRY glMultiTexGendvEXT (GLenum, GLenum, GLenum, const GLdouble *); +GLAPI void APIENTRY glMultiTexGenfEXT (GLenum, GLenum, GLenum, GLfloat); +GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum, GLenum, GLenum, const GLfloat *); +GLAPI void APIENTRY glMultiTexGeniEXT (GLenum, GLenum, GLenum, GLint); +GLAPI void APIENTRY glMultiTexGenivEXT (GLenum, GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum, GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum, GLenum, GLenum, GLdouble *); +GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum, GLenum, GLenum, GLfloat *); +GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum, GLuint, GLfloat *); +GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum, GLuint, GLdouble *); +GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum, GLuint, GLvoid* *); +GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint, GLenum, GLint, GLvoid *); +GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum, GLenum, GLint, GLvoid *); +GLAPI void APIENTRY glNamedProgramStringEXT (GLuint, GLenum, GLenum, GLsizei, const GLvoid *); +GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint, GLenum, GLuint, const GLdouble *); +GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint, GLenum, GLuint, const GLfloat *); +GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint, GLenum, GLuint, GLdouble *); +GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint, GLenum, GLuint, GLfloat *); +GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint, GLenum, GLenum, GLvoid *); +GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint, GLenum, GLuint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint, GLenum, GLuint, const GLint *); +GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint, GLenum, GLuint, GLsizei, const GLint *); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint, GLenum, GLuint, const GLuint *); +GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint, GLenum, GLuint, GLsizei, const GLuint *); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint, GLenum, GLuint, GLint *); +GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint, GLenum, GLuint, GLuint *); +GLAPI void APIENTRY glTextureParameterIivEXT (GLuint, GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint, GLenum, GLenum, const GLuint *); +GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint, GLenum, GLenum, GLuint *); +GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum, GLenum, GLenum, const GLint *); +GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum, GLenum, GLenum, const GLuint *); +GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum, GLenum, GLenum, GLuint *); +GLAPI void APIENTRY glProgramUniform1fEXT (GLuint, GLint, GLfloat); +GLAPI void APIENTRY glProgramUniform2fEXT (GLuint, GLint, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramUniform3fEXT (GLuint, GLint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramUniform4fEXT (GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramUniform1iEXT (GLuint, GLint, GLint); +GLAPI void APIENTRY glProgramUniform2iEXT (GLuint, GLint, GLint, GLint); +GLAPI void APIENTRY glProgramUniform3iEXT (GLuint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glProgramUniform4iEXT (GLuint, GLint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint, GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint, GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint, GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint, GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint, GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint, GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint, GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint, GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint, GLint, GLuint); +GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint, GLint, GLuint, GLuint); +GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint, GLint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint, GLint, GLuint, GLuint, GLuint, GLuint); +GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint, GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint, GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint, GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint, GLint, GLsizei, const GLuint *); +GLAPI void APIENTRY glNamedBufferDataEXT (GLuint, GLsizeiptr, const GLvoid *, GLenum); +GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint, GLintptr, GLsizeiptr, const GLvoid *); +GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint, GLenum); +GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint); +GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint, GLenum, GLvoid* *); +GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint, GLintptr, GLsizeiptr, GLvoid *); +GLAPI void APIENTRY glTextureBufferEXT (GLuint, GLenum, GLenum, GLuint); +GLAPI void APIENTRY glMultiTexBufferEXT (GLenum, GLenum, GLenum, GLuint); +GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint, GLenum, GLsizei, GLsizei); +GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint, GLenum, GLint *); +GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint, GLenum); +GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint, GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint, GLenum, GLenum, GLuint, GLint); +GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint, GLenum, GLenum, GLuint, GLint, GLint); +GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint, GLenum, GLenum, GLuint); +GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint, GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint, GLenum); +GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum, GLenum); +GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint, GLenum); +GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint, GLsizei, const GLenum *); +GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint, GLenum); +GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint, GLsizei, GLenum, GLsizei, GLsizei); +GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei); +GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint, GLenum, GLuint, GLint); +GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint, GLenum, GLuint, GLint, GLint); +GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint, GLenum, GLuint, GLint, GLenum); +GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint, GLenum, GLuint); +GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum, GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +#endif + +#ifndef GL_EXT_vertex_array_bgra +#define GL_EXT_vertex_array_bgra 1 +#endif + +#ifndef GL_EXT_texture_swizzle +#define GL_EXT_texture_swizzle 1 +#endif + +#ifndef GL_NV_explicit_multisample +#define GL_NV_explicit_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetMultisamplefvNV (GLenum, GLuint, GLfloat *); +GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint, GLbitfield); +GLAPI void APIENTRY glTexRenderbufferNV (GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +#endif + +#ifndef GL_NV_transform_feedback2 +#define GL_NV_transform_feedback2 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum, GLuint); +GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint); +GLAPI void APIENTRY glPauseTransformFeedbackNV (void); +GLAPI void APIENTRY glResumeTransformFeedbackNV (void); +GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ng/Togl2.1/GL_unused/glxext.h b/ng/Togl2.1/GL_unused/glxext.h new file mode 100644 index 00000000..536fb25a --- /dev/null +++ b/ng/Togl2.1/GL_unused/glxext.h @@ -0,0 +1,833 @@ +#ifndef __glxext_h_ +#define __glxext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glxext.h last updated 2008/10/22 */ +/* Current version at http://www.opengl.org/registry/ */ +#define GLX_GLXEXT_VERSION 21 + +#ifndef GLX_VERSION_1_3 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +#endif + +#ifndef GLX_VERSION_1_4 +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 +#endif + +#ifndef GLX_ARB_get_proc_address +#endif + +#ifndef GLX_ARB_multisample +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 +#endif + +#ifndef GLX_ARB_fbconfig_float +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#endif + +#ifndef GLX_ARB_create_context +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 +#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 +#endif + +#ifndef GLX_SGIS_multisample +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 +#endif + +#ifndef GLX_EXT_visual_info +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +#endif + +#ifndef GLX_SGI_swap_control +#endif + +#ifndef GLX_SGI_video_sync +#endif + +#ifndef GLX_SGI_make_current_read +#endif + +#ifndef GLX_SGIX_video_source +#endif + +#ifndef GLX_EXT_visual_rating +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +/* reuse GLX_NONE_EXT */ +#endif + +#ifndef GLX_EXT_import_context +#define GLX_SHARE_CONTEXT_EXT 0x800A +#define GLX_VISUAL_ID_EXT 0x800B +#define GLX_SCREEN_EXT 0x800C +#endif + +#ifndef GLX_SGIX_fbconfig +#define GLX_WINDOW_BIT_SGIX 0x00000001 +#define GLX_PIXMAP_BIT_SGIX 0x00000002 +#define GLX_RGBA_BIT_SGIX 0x00000001 +#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +#define GLX_DRAWABLE_TYPE_SGIX 0x8010 +#define GLX_RENDER_TYPE_SGIX 0x8011 +#define GLX_X_RENDERABLE_SGIX 0x8012 +#define GLX_FBCONFIG_ID_SGIX 0x8013 +#define GLX_RGBA_TYPE_SGIX 0x8014 +#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 +/* reuse GLX_SCREEN_EXT */ +#endif + +#ifndef GLX_SGIX_pbuffer +#define GLX_PBUFFER_BIT_SGIX 0x00000004 +#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +#define GLX_PRESERVED_CONTENTS_SGIX 0x801B +#define GLX_LARGEST_PBUFFER_SGIX 0x801C +#define GLX_WIDTH_SGIX 0x801D +#define GLX_HEIGHT_SGIX 0x801E +#define GLX_EVENT_MASK_SGIX 0x801F +#define GLX_DAMAGED_SGIX 0x8020 +#define GLX_SAVED_SGIX 0x8021 +#define GLX_WINDOW_SGIX 0x8022 +#define GLX_PBUFFER_SGIX 0x8023 +#endif + +#ifndef GLX_SGI_cushion +#endif + +#ifndef GLX_SGIX_video_resize +#define GLX_SYNC_FRAME_SGIX 0x00000000 +#define GLX_SYNC_SWAP_SGIX 0x00000001 +#endif + +#ifndef GLX_SGIX_dmbuffer +#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 +#endif + +#ifndef GLX_SGIX_swap_group +#endif + +#ifndef GLX_SGIX_swap_barrier +#endif + +#ifndef GLX_SGIS_blended_overlay +#define GLX_BLENDED_RGBA_SGIS 0x8025 +#endif + +#ifndef GLX_SGIS_shared_multisample +#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 +#endif + +#ifndef GLX_SUN_get_transparent_index +#endif + +#ifndef GLX_3DFX_multisample +#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +#define GLX_SAMPLES_3DFX 0x8051 +#endif + +#ifndef GLX_MESA_copy_sub_buffer +#endif + +#ifndef GLX_MESA_pixmap_colormap +#endif + +#ifndef GLX_MESA_release_buffers +#endif + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_3DFX_WINDOW_MODE_MESA 0x1 +#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 +#endif + +#ifndef GLX_SGIX_visual_select_group +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 +#endif + +#ifndef GLX_OML_swap_method +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 +#endif + +#ifndef GLX_OML_sync_control +#endif + +#ifndef GLX_NV_float_buffer +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 +#endif + +#ifndef GLX_SGIX_hyperpipe +#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +#define GLX_BAD_HYPERPIPE_SGIX 92 +#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +#define GLX_PIPE_RECT_SGIX 0x00000001 +#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +#define GLX_HYPERPIPE_ID_SGIX 0x8030 +#endif + +#ifndef GLX_MESA_agp_offset +#endif + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 +#endif + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 +#endif + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +#define GLX_BACK_EXT GLX_BACK_LEFT_EXT +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB +#endif + +#ifndef GLX_NV_present_video +#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef GLX_NV_video_out +#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 +#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 +#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 +#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 +#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 +#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA +#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB +#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC +#endif + +#ifndef GLX_NV_swap_group +#endif + + +/*************************************************************/ + +#ifndef GLX_ARB_get_proc_address +typedef void (*__GLXextFuncPtr)(void); +#endif + +#ifndef GLX_SGIX_video_source +typedef XID GLXVideoSourceSGIX; +#endif + +#ifndef GLX_SGIX_fbconfig +typedef XID GLXFBConfigIDSGIX; +typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; +#endif + +#ifndef GLX_SGIX_pbuffer +typedef XID GLXPbufferSGIX; +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came for SendEvent request */ + Display *display; /* display the event was read from */ + GLXDrawable drawable; /* i.d. of Drawable */ + int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ + int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ + unsigned int mask; /* mask indicating which buffers are affected*/ + int x, y; + int width, height; + int count; /* if nonzero, at least this many more */ +} GLXBufferClobberEventSGIX; +#endif + +#ifndef GLEXT_64_TYPES_DEFINED +/* This code block is duplicated in glext.h, so must be protected */ +#define GLEXT_64_TYPES_DEFINED +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GLX_OML_sync_control extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +#elif defined(__sun__) || defined(__digital__) +#include +#if defined(__STDC__) +#if defined(__arch64__) || defined(_LP64) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) || defined(__sgi) +#include +#elif defined(__SCO__) || defined(__USLC__) +#include +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(_WIN32) && defined(__GNUC__) +#include +#elif defined(_WIN32) +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +#include /* Fallback option */ +#endif +#endif + +#ifndef GLX_VERSION_1_3 +#define GLX_VERSION_1_3 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *); +extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *); +extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *); +extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig); +extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *); +extern void glXDestroyWindow (Display *, GLXWindow); +extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *); +extern void glXDestroyPixmap (Display *, GLXPixmap); +extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *); +extern void glXDestroyPbuffer (Display *, GLXPbuffer); +extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *); +extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool); +extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext); +extern GLXDrawable glXGetCurrentReadDrawable (void); +extern Display * glXGetCurrentDisplay (void); +extern int glXQueryContext (Display *, GLXContext, int, int *); +extern void glXSelectEvent (Display *, GLXDrawable, unsigned long); +extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); +typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); +typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); +typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); +typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); +typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); +typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); +typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +#endif + +#ifndef GLX_VERSION_1_4 +#define GLX_VERSION_1_4 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); +#endif + +#ifndef GLX_ARB_get_proc_address +#define GLX_ARB_get_proc_address 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); +#endif + +#ifndef GLX_ARB_multisample +#define GLX_ARB_multisample 1 +#endif + +#ifndef GLX_ARB_fbconfig_float +#define GLX_ARB_fbconfig_float 1 +#endif + +#ifndef GLX_ARB_create_context +#define GLX_ARB_create_context 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); +#endif + +#ifndef GLX_SGIS_multisample +#define GLX_SGIS_multisample 1 +#endif + +#ifndef GLX_EXT_visual_info +#define GLX_EXT_visual_info 1 +#endif + +#ifndef GLX_SGI_swap_control +#define GLX_SGI_swap_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXSwapIntervalSGI (int); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); +#endif + +#ifndef GLX_SGI_video_sync +#define GLX_SGI_video_sync 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetVideoSyncSGI (unsigned int *); +extern int glXWaitVideoSyncSGI (int, int, unsigned int *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); +typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); +#endif + +#ifndef GLX_SGI_make_current_read +#define GLX_SGI_make_current_read 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext); +extern GLXDrawable glXGetCurrentReadDrawableSGI (void); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); +#endif + +#ifndef GLX_SGIX_video_source +#define GLX_SGIX_video_source 1 +#ifdef _VL_H +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode); +extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); +typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#endif /* _VL_H */ +#endif + +#ifndef GLX_EXT_visual_rating +#define GLX_EXT_visual_rating 1 +#endif + +#ifndef GLX_EXT_import_context +#define GLX_EXT_import_context 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Display * glXGetCurrentDisplayEXT (void); +extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *); +extern GLXContextID glXGetContextIDEXT (const GLXContext); +extern GLXContext glXImportContextEXT (Display *, GLXContextID); +extern void glXFreeContextEXT (Display *, GLXContext); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); +typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); +typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); +typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); +typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); +#endif + +#ifndef GLX_SGIX_fbconfig +#define GLX_SGIX_fbconfig 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *); +extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *); +extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap); +extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool); +extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX); +extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); +typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); +typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); +typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); +#endif + +#ifndef GLX_SGIX_pbuffer +#define GLX_SGIX_pbuffer 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *); +extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX); +extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *); +extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long); +extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); +typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); +typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); +typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); +typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); +#endif + +#ifndef GLX_SGI_cushion +#define GLX_SGI_cushion 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCushionSGI (Display *, Window, float); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); +#endif + +#ifndef GLX_SGIX_video_resize +#define GLX_SGIX_video_resize 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern int glXBindChannelToWindowSGIX (Display *, int, int, Window); +extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int); +extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *); +extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *); +extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); +typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); +typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); +typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); +typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); +#endif + +#ifndef GLX_SGIX_dmbuffer +#define GLX_SGIX_dmbuffer 1 +#ifdef _DM_BUFFER_H_ +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#endif /* _DM_BUFFER_H_ */ +#endif + +#ifndef GLX_SGIX_swap_group +#define GLX_SGIX_swap_group 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); +#endif + +#ifndef GLX_SGIX_swap_barrier +#define GLX_SGIX_swap_barrier 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int); +extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); +typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); +#endif + +#ifndef GLX_SUN_get_transparent_index +#define GLX_SUN_get_transparent_index 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); +#endif + +#ifndef GLX_MESA_copy_sub_buffer +#define GLX_MESA_copy_sub_buffer 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); +#endif + +#ifndef GLX_MESA_pixmap_colormap +#define GLX_MESA_pixmap_colormap 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); +#endif + +#ifndef GLX_MESA_release_buffers +#define GLX_MESA_release_buffers 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); +#endif + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_MESA_set_3dfx_mode 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXSet3DfxModeMESA (int); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); +#endif + +#ifndef GLX_SGIX_visual_select_group +#define GLX_SGIX_visual_select_group 1 +#endif + +#ifndef GLX_OML_swap_method +#define GLX_OML_swap_method 1 +#endif + +#ifndef GLX_OML_sync_control +#define GLX_OML_sync_control 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *); +extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *); +extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t); +extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *); +extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); +typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); +#endif + +#ifndef GLX_NV_float_buffer +#define GLX_NV_float_buffer 1 +#endif + +#ifndef GLX_SGIX_hyperpipe +#define GLX_SGIX_hyperpipe 1 + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; +} GLXHyperpipeNetworkSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int + participationType; + int timeSlice; +} GLXHyperpipeConfigSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin, srcYOrigin, srcWidth, srcHeight; + int destXOrigin, destYOrigin, destWidth, destHeight; +} GLXPipeRect; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin, YOrigin, maxHeight, maxWidth; +} GLXPipeRectLimits; + +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *); +extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *); +extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *); +extern int glXDestroyHyperpipeConfigSGIX (Display *, int); +extern int glXBindHyperpipeSGIX (Display *, int); +extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *); +extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *); +extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); +typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); +typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#endif + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern unsigned int glXGetAGPOffsetMESA (const void *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); +#endif + +#ifndef GLX_EXT_fbconfig_packed_float +#define GLX_EXT_fbconfig_packed_float 1 +#endif + +#ifndef GLX_EXT_framebuffer_sRGB +#define GLX_EXT_framebuffer_sRGB 1 +#endif + +#ifndef GLX_EXT_texture_from_pixmap +#define GLX_EXT_texture_from_pixmap 1 +#ifdef GLX_GLXEXT_PROTOTYPES +extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *); +extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); +typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); +#endif + +#ifndef GLX_NV_present_video +#define GLX_NV_present_video 1 +#endif + +#ifndef GLX_NV_video_out +#define GLX_NV_video_out 1 +#endif + +#ifndef GLX_NV_swap_group +#define GLX_NV_swap_group 1 +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ng/Togl2.1/GL_unused/wglext.h b/ng/Togl2.1/GL_unused/wglext.h new file mode 100644 index 00000000..0286a913 --- /dev/null +++ b/ng/Togl2.1/GL_unused/wglext.h @@ -0,0 +1,776 @@ +#ifndef __wglext_h_ +#define __wglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number */ +/* wglext.h last updated 2008/10/07 */ +/* Current version at http://www.opengl.org/registry/ */ +#define WGL_WGLEXT_VERSION 11 + +#ifndef WGL_ARB_buffer_region +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +#endif + +#ifndef WGL_ARB_multisample +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif + +#ifndef WGL_ARB_extensions_string +#endif + +#ifndef WGL_ARB_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +#endif + +#ifndef WGL_ARB_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +#endif + +#ifndef WGL_ARB_pbuffer +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +#endif + +#ifndef WGL_ARB_render_texture +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +#endif + +#ifndef WGL_ARB_pixel_format_float +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif + +#ifndef WGL_ARB_create_context +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 +#define ERROR_INVALID_VERSION_ARB 0x2095 +#endif + +#ifndef WGL_EXT_make_current_read +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +#endif + +#ifndef WGL_EXT_pixel_format +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +#endif + +#ifndef WGL_EXT_pbuffer +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +#endif + +#ifndef WGL_EXT_depth_float +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif + +#ifndef WGL_3DFX_multisample +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif + +#ifndef WGL_EXT_multisample +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif + +#ifndef WGL_I3D_digital_video_control +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +#endif + +#ifndef WGL_I3D_gamma +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +#endif + +#ifndef WGL_I3D_genlock +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +#endif + +#ifndef WGL_I3D_image_buffer +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +#endif + +#ifndef WGL_I3D_swap_frame_lock +#endif + +#ifndef WGL_NV_render_depth_texture +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif + +#ifndef WGL_ATI_pixel_format_float +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#endif + +#ifndef WGL_NV_float_buffer +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif + +#ifndef WGL_3DL_stereo_control +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +#endif + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 +#endif + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 +#endif + +#ifndef WGL_NV_present_video +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 +#endif + +#ifndef WGL_NV_video_out +#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 +#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 +#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 +#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 +#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 +#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 +#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 +#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 +#define WGL_VIDEO_OUT_FRAME 0x20C8 +#define WGL_VIDEO_OUT_FIELD_1 0x20C9 +#define WGL_VIDEO_OUT_FIELD_2 0x20CA +#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB +#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC +#endif + +#ifndef WGL_NV_swap_group +#endif + +#ifndef WGL_NV_gpu_affinity +#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 +#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 +#endif + + +/*************************************************************/ + +#ifndef WGL_ARB_pbuffer +DECLARE_HANDLE(HPBUFFERARB); +#endif +#ifndef WGL_EXT_pbuffer +DECLARE_HANDLE(HPBUFFEREXT); +#endif +#ifndef WGL_NV_present_video +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); +#endif +#ifndef WGL_NV_video_out +DECLARE_HANDLE(HPVIDEODEV); +#endif +#ifndef WGL_NV_gpu_affinity +DECLARE_HANDLE(HPGPUNV); +DECLARE_HANDLE(HGPUNV); + +typedef struct _GPU_DEVICE { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; +} GPU_DEVICE, *PGPU_DEVICE; +#endif + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HANDLE WINAPI wglCreateBufferRegionARB (HDC, int, UINT); +extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE); +extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE, int, int, int, int); +extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +#endif + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 +#endif + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern const char * WINAPI wglGetExtensionsStringARB (HDC); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +#endif + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *); +extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *); +extern BOOL WINAPI wglChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentARB (HDC, HDC, HGLRC); +extern HDC WINAPI wglGetCurrentReadDCARB (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); +#endif + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC, int, int, int, const int *); +extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB); +extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB, HDC); +extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB); +extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB, int, int *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); +#endif + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB, int); +extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB, int); +extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB, const int *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); +#endif + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 +#endif + +#ifndef WGL_ARB_create_context +#define WGL_ARB_create_context 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HGLRC WINAPI wglCreateContextAttribsARB (HDC, HGLRC, const int *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +#endif + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort); +extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *, GLuint); +extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort); +extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); +typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +#endif + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern const char * WINAPI wglGetExtensionsStringEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); +#endif + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglMakeContextCurrentEXT (HDC, HDC, HGLRC); +extern HDC WINAPI wglGetCurrentReadDCEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); +#endif + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC, int, int, int, const int *); +extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT); +extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT, HDC); +extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT); +extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT, int, int *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); +#endif + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *); +extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *); +extern BOOL WINAPI wglChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +#endif + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglSwapIntervalEXT (int); +extern int WINAPI wglGetSwapIntervalEXT (void); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +#endif + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 +#endif + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern void* WINAPI wglAllocateMemoryNV (GLsizei, GLfloat, GLfloat, GLfloat); +extern void WINAPI wglFreeMemoryNV (void *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); +#endif + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 +#endif + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 +#endif + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetSyncValuesOML (HDC, INT64 *, INT64 *, INT64 *); +extern BOOL WINAPI wglGetMscRateOML (HDC, INT32 *, INT32 *); +extern INT64 WINAPI wglSwapBuffersMscOML (HDC, INT64, INT64, INT64); +extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC, int, INT64, INT64, INT64); +extern BOOL WINAPI wglWaitForMscOML (HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *); +extern BOOL WINAPI wglWaitForSbcOML (HDC, INT64, INT64 *, INT64 *, INT64 *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); +typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +#endif + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC, int, int *); +extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC, int, const int *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +#endif + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC, int, int *); +extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC, int, const int *); +extern BOOL WINAPI wglGetGammaTableI3D (HDC, int, USHORT *, USHORT *, USHORT *); +extern BOOL WINAPI wglSetGammaTableI3D (HDC, int, const USHORT *, const USHORT *, const USHORT *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); +#endif + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableGenlockI3D (HDC); +extern BOOL WINAPI wglDisableGenlockI3D (HDC); +extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC, BOOL *); +extern BOOL WINAPI wglGenlockSourceI3D (HDC, UINT); +extern BOOL WINAPI wglGetGenlockSourceI3D (HDC, UINT *); +extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC, UINT); +extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC, UINT *); +extern BOOL WINAPI wglGenlockSampleRateI3D (HDC, UINT); +extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC, UINT *); +extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC, UINT); +extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC, UINT *); +extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC, UINT *, UINT *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); +typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); +typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); +#endif + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern LPVOID WINAPI wglCreateImageBufferI3D (HDC, DWORD, UINT); +extern BOOL WINAPI wglDestroyImageBufferI3D (HDC, LPVOID); +extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT); +extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC, const LPVOID *, UINT); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); +typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); +#endif + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnableFrameLockI3D (void); +extern BOOL WINAPI wglDisableFrameLockI3D (void); +extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *); +extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); +#endif + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetFrameUsageI3D (float *); +extern BOOL WINAPI wglBeginFrameTrackingI3D (void); +extern BOOL WINAPI wglEndFrameTrackingI3D (void); +extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *, DWORD *, float *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); +typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); +#endif + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 +#endif + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 +#endif + +#ifndef WGL_EXT_pixel_format_packed_float +#define WGL_EXT_pixel_format_packed_float 1 +#endif + +#ifndef WGL_EXT_framebuffer_sRGB +#define WGL_EXT_framebuffer_sRGB 1 +#endif + +#ifndef WGL_NV_present_video +#define WGL_NV_present_video 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern int WINAPI wglEnumerateVideoDevicesNV (HDC, HVIDEOOUTPUTDEVICENV *); +extern BOOL WINAPI wglBindVideoDeviceNV (HDC, unsigned int, HVIDEOOUTPUTDEVICENV, const int *); +extern BOOL WINAPI wglQueryCurrentContextNV (int, int *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); +#endif + +#ifndef WGL_NV_video_out +#define WGL_NV_video_out 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglGetVideoDeviceNV (HDC, int, HPVIDEODEV *); +extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV); +extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV, HPBUFFERARB, int); +extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB, int); +extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB, int, unsigned long *, BOOL); +extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV, unsigned long *, unsigned long *); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); +typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); +typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); +typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); +#endif + +#ifndef WGL_NV_swap_group +#define WGL_NV_swap_group 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglJoinSwapGroupNV (HDC, GLuint); +extern BOOL WINAPI wglBindSwapBarrierNV (GLuint, GLuint); +extern BOOL WINAPI wglQuerySwapGroupNV (HDC, GLuint *, GLuint *); +extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC, GLuint *, GLuint *); +extern BOOL WINAPI wglQueryFrameCountNV (HDC, GLuint *); +extern BOOL WINAPI wglResetFrameCountNV (HDC); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); +typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); +typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); +typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); +typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); +#endif + +#ifndef WGL_NV_gpu_affinity +#define WGL_NV_gpu_affinity 1 +#ifdef WGL_WGLEXT_PROTOTYPES +extern BOOL WINAPI wglEnumGpusNV (UINT, HGPUNV *); +extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV, UINT, PGPU_DEVICE); +extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *); +extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC, UINT, HGPUNV *); +extern BOOL WINAPI wglDeleteDCNV (HDC); +#endif /* WGL_WGLEXT_PROTOTYPES */ +typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); +typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); +typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); +typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); +typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ng/Togl2.1/LICENSE b/ng/Togl2.1/LICENSE new file mode 100644 index 00000000..a40bd5cd --- /dev/null +++ b/ng/Togl2.1/LICENSE @@ -0,0 +1,28 @@ +This software is copyrighted by Brian Paul (brian@mesa3d.org), +Benjamin Bederson (bederson@cs.umd.edu), and Greg Couch +(gregcouch@users.sourceforge.net). The following terms apply to all +files associated with the software unless explicitly disclaimed in +individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. diff --git a/ng/Togl2.1/Makefile.in b/ng/Togl2.1/Makefile.in new file mode 100644 index 00000000..fb3f287f --- /dev/null +++ b/ng/Togl2.1/Makefile.in @@ -0,0 +1,572 @@ +# Makefile.in -- +# +# This file is a Makefile for Sample TEA Extension. If it has the name +# "Makefile.in" then it is a template for a Makefile; to generate the +# actual Makefile, run "./configure", which is a configuration script +# generated by the "autoconf" program (constructs like "@foo@" will get +# replaced in the actual Makefile. +# +# Copyright (c) 1999 Scriptics Corporation. +# Copyright (c) 2002-2005 ActiveState Corporation. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: Makefile.in,v 1.26 2009/12/23 21:46:16 gregcouch Exp $ + +#======================================================================== +# Add additional lines to handle any additional AC_SUBST cases that +# have been added in a customized configure script. +#======================================================================== + +#SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ +SHLIB_SUFFIX = @SHLIB_SUFFIX@ +MATH_LIBS = @MATH_LIBS@ +LIBGLU = @LIBGLU@ + +EXAMPLE_SRCS = double.c gears.c index.c overlay.c stereo.c texture.c pbuffer.c +EXAMPLE_OBJS = $(EXAMPLE_SRCS:.c=.$(OBJEXT)) +EXAMPLE_SHLIBS = $(EXAMPLE_SRCS:.c=$(SHLIB_SUFFIX)) + +#======================================================================== +# Nothing of the variables below this line should need to be changed. +# Please check the TARGETS section below to make sure the make targets +# are correct. +#======================================================================== + +#======================================================================== +# The names of the source files is defined in the configure script. +# The object files are used for linking into the final library. +# This will be used when a dist target is added to the Makefile. +# It is not important to specify the directory, as long as it is the +# $(srcdir) or in the generic, win or unix subdirectory. +#======================================================================== + +PKG_SOURCES = @PKG_SOURCES@ +PKG_OBJECTS = @PKG_OBJECTS@ + +PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ +PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ + +#======================================================================== +# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with +# this package that need to be installed, if any. +#======================================================================== + +PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ + +#======================================================================== +# This is a list of public header files to be installed, if any. +#======================================================================== + +PKG_HEADERS = @PKG_HEADERS@ togl_ws.h + +#======================================================================== +# "PKG_LIB_FILE" refers to the library (dynamic or static as per +# configuration options) composed of the named objects. +#======================================================================== + +PKG_LIB_FILE = @PKG_LIB_FILE@ +PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ + +pkglib_BINARIES = $(PKG_LIB_FILE) +lib_BINARIES = $(PKG_STUB_LIB_FILE) +BINARIES = $(pkglib_BINARIES) $(lib_BINARIES) + +SHELL = @SHELL@ + +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +libdir = @libdir@ +includedir = @includedir@ +datarootdir = @datarootdir@ +datadir = @datadir@ +mandir = @mandir@ + +DESTDIR = + +PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) +pkgdatadir = $(datadir)/$(PKG_DIR) +pkglibdir = $(libdir)/$(PKG_DIR) +pkgincludedir = $(includedir)/$(PKG_DIR) + +top_builddir = . + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ + +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +CC = @CC@ +CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ +CFLAGS_WARNING = @CFLAGS_WARNING@ +EXEEXT = @EXEEXT@ +LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ +MAKE_LIB = @MAKE_LIB@ +MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ +MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ +MAKE_STUB_LIB = @MAKE_STUB_LIB@ +OBJEXT = @OBJEXT@ +RANLIB = @RANLIB@ +RANLIB_STUB = @RANLIB_STUB@ +SHLIB_CFLAGS = @SHLIB_CFLAGS@ +SHLIB_LD = @SHLIB_LD@ +SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ +STLIB_LD = @STLIB_LD@ +#TCL_DEFS = @TCL_DEFS@ +TCL_BIN_DIR = @TCL_BIN_DIR@ +TCL_SRC_DIR = @TCL_SRC_DIR@ +#TK_BIN_DIR = @TK_BIN_DIR@ +#TK_SRC_DIR = @TK_SRC_DIR@ + +# Not used, but retained for reference of what libs Tcl required +#TCL_LIBS = @TCL_LIBS@ + +#======================================================================== +# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our +# package without installing. The other environment variables allow us +# to test against an uninstalled Tcl. Add special env vars that you +# require for testing here (like TCLX_LIBRARY). +#======================================================================== + +#EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) +EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) +TCLLIBPATH = $(top_builddir) +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ + @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ + PATH="$(EXTRA_PATH):$(PATH)" \ + TCLLIBPATH="$(TCLLIBPATH)" +# TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` + +TCLSH_PROG = @TCLSH_PROG@ +TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) + +WISH_PROG = @WISH_PROG@ +WISH = $(TCLSH_ENV) $(WISH_PROG) + + +SHARED_BUILD = @SHARED_BUILD@ + +INCLUDES = -I. @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ + +PKG_CFLAGS = @PKG_CFLAGS@ + +# TCL_DEFS is not strictly need here, but if you remove it, then you +# must make sure that configure.in checks for the necessary components +# that your library may use. TCL_DEFS can actually be a problem if +# you do not compile with a similar machine setup as the Tcl core was +# compiled with. +#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) +DEFS = @DEFS@ -DAUTOSTEREOD=\"@AUTOSTEREOD@\" $(PKG_CFLAGS) + +CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl togl_ws.h +CLEANFILES = @CLEANFILES@ $(EXAMPLE_OBJS) $(EXAMPLE_SHLIBS) + +CPPFLAGS = @CPPFLAGS@ +LIBS = @PKG_LIBS@ @LIBS@ +AR = @AR@ +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +#======================================================================== +# Start of user-definable TARGETS section +#======================================================================== + +#======================================================================== +# TEA TARGETS. Please note that the "libraries:" target refers to platform +# independent files, and the "binaries:" target includes executable programs and +# platform-dependent libraries. Modify these targets so that they install +# the various pieces of your package. The make and install rules +# for the BINARIES that you specified above have already been done. +#======================================================================== + +all: binaries libraries doc + +#======================================================================== +# The binaries target builds executable programs, Windows .dll's, unix +# shared/static libraries, and any other platform-dependent files. +# The list of targets to build for "binaries:" is specified at the top +# of the Makefile, in the "BINARIES" variable. +#======================================================================== + +binaries: $(BINARIES) + +libraries: + +#======================================================================== +# Example section. These are examples because we don't want to install them. +# And they're not tests because we currently have no automatic way to see +# if they work. +#======================================================================== + +examples: $(EXAMPLE_SHLIBS) + +double$(SHLIB_SUFFIX): double.$(OBJEXT) $(PKG_STUB_LIB_FILE) + -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ + if [ $$match -eq 0 ]; then \ + $(MAKE_SHARED_LIB) ; \ + else \ + $(MAKE) PKG_OBJECTS="double.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ + fi + +gears$(SHLIB_SUFFIX): gears.$(OBJEXT) $(PKG_STUB_LIB_FILE) + -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ + if [ $$match -eq 0 ]; then \ + $(MAKE_SHARED_LIB) ; \ + else \ + $(MAKE) PKG_OBJECTS="gears.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ + fi + +index$(SHLIB_SUFFIX): index.$(OBJEXT) $(PKG_STUB_LIB_FILE) + -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ + if [ $$match -eq 0 ]; then \ + $(MAKE_SHARED_LIB) ; \ + else \ + $(MAKE) PKG_OBJECTS="index.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ + fi + +overlay$(SHLIB_SUFFIX): overlay.$(OBJEXT) $(PKG_STUB_LIB_FILE) + -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ + if [ $$match -eq 0 ]; then \ + $(MAKE_SHARED_LIB) ; \ + else \ + $(MAKE) PKG_OBJECTS="overlay.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ + fi + +stereo$(SHLIB_SUFFIX): stereo.$(OBJEXT) $(PKG_STUB_LIB_FILE) + -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ + if [ $$match -eq 0 ]; then \ + $(MAKE_SHARED_LIB) ; \ + else \ + $(MAKE) PKG_OBJECTS="stereo.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ + fi + +texture$(SHLIB_SUFFIX): texture.$(OBJEXT) image.$(OBJEXT) $(PKG_STUB_LIB_FILE) + -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ + if [ $$match -eq 0 ]; then \ + $(MAKE_SHARED_LIB) ; \ + else \ + $(MAKE) PKG_OBJECTS="texture.$(OBJEXT) image.$(OBJEXT) $(PKG_STUB_LIB_FILE) $(LIBGLU)" $@ ; \ + fi + +pbuffer$(SHLIB_SUFFIX): pbuffer.$(OBJEXT) $(PKG_STUB_LIB_FILE) + -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ + if [ $$match -eq 0 ]; then \ + $(MAKE_SHARED_LIB) ; \ + else \ + $(MAKE) PKG_OBJECTS="pbuffer.$(OBJEXT) $(PKG_STUB_LIB_FILE) $(LIBGLU)" $@ ; \ + fi + +#======================================================================== +# Stub section. +#======================================================================== + +toglDecls.h toglStubInit.c: togl.decls + $(TCLSH) `@CYGPATH@ $(TCL_SRC_DIR)/tools/genStubs.tcl` . togl.decls + +#======================================================================== +# Your doc target should differentiate from doc builds (by the developer) +# and doc installs (see install-doc), which just install the docs on the +# end user machine when building from source. +#======================================================================== + +doc: +# @echo "If you have documentation to create, place the commands to" +# @echo "build the docs in the 'doc:' target. For example:" +# @echo " xml2nroff sample.xml > sample.n" +# @echo " xml2html sample.xml > sample.html" + +install: all install-binaries install-libraries install-doc + +install-binaries: binaries install-lib-binaries install-bin-binaries + +#======================================================================== +# This rule installs platform-independent files, such as header files. +# The list=...; for p in $$list handles the empty list case x-platform. +#======================================================================== + +install-libraries: libraries + @mkdir -p $(DESTDIR)$(includedir) + @echo "Installing header files in $(DESTDIR)$(includedir)" + @list='$(PKG_HEADERS)'; for i in $$list; do \ + echo "Installing $(srcdir)/$$i" ; \ + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ + done + +#======================================================================== +# Install documentation. Unix manpages should go in the $(mandir) +# directory. +#======================================================================== + +install-doc: doc +# @mkdir -p $(DESTDIR)$(mandir)/mann +# @echo "Installing documentation in $(DESTDIR)$(mandir)" +# @list='$(srcdir)/doc/*.n'; for i in $$list; do \ +# echo "Installing $$i"; \ +# rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ +# $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ +# done + +test: binaries libraries + $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) + +shell: binaries libraries + @$(TCLSH) $(SCRIPT) + +gdb: + $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) + +depend: + +#======================================================================== +# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable +# mentioned above. That will ensure that this target is built when you +# run "make binaries". +# +# The $(PKG_OBJECTS) objects are created and linked into the final +# library. In most cases these object files will correspond to the +# source files above. +#======================================================================== + +$(PKG_LIB_FILE): $(PKG_OBJECTS) + -rm -f $(PKG_LIB_FILE) + ${MAKE_LIB} + $(RANLIB) $(PKG_LIB_FILE) + +$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) + -rm -f $(PKG_STUB_LIB_FILE) + ${MAKE_STUB_LIB} + $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) + +#======================================================================== +# We need to enumerate the list of .c to .o lines here. +# +# In the following lines, $(srcdir) refers to the toplevel directory +# containing your extension. If your sources are in a subdirectory, +# you will have to modify the paths to reflect this: +# +# sample.$(OBJEXT): $(srcdir)/generic/sample.c +# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ +# +# Setting the VPATH variable to a list of paths will cause the makefile +# to look into these paths when resolving .c to .obj dependencies. +# As necessary, add $(srcdir):$(srcdir)/compat:.... +#======================================================================== + +VPATH = $(srcdir):Xmu + +.c.@OBJEXT@: + $(COMPILE) -c `@CYGPATH@ $<` -o $@ + +#======================================================================== +# Distribution creation +# You may need to tweak this target to make it work correctly. +#======================================================================== + +COMPRESS = tar zcvf $(PKG_DIR)-src.tar.gz $(PKG_DIR) +DIST_ROOT = /tmp/togl-dist +DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) +BINPKG_DIR = $(PKG_DIR)-@TCL_VERSION@-$(subst Darwin,MacOSX,$(subst CYGWIN,Windows,$(shell uname -s | sed -e 's/[-_].*//'))) +BINDIST_DIR = $(DIST_ROOT)/$(BINPKG_DIR) + +dist-clean: + rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR)* + +dist: dist-clean + mkdir -p $(DIST_DIR) + cp -p $(srcdir)/README* $(srcdir)/LICENSE* $(srcdir)/togl.decls \ + $(srcdir)/*.py $(srcdir)/*.tcl \ + $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ + ben.rgb tree2.rgba \ + $(DIST_DIR)/ + chmod 664 $(DIST_DIR)/* + chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in + + for i in $(srcdir)/*.[ch]; do \ + if [ -f $$i ]; then \ + cp -p $$i $(DIST_DIR)/ ; \ + fi; \ + done + cd $(DIST_DIR); rm -f $(CONFIG_CLEAN_FILES) + + mkdir $(DIST_DIR)/tclconfig + cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ + $(DIST_DIR)/tclconfig/ + chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 + chmod +x $(DIST_DIR)/tclconfig/install-sh + + list='examples doc tests Xmu GL'; \ + for p in $$list; do \ + if test -d $(srcdir)/$$p ; then \ + mkdir $(DIST_DIR)/$$p; \ + cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ + fi; \ + done + + (cd $(DIST_ROOT); $(COMPRESS);) + +bindist-clean: + rm -rf $(BINDIST_DIR) $(DIST_ROOT)/$(PKG_DIR)* + +bindist: all bindist-clean + mkdir -p $(BINDIST_DIR) + $(MAKE) prefix=$(BINDIST_DIR) exec_prefix=$(BINDIST_DIR) install + $(INSTALL_DATA) README.bin $(BINDIST_DIR)/README.txt + mkdir -p $(BINDIST_DIR)/doc + @list='doc/*.html doc/*.js'; for i in $$list; do \ + echo "Installing $$i"; \ + rm -f $(BINDIST_DIR)/doc/`basename $$i`; \ + $(INSTALL_DATA) $$i $(BINDIST_DIR)/doc ; \ + done + if [ @TOGL_WINDOWINGSYSTEM@ == TOGL_WGL ]; then \ + (cd $(DIST_ROOT); zip -rDX9 $(BINPKG_DIR).zip $(BINPKG_DIR)); \ + else \ + (cd $(DIST_ROOT); tar zcvf $(BINPKG_DIR).tar.gz $(BINPKG_DIR)); \ + fi + +#======================================================================== +# End of user-definable section +#======================================================================== + +#======================================================================== +# Don't modify the file to clean here. Instead, set the "CLEANFILES" +# variable in configure.in +#======================================================================== + +clean: + -test -z "$(BINARIES)" || rm -f $(BINARIES) + -rm -f *.$(OBJEXT) core *.core + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean: clean + -rm -f *.tab.c + -rm -f $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log config.status + +#======================================================================== +# Install binary object libraries. On Windows this includes both .dll and +# .lib files. Because the .lib files are not explicitly listed anywhere, +# we need to deduce their existence from the .dll file of the same name. +# Library files go into the lib directory. +# In addition, this will generate the pkgIndex.tcl +# file in the install location (assuming it can find a usable tclsh shell) +# +# You should not have to modify this target. +#======================================================================== + +install-lib-binaries: binaries + @mkdir -p $(DESTDIR)$(libdir) + @list='$(lib_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \ + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ + if test "x$$stub" = "xstub"; then \ + echo " $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p"; \ + $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p; \ + else \ + echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \ + $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ + fi; \ + ext=`echo $$p|sed -e "s/.*\.//"`; \ + if test "x$$ext" = "xdll"; then \ + lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ + if test -f $$lib; then \ + echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \ + $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \ + fi; \ + fi; \ + fi; \ + done + @mkdir -p $(DESTDIR)$(pkglibdir) + @list='$(pkglib_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ + if test "x$$stub" = "xstub"; then \ + echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ + else \ + echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ + fi; \ + ext=`echo $$p|sed -e "s/.*\.//"`; \ + if test "x$$ext" = "xdll"; then \ + lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ + if test -f $$lib; then \ + echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ + $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ + fi; \ + fi; \ + fi; \ + done + @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + destp=`basename $$p`; \ + echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ + fi; \ + done + @if test "x$(SHARED_BUILD)" = "x1"; then \ + echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ + $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ + echo " Install LICENSE $(DESTDIR)$(pkglibdir)"; \ + $(INSTALL_DATA) LICENSE $(DESTDIR)$(pkglibdir); \ + else \ + echo " Install LICENSE.togl $(DESTDIR)$(libdir)"; \ + $(INSTALL_DATA) LICENSE $(DESTDIR)$(libdir)/LICENSE.togl; \ + fi + +#======================================================================== +# Install binary executables (e.g. .exe files and dependent .dll files) +# This is for files that must go in the bin directory (located next to +# wish and tclsh), like dependent .dll files on Windows. +# +# You should not have to modify this target, except to define bin_BINARIES +# above if necessary. +#======================================================================== + +install-bin-binaries: binaries + @mkdir -p $(DESTDIR)$(bindir) + @list='$(bin_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ + fi; \ + done + +.SUFFIXES: .c .$(OBJEXT) + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +uninstall-binaries: + list='$(pkglib_BINARIES)'; for p in $$list; do \ + rm -f $(DESTDIR)$(pkglibdir)/$$p; \ + done + list='$(lib_BINARIES)'; for p in $$list; do \ + rm -f $(DESTDIR)$(libdir)/$$p; \ + done + list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ + p=`basename $$p`; \ + rm -f $(DESTDIR)$(pkglibdir)/$$p; \ + done + list='$(bin_BINARIES)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/$$p; \ + done + +.PHONY: all binaries clean depend distclean doc install libraries test + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# Additional dependencies +togl.$(OBJEXT): toglFont.c toglAGL.c toglGLX.c toglWGL.c diff --git a/ng/Togl2.1/README.bin b/ng/Togl2.1/README.bin new file mode 100644 index 00000000..0cb0412b --- /dev/null +++ b/ng/Togl2.1/README.bin @@ -0,0 +1,73 @@ +README.txt: Togl + + This is a Togl 2.X binary distribution for both users and developers. + It is specific to a particular operating system (e.g., Windows, Mac + OS X, Linux, etc.). Since the C ABI should be same for all compilers + on the same system, using Togl via the Tcl interface should work + regardless of which compiler Tcl was compiled with. + + The files are named: + + ToglTOGL_VERSION-TCL_VERSION-OS.SUFFIX + + For example, TOGL_VERSION=2.0, TCL_VERSION=8.4, OS=Linux, + and SUFFIX=.tar.gz gives: + + Togl2.0-8.4-Linux.tar.gz + + Togl is also available at: + http://sourceforge.net/projects/togl/ + + You can get any release of Togl from the file distributions + link at the above URL. + + A copy of the online documentation is in the doc directory. + +For users: + + Only the lib/Togl2.X directory (and its contents) need to be installed + in your Tcl library. Execute the following Tcl script to find the + directories Tcl looks for packages in: + + puts $tcl_libPath + + and then copy the lib/Togl2.X directory into one of those directories. + +For developers: + + The lib/Togl2.X directory (and its contents) is all that needs to be + redistributed in your application distribution. + + If you wish to link with Togl, then you will need the include files + and a link library for your compiler. The compilers used are (OS- + WINDOWING_SYSTEM): + + MacOSX: gcc 4.0.1, Mac OS X 10.4, ppc/i386 + Linux: gcc 3.3.6, Red Hat 7.1, i386 + Linux64: gcc 4.2.3 -Wl,--hash-style=both, Red Hat Server 5.1, x86_64 + Windows: Microsoft Visual Studio .NET 2003, Windows XP SP2, i386 + +File hierarchy: + + README.txt this file + bin/ unused (empty) + lib/ + Togl2.X/ Tcl package (place on Tcl's autopath) + LICENSE redistribution license + pkgIndex.tcl Tcl package index + Togl2X.dll Windows Tcl package binary + Toglstub2X.a Windows gcc/mingw link library + Toglstub2X.lib Windows Visual Studio link library + libToglstub2X.a UNIX (Linux, IRIX, etc.) link library + include/ + togl.h Main header file, includes others + toglDecls.h API function declarations + togl_ws.h Which windowing system togl was compiled with + doc/ Documentation + *.html Start with index.html + +The contents of the include and lib directories can be placed verbatim +in the Tcl installataion hierachy. + +Documentation is in the doc directory. Start with doc/index.html in +your web browser. diff --git a/ng/Togl2.1/README.stubs b/ng/Togl2.1/README.stubs new file mode 100644 index 00000000..2950a981 --- /dev/null +++ b/ng/Togl2.1/README.stubs @@ -0,0 +1,21 @@ +This version of Togl is entirely free from +dependencies on Tcl/Tk's internal functions. It uses the public stubs +interface, witch means that the same binary works with any stubs-aware +wish (i.e. version >= 8.1) + +It has been tested on Windows NT/2000 and Linux for several Tcl/Tk versions up +to 8.4a3. I haven't been able to test the Mac port, it propably needs mending +but I can't see why it shouldn't work in principle. + +Implementation wise, what differs from Togl 1.5 is that Togl_MakeWindowExist() +is replaced by Togl_CreateWindow(), a function that gets registered in Tk as a callback for window creation. In Tk/Tk 8.4a3, there is a new public API call +Tk_SetClassProcs() to register this callback, but for earlier versions of Tk +one needs to do this using some pointer magic. +There is a run-time check to determine which method to use, hence the +same binary runs on all versions of Wish from 8.1 and up. For this to +work you need to compile against the headers from Tcl/Tk 8.4a3 or later, or +the binary will only work for Tcl/Tk 8.1-8.4a2. +The tk8.4a3 public headers (tk8.4a3.h + tkDecls.h) are included for +conveniance, and they are used if the flag -DUSE_LOCAL_TK_H is specified. + +Jonas Beskow, December 2001 \ No newline at end of file diff --git a/ng/Togl2.1/Togl.py b/ng/Togl2.1/Togl.py new file mode 100644 index 00000000..ec2a19cf --- /dev/null +++ b/ng/Togl2.1/Togl.py @@ -0,0 +1,129 @@ + +""" +Tkinter support for the Togl 2.X Tk OpenGL widget. + +Copyright (C) 2006-2007 Greg Couch +See the LICENSE file for copyright details. +""" +__all__ = ['Togl', 'NORMAL', 'OVERLAY'] + +import Tkinter +import weakref, atexit + +# Overlay constants +NORMAL = 1 +OVERLAY = 2 + +class Togl(Tkinter.Widget): + """Tk OpenGL Widget""" + _instances = weakref.WeakKeyDictionary() + + def __init__(self, master=None, cnf={}, **kw): + """Return new Togl widget""" + if master is None: + master = Tkinter._default_root + master.tk.call('package', 'require', 'Togl', '2.0') + try: + Tkinter.Widget.__init__(self, master, "togl", cnf, kw) + except: + Tkinter.Widget.destroy(self) + raise + Togl._instances[self] = True + + def _cbsubst(self, *args): + """callback command argument substitution""" + if len(args) != 1: + return args + return (self._nametowidget(args[0]),) + + def _options(self, cnf, kw = None): + """Internal function.""" + if kw: + cnf = Tkinter._cnfmerge((cnf, kw)) + else: + cnf = Tkinter._cnfmerge(cnf) + res = () + for k, v in cnf.items(): + if v is not None: + if k[-1] == '_': k = k[:-1] + if callable(v): + if k.endswith('command'): + v = self._register(v, self._cbsubst) + else: + v = self._register(v) + res = res + ('-'+k, v) + return res + + # cget, configure are inherited + + def extensions(self): + """Return list of supported OpenGL extensions""" + return self.tk.call(self._w, 'extensions') + + def postredisplay(self): + """Cause the displaycommand callback to be called + the next time the event loop is idle.""" + self.tk.call(self._w, 'postredisplay') + + def render(self): + """Call the displaycommand callback immediately.""" + self.tk.call(self._w, 'render') + + def swapbuffers(self): + """If single-buffred, just flush OpenGL command buffer. If + double-buffered, swap front and back buffers. (So this is + appropriate to call after every frame is drawn.)""" + self.tk.call(self._w, 'swapbuffers') + + def makecurrent(self): + """Make widget the current OpenGL context""" + self.tk.call(self._w, 'makecurrent') + + def takephoto(self, imageName): + """Copy current contents of widget into the given photo image + """ + self.tk.call(self._w, 'takephoto', imageName) + + def loadbitmapfont(self, name): + return self.tk.call(self._w, 'loadbitmapfont', name) + + def unloadbitmapfont(self, fontbase): + self.tk.call(self._w, 'unloadbitmapfont', fontbase) + + def uselayer(self, layer): + self.tk.call(self._w, 'uselayer', layer) + + def showoverlay(self): + self.tk.call(self._w, 'showoverlay') + + def hideoverlay(self): + self.tk.call(self._w, 'hideoverlay') + + def postredisplayoverlay(self): + self.tk.call(self._w, 'postredisplayoverlay') + + def renderoverlay(self): + self.tk.call(self._w, 'renderoverlay') + + def existsoverlay(self): + return self.tk.call(self._w, 'existsoverlay') + + def ismappedoverlay(self): + return self.tk.call(self._w, 'ismappedoverlay') + + def getoverlaytransparentvalue(self): + return self.tk.call(self._w, 'getoverlaytransparentvalue') + + def destroy(self): + del Togl._instances[self] + Tkinter.Widget.destroy(self) + +def _cleanup(): + # destroy OpenGL contexts early, so destroycommand's don't + # try to make any OpenGL calls during exit. + for t in Togl._instances.keys(): + try: + t.destroy() + except Tkinter.TclError: + pass +atexit.register(_cleanup) diff --git a/ng/Togl2.1/Xmu/CmapAlloc.c b/ng/Togl2.1/Xmu/CmapAlloc.c new file mode 100644 index 00000000..9da1d7c9 --- /dev/null +++ b/ng/Togl2.1/Xmu/CmapAlloc.c @@ -0,0 +1,335 @@ +/* $XConsortium: CmapAlloc.c,v 1.9 94/04/17 20:15:52 rws Exp $ */ + +/* + +Copyright (c) 1989, 1994 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +*/ + +/* + * Author: Donna Converse, MIT X Consortium + */ + +#include +#include +#include +#include + +#define lowbit(x) ((x) & (~(x) + 1)) + +static int default_allocation(); +static void best_allocation(); +static void gray_allocation(); +static int icbrt(); +static int icbrt_with_bits(); +static int icbrt_with_guess(); + +/* To determine the best allocation of reds, greens, and blues in a + * standard colormap, use XmuGetColormapAllocation. + * vinfo specifies visual information for a chosen visual + * property specifies one of the standard colormap property names + * red_max returns maximum red value + * green_max returns maximum green value + * blue_max returns maximum blue value + * + * XmuGetColormapAllocation returns 0 on failure, non-zero on success. + * It is assumed that the visual is appropriate for the colormap property. + */ + +Status XmuGetColormapAllocation(vinfo, property, red_max, green_max, blue_max) + XVisualInfo *vinfo; + Atom property; + unsigned long *red_max, *green_max, *blue_max; +{ + Status status = 1; + + if (vinfo->colormap_size <= 2) + return 0; + + switch (property) + { + case XA_RGB_DEFAULT_MAP: + status = default_allocation(vinfo, red_max, green_max, blue_max); + break; + case XA_RGB_BEST_MAP: + best_allocation(vinfo, red_max, green_max, blue_max); + break; + case XA_RGB_GRAY_MAP: + gray_allocation(vinfo->colormap_size, red_max, green_max, blue_max); + break; + case XA_RGB_RED_MAP: + *red_max = vinfo->colormap_size - 1; + *green_max = *blue_max = 0; + break; + case XA_RGB_GREEN_MAP: + *green_max = vinfo->colormap_size - 1; + *red_max = *blue_max = 0; + break; + case XA_RGB_BLUE_MAP: + *blue_max = vinfo->colormap_size - 1; + *red_max = *green_max = 0; + break; + default: + status = 0; + } + return status; +} + +/****************************************************************************/ +/* Determine the appropriate color allocations of a gray scale. + * + * Keith Packard, MIT X Consortium + */ + +static void gray_allocation(n, red_max, green_max, blue_max) + int n; /* the number of cells of the gray scale */ + unsigned long *red_max, *green_max, *blue_max; +{ + *red_max = (n * 30) / 100; + *green_max = (n * 59) / 100; + *blue_max = (n * 11) / 100; + *green_max += ((n - 1) - (*red_max + *green_max + *blue_max)); +} + +/****************************************************************************/ +/* Determine an appropriate color allocation for the RGB_DEFAULT_MAP. + * If a map has less than a minimum number of definable entries, we do not + * produce an allocation for an RGB_DEFAULT_MAP. + * + * For 16 planes, the default colormap will have 27 each RGB; for 12 planes, + * 12 each. For 8 planes, let n = the number of colormap entries, which may + * be 256 or 254. Then, maximum red value = floor(cube_root(n - 125)) - 1. + * Maximum green and maximum blue values are identical to maximum red. + * This leaves at least 125 cells which clients can allocate. + * + * Return 0 if an allocation has been determined, non-zero otherwise. + */ + +static int default_allocation(vinfo, red, green, blue) + XVisualInfo *vinfo; + unsigned long *red, *green, *blue; +{ + int ngrays; /* number of gray cells */ + + switch (vinfo->class) { + case PseudoColor: + + if (vinfo->colormap_size > 65000) + /* intended for displays with 16 planes */ + *red = *green = *blue = (unsigned long) 27; + else if (vinfo->colormap_size > 4000) + /* intended for displays with 12 planes */ + *red = *green = *blue = (unsigned long) 12; + else if (vinfo->colormap_size < 250) + return 0; + else + /* intended for displays with 8 planes */ + *red = *green = *blue = (unsigned long) + (icbrt(vinfo->colormap_size - 125) - 1); + break; + + case DirectColor: + + if (vinfo->colormap_size < 10) + return 0; + *red = *green = *blue = vinfo->colormap_size / 2 - 1; + break; + + case TrueColor: + + *red = vinfo->red_mask / lowbit(vinfo->red_mask); + *green = vinfo->green_mask / lowbit(vinfo->green_mask); + *blue = vinfo->blue_mask / lowbit(vinfo->blue_mask); + break; + + case GrayScale: + + if (vinfo->colormap_size > 65000) + ngrays = 4096; + else if (vinfo->colormap_size > 4000) + ngrays = 512; + else if (vinfo->colormap_size < 250) + return 0; + else + ngrays = 12; + gray_allocation(ngrays, red, green, blue); + break; + + default: + return 0; + } + return 1; +} + +/****************************************************************************/ +/* Determine an appropriate color allocation for the RGB_BEST_MAP. + * + * For a DirectColor or TrueColor visual, the allocation is determined + * by the red_mask, green_mask, and blue_mask members of the visual info. + * + * Otherwise, if the colormap size is an integral power of 2, determine + * the allocation according to the number of bits given to each color, + * with green getting more than red, and red more than blue, if there + * are to be inequities in the distribution. If the colormap size is + * not an integral power of 2, let n = the number of colormap entries. + * Then maximum red value = floor(cube_root(n)) - 1; + * maximum blue value = floor(cube_root(n)) - 1; + * maximum green value = n / ((# red values) * (# blue values)) - 1; + * Which, on a GPX, allows for 252 entries in the best map, out of 254 + * defineable colormap entries. + */ + +static void best_allocation(vinfo, red, green, blue) + XVisualInfo *vinfo; + unsigned long *red, *green, *blue; +{ + + if (vinfo->class == DirectColor || vinfo->class == TrueColor) + { + *red = vinfo->red_mask; + while ((*red & 01) == 0) + *red >>= 1; + *green = vinfo->green_mask; + while ((*green & 01) == 0) + *green >>=1; + *blue = vinfo->blue_mask; + while ((*blue & 01) == 0) + *blue >>= 1; + } + else + { + register int bits, n; + + /* Determine n such that n is the least integral power of 2 which is + * greater than or equal to the number of entries in the colormap. + */ + n = 1; + bits = 0; + while (vinfo->colormap_size > n) + { + n = n << 1; + bits++; + } + + /* If the number of entries in the colormap is a power of 2, determine + * the allocation by "dealing" the bits, first to green, then red, then + * blue. If not, find the maximum integral red, green, and blue values + * which, when multiplied together, do not exceed the number of + + * colormap entries. + */ + if (n == vinfo->colormap_size) + { + register int r, g, b; + b = bits / 3; + g = b + ((bits % 3) ? 1 : 0); + r = b + (((bits % 3) == 2) ? 1 : 0); + *red = 1 << r; + *green = 1 << g; + *blue = 1 << b; + } + else + { + *red = icbrt_with_bits(vinfo->colormap_size, bits); + *blue = *red; + *green = (vinfo->colormap_size / ((*red) * (*blue))); + } + (*red)--; + (*green)--; + (*blue)--; + } + return; +} + +/* + * integer cube roots by Newton's method + * + * Stephen Gildea, MIT X Consortium, July 1991 + */ + +static int icbrt(a) /* integer cube root */ + int a; +{ + register int bits = 0; + register unsigned n = a; + + while (n) + { + bits++; + n >>= 1; + } + return icbrt_with_bits(a, bits); +} + + +static int icbrt_with_bits(a, bits) + int a; + int bits; /* log 2 of a */ +{ + return icbrt_with_guess(a, a>>2*bits/3); +} + +#ifdef _X_ROOT_STATS +int icbrt_loopcount; +#endif + +/* Newton's Method: x_n+1 = x_n - ( f(x_n) / f'(x_n) ) */ + +/* for cube roots, x^3 - a = 0, x_new = x - 1/3 (x - a/x^2) */ + +/* + * Quick and dirty cube roots. Nothing fancy here, just Newton's method. + * Only works for positive integers (since that's all we need). + * We actually return floor(cbrt(a)) because that's what we need here, too. + */ + +static int icbrt_with_guess(a, guess) + int a, guess; +{ + register int delta; + +#ifdef _X_ROOT_STATS + icbrt_loopcount = 0; +#endif + if (a <= 0) + return 0; + if (guess < 1) + guess = 1; + + do { +#ifdef _X_ROOT_STATS + icbrt_loopcount++; +#endif + delta = (guess - a/(guess*guess))/3; +#ifdef DEBUG + printf("pass %d: guess=%d, delta=%d\n", icbrt_loopcount, guess, delta); +#endif + guess -= delta; + } while (delta != 0); + + if (guess*guess*guess > a) + guess--; + + return guess; +} diff --git a/ng/Togl2.1/Xmu/CrCmap.c b/ng/Togl2.1/Xmu/CrCmap.c new file mode 100644 index 00000000..c7f903fa --- /dev/null +++ b/ng/Togl2.1/Xmu/CrCmap.c @@ -0,0 +1,523 @@ +/* $XConsortium: CrCmap.c,v 1.6 94/04/17 20:15:53 rws Exp $ */ + +/* + +Copyright (c) 1989 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +*/ + +/* + * Author: Donna Converse, MIT X Consortium + */ + +/* + * CreateCmap.c - given a standard colormap description, make the map. + */ + +#include +#include +#include +#include + +static int ROmap(); /* allocate entire map Read Only */ +static Status ROorRWcell(); /* allocate a cell, prefer Read Only */ +static Status RWcell(); /* allocate a cell Read Write */ +static int compare(); /* for quicksort */ +static Status contiguous(); /* find contiguous sequence of cells */ +static void free_cells(); /* frees resources before quitting */ +static Status readonly_map(); /* create a map in a RO visual type */ +static Status readwrite_map(); /* create a map in a RW visual type */ + +#define lowbit(x) ((x) & (~(x) + 1)) +#define TRUEMATCH(mult,max,mask) \ + (colormap->max * colormap->mult <= vinfo->mask && \ + lowbit(vinfo->mask) == colormap->mult) + +/* + * To create any one colormap which is described by an XStandardColormap + * structure, use XmuCreateColormap(). + * + * Return 0 on failure, non-zero on success. + * Resources created by this function are not made permanent. + * No argument error checking is provided. Use at your own risk. + * + * All colormaps are created with read only allocations, with the exception + * of read only allocations of colors in the default map or otherwise + * which fail to return the expected pixel value, and these are individually + * defined as read/write allocations. This is done so that all the cells + * defined in the default map are contiguous, for use in image processing. + * This typically happens with White and Black in the default map. + * + * Colormaps of static visuals are considered to be successfully created if + * the map of the static visual matches the definition given in the + * standard colormap structure. + */ + +Status XmuCreateColormap(dpy, colormap) + Display *dpy; /* specifies the connection under + * which the map is created */ + XStandardColormap *colormap; /* specifies the map to be created, + * and returns, particularly if the + * map is created as a subset of the + * default colormap of the screen, + * the base_pixel of the map. + */ +{ + XVisualInfo vinfo_template; /* template visual information */ + XVisualInfo *vinfo; /* matching visual information */ + XVisualInfo *vpointer; /* for freeing the entire list */ + long vinfo_mask; /* specifies the visual mask value */ + int n; /* number of matching visuals */ + int status; + + vinfo_template.visualid = colormap->visualid; + vinfo_mask = VisualIDMask; + if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &n)) == NULL) + return 0; + + /* A visual id may be valid on multiple screens. Also, there may + * be multiple visuals with identical visual ids at different depths. + * If the colormap is the Default Colormap, use the Default Visual. + * Otherwise, arbitrarily, use the deepest visual. + */ + vpointer = vinfo; + if (n > 1) + { + register int i; + register int screen_number; + Bool def_cmap; + + def_cmap = False; + for (screen_number = ScreenCount(dpy); --screen_number >= 0; ) + if (colormap->colormap == DefaultColormap(dpy, screen_number)) { + def_cmap = True; + break; + } + + if (def_cmap) { + for (i=0; i < n; i++, vinfo++) { + if (vinfo->visual == DefaultVisual(dpy, screen_number)) + break; + } + } else { + unsigned int maxdepth = 0; + XVisualInfo *v; + + for (i=0; i < n; i++, vinfo++) + if (vinfo->depth > maxdepth) { + maxdepth = vinfo->depth; + v = vinfo; + } + vinfo = v; + } + } + + if (vinfo->class == PseudoColor || vinfo->class == DirectColor || + vinfo->class == GrayScale) + status = readwrite_map(dpy, vinfo, colormap); + else if (vinfo->class == TrueColor) + status = TRUEMATCH(red_mult, red_max, red_mask) && + TRUEMATCH(green_mult, green_max, green_mask) && + TRUEMATCH(blue_mult, blue_max, blue_mask); + else + status = readonly_map(dpy, vinfo, colormap); + + XFree((char *) vpointer); + return status; +} + +/****************************************************************************/ +static Status readwrite_map(dpy, vinfo, colormap) + Display *dpy; + XVisualInfo *vinfo; + XStandardColormap *colormap; +{ + register unsigned long i, n; /* index counters */ + int ncolors; /* number of colors to be defined */ + int npixels; /* number of pixels allocated R/W */ + int first_index; /* first index of pixels to use */ + int remainder; /* first index of remainder */ + XColor color; /* the definition of a color */ + unsigned long *pixels; /* array of colormap pixels */ + unsigned long delta; + + + /* Determine ncolors, the number of colors to be defined. + * Insure that 1 < ncolors <= the colormap size. + */ + if (vinfo->class == DirectColor) { + ncolors = colormap->red_max; + if (colormap->green_max > ncolors) + ncolors = colormap->green_max; + if (colormap->blue_max > ncolors) + ncolors = colormap->blue_max; + ncolors++; + delta = lowbit(vinfo->red_mask) + + lowbit(vinfo->green_mask) + + lowbit(vinfo->blue_mask); + } else { + ncolors = colormap->red_max * colormap->red_mult + + colormap->green_max * colormap->green_mult + + colormap->blue_max * colormap->blue_mult + 1; + delta = 1; + } + if (ncolors <= 1 || ncolors > vinfo->colormap_size) return 0; + + /* Allocate Read/Write as much of the colormap as we can possibly get. + * Then insure that the pixels we were allocated are given in + * monotonically increasing order, using a quicksort. Next, insure + * that our allocation includes a subset of contiguous pixels at least + * as long as the number of colors to be defined. Now we know that + * these conditions are met: + * 1) There are no free cells in the colormap. + * 2) We have a contiguous sequence of pixels, monotonically + * increasing, of length >= the number of colors requested. + * + * One cell at a time, we will free, compute the next color value, + * then allocate read only. This takes a long time. + * This is done to insure that cells are allocated read only in the + * contiguous order which we prefer. If the server has a choice of + * cells to grant to an allocation request, the server may give us any + * cell, so that is why we do these slow gymnastics. + */ + + if ((pixels = (unsigned long *) calloc((unsigned) vinfo->colormap_size, + sizeof(unsigned long))) == NULL) + return 0; + + if ((npixels = ROmap(dpy, colormap->colormap, pixels, + vinfo->colormap_size, ncolors)) == 0) { + free((char *) pixels); + return 0; + } + + qsort((char *) pixels, npixels, sizeof(unsigned long), compare); + + if (!contiguous(pixels, npixels, ncolors, delta, &first_index, &remainder)) + { + /* can't find enough contiguous cells, give up */ + XFreeColors(dpy, colormap->colormap, pixels, npixels, + (unsigned long) 0); + free((char *) pixels); + return 0; + } + colormap->base_pixel = pixels[first_index]; + + /* construct a gray map */ + if (colormap->red_mult == 1 && colormap->green_mult == 1 && + colormap->blue_mult == 1) + for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) + { + color.pixel = n; + color.blue = color.green = color.red = + (unsigned short) ((i * 65535) / (colormap->red_max + + colormap->green_max + + colormap->blue_max)); + + if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, + first_index + i)) + return 0; + } + + /* construct a red ramp map */ + else if (colormap->green_max == 0 && colormap->blue_max == 0) + for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) + { + color.pixel = n; + color.red = (unsigned short) ((i * 65535) / colormap->red_max); + color.green = color.blue = 0; + + if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, + first_index + i)) + return 0; + } + + /* construct a green ramp map */ + else if (colormap->red_max == 0 && colormap->blue_max == 0) + for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) + { + color.pixel = n; + color.green = (unsigned short) ((i * 65535) / colormap->green_max); + color.red = color.blue = 0; + + if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, + first_index + i)) + return 0; + } + + /* construct a blue ramp map */ + else if (colormap->red_max == 0 && colormap->green_max == 0) + for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) + { + color.pixel = n; + color.blue = (unsigned short) ((i * 65535) / colormap->blue_max); + color.red = color.green = 0; + + if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, + first_index + i)) + return 0; + } + + /* construct a standard red green blue cube map */ + else + { +#define calc(max,mult) (((n / colormap->mult) % \ + (colormap->max + 1)) * 65535) / colormap->max + + for (n=0, i=0; i < ncolors; i++, n += delta) + { + color.pixel = n + colormap->base_pixel; + color.red = calc(red_max, red_mult); + color.green = calc(green_max, green_mult); + color.blue = calc(blue_max, blue_mult); + if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, + first_index + i)) + return 0; + } +#undef calc + } + /* We have a read-only map defined. Now free unused cells, + * first those occuring before the contiguous sequence begins, + * then any following the contiguous sequence. + */ + + if (first_index) + XFreeColors(dpy, colormap->colormap, pixels, first_index, + (unsigned long) 0); + if (remainder) + XFreeColors(dpy, colormap->colormap, + &(pixels[first_index + ncolors]), remainder, + (unsigned long) 0); + + free((char *) pixels); + return 1; +} + + +/****************************************************************************/ +static int ROmap(dpy, cmap, pixels, m, n) + Display *dpy; /* the X server connection */ + Colormap cmap; /* specifies colormap ID */ + unsigned long pixels[]; /* returns pixel allocations */ + int m; /* specifies colormap size */ + int n; /* specifies number of colors */ +{ + register int p; + + /* first try to allocate the entire colormap */ + if (XAllocColorCells(dpy, cmap, 1, (unsigned long *) NULL, + (unsigned) 0, pixels, (unsigned) m)) + return m; + + /* Allocate all available cells in the colormap, using a binary + * algorithm to discover how many cells we can allocate in the colormap. + */ + m--; + while (n <= m) { + p = n + ((m - n + 1) / 2); + if (XAllocColorCells(dpy, cmap, 1, (unsigned long *) NULL, + (unsigned) 0, pixels, (unsigned) p)) { + if (p == m) + return p; + else { + XFreeColors(dpy, cmap, pixels, p, (unsigned long) 0); + n = p; + } + } + else + m = p - 1; + } + return 0; +} + + +/****************************************************************************/ +static Status contiguous(pixels, npixels, ncolors, delta, first, rem) + unsigned long pixels[]; /* specifies allocated pixels */ + int npixels; /* specifies count of alloc'd pixels */ + int ncolors; /* specifies needed sequence length */ + unsigned long delta; /* between pixels */ + int *first; /* returns first index of sequence */ + int *rem; /* returns first index after sequence, + * or 0, if none follow */ +{ + register int i = 1; /* walking index into the pixel array */ + register int count = 1; /* length of sequence discovered so far */ + + *first = 0; + if (npixels == ncolors) { + *rem = 0; + return 1; + } + *rem = npixels - 1; + while (count < ncolors && ncolors - count <= *rem) + { + if (pixels[i-1] + delta == pixels[i]) + count++; + else { + count = 1; + *first = i; + } + i++; + (*rem)--; + } + if (count != ncolors) + return 0; + return 1; +} + + +/****************************************************************************/ +static Status ROorRWcell(dpy, cmap, pixels, npixels, color, p) + Display *dpy; + Colormap cmap; + unsigned long pixels[]; + int npixels; + XColor *color; + unsigned long p; +{ + unsigned long pixel; + XColor request; + + /* Free the read/write allocation of one cell in the colormap. + * Request a read only allocation of one cell in the colormap. + * If the read only allocation cannot be granted, give up, because + * there must be no free cells in the colormap. + * If the read only allocation is granted, but gives us a cell which + * is not the one that we just freed, it is probably the case that + * we are trying allocate White or Black or some other color which + * already has a read-only allocation in the map. So we try to + * allocate the previously freed cell with a read/write allocation, + * because we want contiguous cells for image processing algorithms. + */ + + pixel = color->pixel; + request.red = color->red; + request.green = color->green; + request.blue = color->blue; + + XFreeColors(dpy, cmap, &pixel, 1, (unsigned long) 0); + if (! XAllocColor(dpy, cmap, color) + || (color->pixel != pixel && + (!RWcell(dpy, cmap, color, &request, &pixel)))) + { + free_cells(dpy, cmap, pixels, npixels, (int)p); + return 0; + } + return 1; +} + + +/****************************************************************************/ +static void free_cells(dpy, cmap, pixels, npixels, p) + Display *dpy; + Colormap cmap; + unsigned long pixels[]; /* to be freed */ + int npixels; /* original number allocated */ + int p; +{ + /* One of the npixels allocated has already been freed. + * p is the index of the freed pixel. + * First free the pixels preceeding p, and there are p of them; + * then free the pixels following p, there are npixels - p - 1 of them. + */ + XFreeColors(dpy, cmap, pixels, p, (unsigned long) 0); + XFreeColors(dpy, cmap, &(pixels[p+1]), npixels - p - 1, (unsigned long) 0); + free((char *) pixels); +} + + +/****************************************************************************/ +static Status RWcell(dpy, cmap, color, request, pixel) + Display *dpy; + Colormap cmap; + XColor *color; + XColor *request; + unsigned long *pixel; +{ + unsigned long n = *pixel; + + XFreeColors(dpy, cmap, &(color->pixel), 1, (unsigned long)0); + if (! XAllocColorCells(dpy, cmap, (Bool) 0, (unsigned long *) NULL, + (unsigned) 0, pixel, (unsigned) 1)) + return 0; + if (*pixel != n) + { + XFreeColors(dpy, cmap, pixel, 1, (unsigned long) 0); + return 0; + } + color->pixel = *pixel; + color->flags = DoRed | DoGreen | DoBlue; + color->red = request->red; + color->green = request->green; + color->blue = request->blue; + XStoreColors(dpy, cmap, color, 1); + return 1; +} + + +/****************************************************************************/ +static int compare(e1, e2) + unsigned long *e1, *e2; +{ + if (*e1 < *e2) return -1; + if (*e1 > *e2) return 1; + return 0; +} + + +/****************************************************************************/ +static Status readonly_map(dpy, vinfo, colormap) + Display *dpy; + XVisualInfo *vinfo; + XStandardColormap *colormap; +{ + int i, last_pixel; + XColor color; + + last_pixel = (colormap->red_max + 1) * (colormap->green_max + 1) * + (colormap->blue_max + 1) + colormap->base_pixel - 1; + + for(i=colormap->base_pixel; i <= last_pixel; i++) { + + color.pixel = (unsigned long) i; + color.red = (unsigned short) + (((i/colormap->red_mult) * 65535) / colormap->red_max); + + if (vinfo->class == StaticColor) { + color.green = (unsigned short) + ((((i/colormap->green_mult) % (colormap->green_max + 1)) * + 65535) / colormap->green_max); + color.blue = (unsigned short) + (((i%colormap->green_mult) * 65535) / colormap->blue_max); + } + else /* vinfo->class == GrayScale, old style allocation XXX */ + color.green = color.blue = color.red; + + XAllocColor(dpy, colormap->colormap, &color); + if (color.pixel != (unsigned long) i) + return 0; + } + return 1; +} diff --git a/ng/Togl2.1/Xmu/DelCmap.c b/ng/Togl2.1/Xmu/DelCmap.c new file mode 100644 index 00000000..b02e3b80 --- /dev/null +++ b/ng/Togl2.1/Xmu/DelCmap.c @@ -0,0 +1,67 @@ +/* $XConsortium: DelCmap.c,v 1.2 94/04/17 20:15:58 converse Exp $ */ + +/* + +Copyright (c) 1989 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +*/ + +/* + * Author: Donna Converse, MIT X Consortium + */ + +#include +#include + +/* To remove any standard colormap property, use XmuDeleteStandardColormap(). + * XmuDeleteStandardColormap() will remove the specified property from the + * specified screen, releasing any resources used by the colormap(s) of the + * property if possible. + */ + +void XmuDeleteStandardColormap(dpy, screen, property) + Display *dpy; /* specifies the X server to connect to */ + int screen; /* specifies the screen of the display */ + Atom property; /* specifies the standard colormap property */ +{ + XStandardColormap *stdcmaps, *s; + int count = 0; + + if (XGetRGBColormaps(dpy, RootWindow(dpy, screen), &stdcmaps, &count, + property)) + { + for (s=stdcmaps; count > 0; count--, s++) { + if ((s->killid == ReleaseByFreeingColormap) && + (s->colormap != None) && + (s->colormap != DefaultColormap(dpy, screen))) + XFreeColormap(dpy, s->colormap); + else if (s->killid != None) + XKillClient(dpy, s->killid); + } + XDeleteProperty(dpy, RootWindow(dpy, screen), property); + XFree((char *) stdcmaps); + XSync(dpy, False); + } +} + diff --git a/ng/Togl2.1/Xmu/LookupCmap.c b/ng/Togl2.1/Xmu/LookupCmap.c new file mode 100644 index 00000000..02033d8e --- /dev/null +++ b/ng/Togl2.1/Xmu/LookupCmap.c @@ -0,0 +1,311 @@ +/* $XConsortium: LookupCmap.c,v 1.10 94/04/17 20:16:11 rws Exp $ */ + +/* + +Copyright (c) 1989 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +*/ + +/* + * Author: Donna Converse, MIT X Consortium + */ + +#include +#include +#include +#include +#include +#include + +static Status lookup(); + +/* + * To create a standard colormap if one does not currently exist, or + * replace the currently existing standard colormap, use + * XmuLookupStandardColormap(). + * + * Given a screen, a visual, and a property, XmuLookupStandardColormap() + * will determine the best allocation for the property under the specified + * visual, and determine the whether to create a new colormap or to use + * the default colormap of the screen. It will call XmuStandardColormap() + * to create the standard colormap. + * + * If replace is true, any previous definition of the property will be + * replaced. If retain is true, the property and the colormap will be + * made permanent for the duration of the server session. However, + * pre-existing property definitions which are not replaced cannot be made + * permanent by a call to XmuLookupStandardColormap(); a request to retain + * resources pertains to newly created resources. + * + * Returns 0 on failure, non-zero on success. A request to create a + * standard colormap upon a visual which cannot support such a map is + * considered a failure. An example of this would be requesting any + * standard colormap property on a monochrome visual, or, requesting an + * RGB_BEST_MAP on a display whose colormap size is 16. + */ + +Status XmuLookupStandardColormap(dpy, screen, visualid, depth, property, + replace, retain) + Display *dpy; /* specifies X server connection */ + int screen; /* specifies screen of display */ + VisualID visualid; /* specifies the visual type */ + unsigned int depth; /* specifies the visual type */ + Atom property; /* a standard colormap property */ + Bool replace; /* specifies whether to replace */ + Bool retain; /* specifies whether to retain */ +{ + Display *odpy; /* original display connection */ + XStandardColormap *colormap; + XVisualInfo vinfo_template, *vinfo; /* visual */ + long vinfo_mask; + unsigned long r_max, g_max, b_max; /* allocation */ + int count; + Colormap cmap; /* colormap ID */ + Status status = 0; + + + /* Match the requested visual */ + + vinfo_template.visualid = visualid; + vinfo_template.screen = screen; + vinfo_template.depth = depth; + vinfo_mask = VisualIDMask | VisualScreenMask | VisualDepthMask; + if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &count)) == + NULL) + return 0; + + /* Monochrome visuals have no standard maps */ + + if (vinfo->colormap_size <= 2) { + XFree((char *) vinfo); + return 0; + } + + /* If the requested property already exists on this screen, and, + * if the replace flag has not been set to true, return success. + * lookup() will remove a pre-existing map if replace is true. + */ + + if (lookup(dpy, screen, visualid, property, (XStandardColormap *) NULL, + replace) && !replace) { + XFree((char *) vinfo); + return 1; + } + + /* Determine the best allocation for this property under the requested + * visualid and depth, and determine whether or not to use the default + * colormap of the screen. + */ + + if (!XmuGetColormapAllocation(vinfo, property, &r_max, &g_max, &b_max)) { + XFree((char *) vinfo); + return 0; + } + + cmap = (property == XA_RGB_DEFAULT_MAP && + visualid == XVisualIDFromVisual(DefaultVisual(dpy, screen))) + ? DefaultColormap(dpy, screen) : None; + + /* If retaining resources, open a new connection to the same server */ + + if (retain) { + odpy = dpy; + if ((dpy = XOpenDisplay(XDisplayString(odpy))) == NULL) { + XFree((char *) vinfo); + return 0; + } + } + + /* Create the standard colormap */ + + colormap = XmuStandardColormap(dpy, screen, visualid, depth, property, + cmap, r_max, g_max, b_max); + + /* Set the standard colormap property */ + + if (colormap) { + XGrabServer(dpy); + + if (lookup(dpy, screen, visualid, property, colormap, replace) && + !replace) { + /* Someone has defined the property since we last looked. + * Since we will not replace it, release our own resources. + * If this is the default map, our allocations will be freed + * when this connection closes. + */ + if (colormap->killid == ReleaseByFreeingColormap) + XFreeColormap(dpy, colormap->colormap); + } + else if (retain) { + XSetCloseDownMode(dpy, RetainPermanent); + } + XUngrabServer(dpy); + XFree((char *) colormap); + status = 1; + } + + if (retain) + XCloseDisplay(dpy); + XFree((char *) vinfo); + return status; +} + +/***************************************************************************/ + +/* Lookup a standard colormap property. If the property is RGB_DEFAULT_MAP, + * the visualid is used to determine whether the indicated standard colormap + * exists. If the map exists and replace is true, delete the resources used + * by the map and remove the property. Return true if the map exists, + * or did exist and was deleted; return false if the map was not found. + * + * Note that this is not the way that a Status return is normally used. + * + * If new is not NULL, new points to an XStandardColormap structure which + * describes a standard colormap of the specified property. It will be made + * a standard colormap of the screen if none already exists, or if replace + * is true. + */ + +static Status lookup(dpy, screen, visualid, property, new, replace) + Display *dpy; /* specifies display connection */ + int screen; /* specifies screen number */ + VisualID visualid; /* specifies visualid for std map */ + Atom property; /* specifies colormap property name */ + XStandardColormap *new; /* specifies a standard colormap */ + Bool replace; /* specifies whether to replace */ +{ + register int i; + int count; + XStandardColormap *stdcmaps, *s; + Window win = RootWindow(dpy, screen); + + /* The property does not already exist */ + + if (! XGetRGBColormaps(dpy, win, &stdcmaps, &count, property)) { + if (new) + XSetRGBColormaps(dpy, win, new, 1, property); + return 0; + } + + /* The property exists and is not describing the RGB_DEFAULT_MAP */ + + if (property != XA_RGB_DEFAULT_MAP) { + if (replace) { + XmuDeleteStandardColormap(dpy, screen, property); + if (new) + XSetRGBColormaps(dpy, win, new, 1, property); + } + XFree((char *)stdcmaps); + return 1; + } + + /* The property exists and is RGB_DEFAULT_MAP */ + + for (i=0, s=stdcmaps; (i < count) && (s->visualid != visualid); i++, s++) + ; + + /* No RGB_DEFAULT_MAP property matches the given visualid */ + + if (i == count) { + if (new) { + XStandardColormap *m, *maps; + + s = (XStandardColormap *) malloc((unsigned) ((count+1) * sizeof + (XStandardColormap))); + + for (i = 0, m = s, maps = stdcmaps; i < count; i++, m++, maps++) { + m->colormap = maps->colormap; + m->red_max = maps->red_max; + m->red_mult = maps->red_mult; + m->green_max = maps->green_max; + m->green_mult = maps->green_mult; + m->blue_max = maps->blue_max; + m->blue_mult = maps->blue_mult; + m->base_pixel = maps->base_pixel; + m->visualid = maps->visualid; + m->killid = maps->killid; + } + m->colormap = new->colormap; + m->red_max = new->red_max; + m->red_mult = new->red_mult; + m->green_max = new->green_max; + m->green_mult = new->green_mult; + m->blue_max = new->blue_max; + m->blue_mult = new->blue_mult; + m->base_pixel = new->base_pixel; + m->visualid = new->visualid; + m->killid = new->killid; + + XSetRGBColormaps(dpy, win, s, ++count, property); + free((char *) s); + } + XFree((char *) stdcmaps); + return 0; + } + + /* Found an RGB_DEFAULT_MAP property with a matching visualid */ + + if (replace) { + /* Free old resources first - we may need them, particularly in + * the default colormap of the screen. However, because of this, + * it is possible that we will destroy the old resource and fail + * to create a new one if XmuStandardColormap() fails. + */ + + if (count == 1) { + XmuDeleteStandardColormap(dpy, screen, property); + if (new) + XSetRGBColormaps(dpy, win, new, 1, property); + } + else { + XStandardColormap *map; + + /* s still points to the matching standard colormap */ + + if (s->killid == ReleaseByFreeingColormap) { + if ((s->colormap != None) && + (s->colormap != DefaultColormap(dpy, screen))) + XFreeColormap(dpy, s->colormap); + } + else if (s->killid != None) + XKillClient(dpy, s->killid); + + map = (new) ? new : stdcmaps + --count; + + s->colormap = map->colormap; + s->red_max = map->red_max; + s->red_mult = map->red_mult; + s->green_max = map->green_max; + s->green_mult = map->green_mult; + s->blue_max = map->blue_max; + s->blue_mult = map->blue_mult; + s->visualid = map->visualid; + s->killid = map->killid; + + XSetRGBColormaps(dpy, win, stdcmaps, count, property); + } + } + XFree((char *) stdcmaps); + return 1; +} diff --git a/ng/Togl2.1/Xmu/README.togl b/ng/Togl2.1/Xmu/README.togl new file mode 100644 index 00000000..5cff1151 --- /dev/null +++ b/ng/Togl2.1/Xmu/README.togl @@ -0,0 +1,3 @@ +The source code in this directory is a subset of the Jun 12, 1995 X11R6 Xmu +library that is needed for the Togl widget. The Xmu library is no longer +installed by default on many Linux systems. diff --git a/ng/Togl2.1/Xmu/StdCmap.c b/ng/Togl2.1/Xmu/StdCmap.c new file mode 100644 index 00000000..62c0a942 --- /dev/null +++ b/ng/Togl2.1/Xmu/StdCmap.c @@ -0,0 +1,219 @@ +/* $XConsortium: StdCmap.c,v 1.14 94/04/17 20:16:14 rws Exp $ */ + +/* + +Copyright (c) 1989 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +*/ + +/* + * Author: Donna Converse, MIT X Consortium + */ + +#include +#include +#include +#include +#include + +#define lowbit(x) ((x) & (~(x) + 1)) + +static Status valid_args(); /* argument restrictions */ + +/* + * To create any one standard colormap, use XmuStandardColormap(). + * + * Create a standard colormap for the given screen, visualid, and visual + * depth, with the given red, green, and blue maximum values, with the + * given standard property name. Return a pointer to an XStandardColormap + * structure which describes the newly created colormap, upon success. + * Upon failure, return NULL. + * + * XmuStandardColormap() calls XmuCreateColormap() to create the map. + * + * Resources created by this function are not made permanent; that is the + * caller's responsibility. + */ + +XStandardColormap *XmuStandardColormap(dpy, screen, visualid, depth, property, + cmap, red_max, green_max, blue_max) + Display *dpy; /* specifies X server connection */ + int screen; /* specifies display screen */ + VisualID visualid; /* identifies the visual type */ + unsigned int depth; /* identifies the visual type */ + Atom property; /* a standard colormap property */ + Colormap cmap; /* specifies colormap ID or None */ + unsigned long red_max, green_max, blue_max; /* allocations */ +{ + XStandardColormap *stdcmap; + Status status; + XVisualInfo vinfo_template, *vinfo; + long vinfo_mask; + int n; + + /* Match the required visual information to an actual visual */ + vinfo_template.visualid = visualid; + vinfo_template.screen = screen; + vinfo_template.depth = depth; + vinfo_mask = VisualIDMask | VisualScreenMask | VisualDepthMask; + if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &n)) == NULL) + return 0; + + /* Check the validity of the combination of visual characteristics, + * allocation, and colormap property. Create an XStandardColormap + * structure. + */ + + if (! valid_args(vinfo, red_max, green_max, blue_max, property) + || ((stdcmap = XAllocStandardColormap()) == NULL)) { + XFree((char *) vinfo); + return 0; + } + + /* Fill in the XStandardColormap structure */ + + if (cmap == DefaultColormap(dpy, screen)) { + /* Allocating out of the default map, cannot use XFreeColormap() */ + Window win = XCreateWindow(dpy, RootWindow(dpy, screen), 1, 1, 1, 1, + 0, 0, InputOnly, vinfo->visual, + (unsigned long) 0, + (XSetWindowAttributes *)NULL); + stdcmap->killid = (XID) XCreatePixmap(dpy, win, 1, 1, depth); + XDestroyWindow(dpy, win); + stdcmap->colormap = cmap; + } else { + stdcmap->killid = ReleaseByFreeingColormap; + stdcmap->colormap = XCreateColormap(dpy, RootWindow(dpy, screen), + vinfo->visual, AllocNone); + } + stdcmap->red_max = red_max; + stdcmap->green_max = green_max; + stdcmap->blue_max = blue_max; + if (property == XA_RGB_GRAY_MAP) + stdcmap->red_mult = stdcmap->green_mult = stdcmap->blue_mult = 1; + else if (vinfo->class == TrueColor || vinfo->class == DirectColor) { + stdcmap->red_mult = lowbit(vinfo->red_mask); + stdcmap->green_mult = lowbit(vinfo->green_mask); + stdcmap->blue_mult = lowbit(vinfo->blue_mask); + } else { + stdcmap->red_mult = (red_max > 0) + ? (green_max + 1) * (blue_max + 1) : 0; + stdcmap->green_mult = (green_max > 0) ? blue_max + 1 : 0; + stdcmap->blue_mult = (blue_max > 0) ? 1 : 0; + } + stdcmap->base_pixel = 0; /* base pixel may change */ + stdcmap->visualid = vinfo->visualid; + + /* Make the colormap */ + + status = XmuCreateColormap(dpy, stdcmap); + + /* Clean up */ + + XFree((char *) vinfo); + if (!status) { + + /* Free the colormap or the pixmap, if we created one */ + if (stdcmap->killid == ReleaseByFreeingColormap) + XFreeColormap(dpy, stdcmap->colormap); + else if (stdcmap->killid != None) + XFreePixmap(dpy, stdcmap->killid); + + XFree((char *) stdcmap); + return (XStandardColormap *) NULL; + } + return stdcmap; +} + +/****************************************************************************/ +static Status valid_args(vinfo, red_max, green_max, blue_max, property) + XVisualInfo *vinfo; /* specifies visual */ + unsigned long red_max, green_max, blue_max; /* specifies alloc */ + Atom property; /* specifies property name */ +{ + unsigned long ncolors; /* number of colors requested */ + + /* Determine that the number of colors requested is <= map size */ + + if ((vinfo->class == DirectColor) || (vinfo->class == TrueColor)) { + unsigned long mask; + + mask = vinfo->red_mask; + while (!(mask & 1)) + mask >>= 1; + if (red_max > mask) + return 0; + mask = vinfo->green_mask; + while (!(mask & 1)) + mask >>= 1; + if (green_max > mask) + return 0; + mask = vinfo->blue_mask; + while (!(mask & 1)) + mask >>= 1; + if (blue_max > mask) + return 0; + } else if (property == XA_RGB_GRAY_MAP) { + ncolors = red_max + green_max + blue_max + 1; + if (ncolors > vinfo->colormap_size) + return 0; + } else { + ncolors = (red_max + 1) * (green_max + 1) * (blue_max + 1); + if (ncolors > vinfo->colormap_size) + return 0; + } + + /* Determine that the allocation and visual make sense for the property */ + + switch (property) + { + case XA_RGB_DEFAULT_MAP: + if (red_max == 0 || green_max == 0 || blue_max == 0) + return 0; + break; + case XA_RGB_RED_MAP: + if (red_max == 0) + return 0; + break; + case XA_RGB_GREEN_MAP: + if (green_max == 0) + return 0; + break; + case XA_RGB_BLUE_MAP: + if (blue_max == 0) + return 0; + break; + case XA_RGB_BEST_MAP: + if (red_max == 0 || green_max == 0 || blue_max == 0) + return 0; + break; + case XA_RGB_GRAY_MAP: + if (red_max == 0 || blue_max == 0 || green_max == 0) + return 0; + break; + default: + return 0; + } + return 1; +} diff --git a/ng/Togl2.1/Xmu/StdCmap.h b/ng/Togl2.1/Xmu/StdCmap.h new file mode 100644 index 00000000..a1cdd2e7 --- /dev/null +++ b/ng/Togl2.1/Xmu/StdCmap.h @@ -0,0 +1,112 @@ +/* $XConsortium: StdCmap.h,v 1.4 94/04/17 20:16:15 converse Exp $ */ + +/* + +Copyright (c) 1988 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +*/ + +/* + * The interfaces described by this header file are for miscellaneous utilities + * and are not part of the Xlib standard. + */ + +#ifndef _XMU_STDCMAP_H_ +#define _XMU_STDCMAP_H_ + +#include + +_XFUNCPROTOBEGIN + +Status XmuAllStandardColormaps( +#if NeedFunctionPrototypes + Display* /* dpy */ +#endif +); + +Status XmuCreateColormap( +#if NeedFunctionPrototypes + Display* /* dpy */, + XStandardColormap* /* colormap */ +#endif +); + +void XmuDeleteStandardColormap( +#if NeedFunctionPrototypes + Display* /* dpy */, + int /* screen */, + Atom /* property */ +#endif +); + +Status XmuGetColormapAllocation( +#if NeedFunctionPrototypes + XVisualInfo* /* vinfo */, + Atom /* property */, + unsigned long* /* red_max_return */, + unsigned long* /* green_max_return */, + unsigned long* /* blue_max_return */ +#endif +); + +Status XmuLookupStandardColormap( +#if NeedFunctionPrototypes + Display* /* dpy */, + int /* screen */, + VisualID /* visualid */, + unsigned int /* depth */, + Atom /* property */, + Bool /* replace */, + Bool /* retain */ +#endif +); + +XStandardColormap *XmuStandardColormap( +#if NeedFunctionPrototypes + Display* /* dpy */, + int /* screen */, + VisualID /* visualid */, + unsigned int /* depth */, + Atom /* property */, + Colormap /* cmap */, + unsigned long /* red_max */, + unsigned long /* green_max */, + unsigned long /* blue_max */ +#endif +); + +Status XmuVisualStandardColormaps( +#if NeedFunctionPrototypes + Display* /* dpy */, + int /* screen */, + VisualID /* visualid */, + unsigned int /* depth */, + Bool /* replace */, + Bool /* retain */ +#endif +); + +_XFUNCPROTOEND + +#endif /* _XMU_STDCMAP_H_ */ diff --git a/ng/Togl2.1/aclocal.m4 b/ng/Togl2.1/aclocal.m4 new file mode 100644 index 00000000..a4f25fc6 --- /dev/null +++ b/ng/Togl2.1/aclocal.m4 @@ -0,0 +1,80 @@ +# +# Include the TEA standard macro set +# + +builtin(include,tclconfig/tcl.m4) + +# +# Add here whatever m4 macros you want to define for your package +# + +#------------------------------------------------------------------------ +# TOGL_ENABLE_STUBS -- +# +# Specifiy if stubs should be used. +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-stubs +# +#------------------------------------------------------------------------ + +AC_DEFUN(TOGL_ENABLE_STUBS, [ + AC_MSG_CHECKING([whether to link with stubs library]) + AC_ARG_ENABLE(stubs, + [ --enable-stubs build and link with stub libraries (--enable-stubs)], + [tcl_ok=$enableval], [tcl_ok=yes]) + + if test "${enable_stubs+set}" = set; then + enableval="$enable_stubs" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" ; then + AC_MSG_RESULT([stubs]) + USE_STUBS=1 + else + AC_MSG_RESULT([no stubs]) + USE_STUBS=0 + fi +]) + +#------------------------------------------------------------------------ +# TOGL_UNDEF_GET_PROC_ADDRESS -- +# +# Does defining GLX_GLXEXT_LEGACY interfer with including GL/glxext.h? +# +# Arguments: +# none +# +# Results: +# +# defines TOGL_UNDEF_GET_PROC_ADDRESS +# +#------------------------------------------------------------------------ +AC_DEFUN(TOGL_UNDEF_GET_PROC_ADDRESS, [ + AC_MSG_CHECKING([if GLX_GLXEXT_LEGACY interfers with including GL/glxext.h]) + AC_LANG_PUSH(C) + ac_save_CFLAGS=$CFLAGS + CFLAGS=$TK_XINCLUDES + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[ +#define GLX_GLXEXT_LEGACY +#include +#undef GLX_VERSION_1_3 +#undef GLX_VERSION_1_4 +#include +int main() { return 0; } +]])], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + AC_DEFINE(UNDEF_GET_PROC_ADDRESS, 1)]) + CFLAGS=$ac_save_CFLAGS + AC_LANG_POP() +]) diff --git a/ng/Togl2.1/ben.rgb b/ng/Togl2.1/ben.rgb new file mode 100644 index 0000000000000000000000000000000000000000..4eb067a23eaf7441b71fc762313de1dab562878d GIT binary patch literal 49959 zcmeIbiIZj7UEg_{_cE)hB~S|OYHd#|ixAYM0Gn0tBo>2NlT|`kXs*~7vm`s&xx8E| zYw7B)?!LWgYpJC~3m`BUfk}|VjvVgT;Texto|)Y-cFe>~4C5J3Ow99qKHqa+W;H?h z515#)zIorf%Q?T__qU$kIrqN1{^ebFl~I|Mck#FW_aEH-_)omz$KU>A?QrP--~E3V zfwg~B%BO!P9N+~a1E#;mYrM&dTrM&FPQeN?SrA$6v%B#Ml zlvjVEl-GVuDX;sJQa*FNl+XHSrM&*zOZl9CT*~KuZz-SmUzgIny_C=YZ%X-s?=R&G z|E!e1^43!RD#yR%J4*S||Gtzje`hIQ@xPSvl|NU?^g=0by04V4zPpsKxmn8BJ-?K{ zM&IA?qEi0)7R2+`pDpEk|4k|1 z_uZxZjel6m_kVdQ@Ayb5?JG-pCvE)TGfMfPUn=E?|EE%Z^qWihu|F*3Cph<$^!qpe zT`52P4W;}H*Kb@Z<>$cT=i&Jm{)bY2={2SN^4m)J73lialTtSSZ7EyOyZwSvb~v|t zrIgthm9odS|5>FRytb6Xrj)BMFXiZSOS$%jQm*s)2FGtg!_5zua^Fvsatq#W{fkoW z2kQsG@HTin_yuhLp_GSL*#2oL-PKYa`KD4HeHL3^%46{QICwtsDz-l_4ZA1mcUUscL6bRUELul;T*AD)%+ksmJQ zqa6PjIDQNae*K@9@*5v3PJD)6u)fN_qLK(YxO&<&|HE-XX8oK+9|Yq?FJ2 zdi0JqKASdP|4&MJ!?&Y%v~?MJn?Eb%3i~hM`xm_py@Td2{!aAnPfPi-cc6FZ$Qz;a zEB_z#4t(DHY3SXxQoa^mz7E>H{yFGfSIRfO0KJ2!Z+RYi_e3e{_n>#^(RcFwyP)xV zR?)kkNALdEQr?D4zV9EG^7c2QcfViCfAU)N?%k#Q0B!srIRDW9QOb{S&5xeqSudk^ zkD_zn`BN==_sLRz_GReZ26_jMzksZN@mtWlo9Nx&NALbUI)}dB`_<^(+tE8@xwDDh z9iVqd=-nQA_lxM=E_(ON=-n@&cl+qw7JA3=8$W~2eL35oqjw)h=iY+Ot+D+9diQbk z?kRNcr%QPVj2`|5bPoPI=y(K79{pN$4tsd)KSS>xLFd5rU7yXiK<_yAp7)@4=-2z+ ziq3rrItL%`hu05)#Z&P5!H=MK&~yCP&^dVcHL&_H$3OBx^lk^8`!00u%h0(OvY`XN z`Onci&i@wJ{q_-h2d}^LHR#++*#0eg_gm;4cz%NWe*cTnxo5EbOZ4v7(YYT*=U&71 zPtm!bLf;D81Lzt!e-gQW@>l)v zYbVI*m46#w2VbwDvDbYqdiS5>>(I5&rj5^G{|4y&yzfEp{tRCSHdp>Dd>#8Q`cr(} zThKesf9c!MyMK+Z`w{f+&rA8LZG0Uve)9poj{Vm@h_8D#diN;4?#1ZcWB5As=3Dsw zZScJg#@}%ddiOBC4qg2o_2Yjj#K0 z^bS0J?5ohbV|?B7(7Rto@BSIS?hDX6^m_x^e*O#5JM`oie-FK*?O*v!d>wpkBBOh0 zbL$i6-G7SSao_HrqIdr-diPJzJ8(Fdqj&7D^8JW&*Zu)|_Ycv#6LjuxqH~|ihR?b6 z7&?b6?_Z#E@NxU!pm!fb?>>s&fqVDY(K(Jk0>+OXqI2lX+G7J-fMr7&Er4ChFo$EyDe@%%m$9-huGfE_Exs`+T;qW&2V#YV|)Fu{|xpMHgvhXfbB(Wn{3-`TWr5N zY#via9=n%qm(6otrySK8zpFD|eY9$DPO<4-Kmq`z<2dh8L4+mxxbOm>d;rQ+18Xz9r9lF zNZs<-o7ui{*p%&?*p$7W)o;(M@9Kwp`%`D!+oyDSotxj6dbGU8wmk0j%Qoc6&)>qP zy|^v=a=)a*{=8ovq*+?zPr9Z5bJ*~A(Z31%7qY2yFK63hQ?|-TS^L>zv*EjX;I`Bm zX&+>%)W0#T(g_#h0^vA)D7P&nss?E4MFW`${&i`zkh%Dd(?d zTk3~0SAUeb$LvEr^Sj62!e;v(w~eI^x|hD?cWLyq?fF?=ynm^4-fx?4WRo8C^i6E` zx$NI#U%}@2C2yDcERU~adoA1Z*`C98&->eEGM#KRYisRvZPKi@P1kQs+ey>*i}iLg zY3K89GHSQy{iwY*Z5NBSZCZBSsC{&Eu~_d~E?ji%*B6TuzO8qQ#r~+h)%Oioc57>; zq1|TMjXAdHr(Du4dYb6gC+%u;*R;I9X(lBkG>}l%8v5QS4L9}udNY|c^LaZNHQV!U z)a*{1#bTw|p#{EdF8cLRb7Xt#O|#xFPDaga9qRVEyzj=GT9c_sQ>N{>+2z9Ns5xvG zJ#9DZlM8=&_aIQaUku$h>At7&AVALoF={{n3W1Do0|9_j5rBYx+`Lx+N(F!m8xg2C zG!6H_8^~b?D#q;|*U`|p-R_=l5T`5n72=Ic4 z5+YiOXi5VSm)Rfp`{QQkq@RwPTk}Ob1$0P&V59;b*Mz0vXa@XRZfWQk*-pJ zmRAsvgqNs9`+YABsN#0pA_{!r`gGEaCQmjkyiXu~()Rn%C8S-0EReb~;9IcV=Py|E zca8$KlCarE4vOX7-F(q^TtDwxjAWyktnrVJ3NV7Z(Md_0i@N@a(c-RSXn@(#<9u1nN9}Bi4AwCT z!~)Wqg5YCA9=-3lpLEBxFhL!r8}0hIz3v5E;ckM}>_tE* zq}k}_cqFL+zQr+;m_tN-h3=`!B_3nkJS+*w;<%f%$AxAgp=>nk5g(E`QWErM>nokT z2L*aBcc9Q*;e0m-E_z?2_m1AL(z{|9x<{?({wXj}DDuWW7&O>X4*^$}1hicEFaqFw zy>NnLXx#6Bz@QKHfUu}8xJ@S0X|Kx?+haty&duveqenKlea&GP8`MJZRfyt*FBk=) z=+|+Pie%KH`pBL8h&$8C`YMKmmv8Tjz_bzDqUpO9clCuh(GE0V6VOnm-HBAvt27jp z86dYi9Lf$pJ`R5ls8E1v&!C_IC2XTxZ*bdjS+iE98#Q}~w?IL&z2Nr2zi)BdZrgR3 zM0tM!fkADD-uv2nMWCR@_TJk&{Ob*MZ$h8`AESRglY&_G?@6S?#Rs+jh90lCT*!$? ztQlbs+ueWw@ffV|NL;Odo*)In=tO0pUo$6?e)@Y!>>&64~@u+#9daxt`6e739!kw65agdHabX)UJ>C5Ao zEr6keS_Bk=T5XhkY1H1&*Te|;r%hcOKBY^BG-~0TsQX)(MTL5?!M;;FKpt6`MIi`v z-!OtEBP#gUGG=^-l735tn3o5o!>ma;>4@+si@I*FA{)e8xRmF;1D3<(D=O3ku8nZy2;wKn@o=T zuJNwECyQ;3)hmMwGEXGt>UxL*yHEq5n8LnUlTq4(sM#2|w2nL*BlHHK;={1$;1s*#HAtAw-x|;mlBG zC9&Is2NB`}wg2P_wSUty?zpn-AHiZFnEKGYHUTJHa|IVsyJuXI#GVxD36!2oy@(iP z|FH}ZgfXr@xa{0`kQ6I#y#)2WECdh?s|f4?zG<8AwE> zK!x~E%wGAr-m{Nu!Oi0k!1ED^@Q^VRzoW9kHrxy5h(u@r3HDb+qIM_^NNUvl1B4MGKmt?IMQMaU0pe%rEqANNKtW0XIh^os z9g`^|ummq`0uOc6lEO~geIn%A%H+24z$R(VBv#`vG+e{P7jq;qMMI3z^LdpH@*s=C z*t+{j94pl55QyWB?%RhFg{tu)Fhps5XSYqp($4UNy>@Zr@R~e+oosVuay`PBiZLW$ z`}%F@FXpivCV*lVyLj;`8r(M{n(zq;6=@QfQFDV_voI!2)Nx!`&4Ozj&yn{Y6T_Fi zcgx->DGI<96x!a2QMuuk{1d(5KTxJ~<0RIF35?n&!$0SM1Ccaze#OoerQVbFXzoyb z5nWk0Mhc_8JjE4wrf$=8Utur=T-1R?PYSI=qKm0sWkIOW4%^+6xE2KAx9*tOONgfN zW4uGY4uBsb?UtxwY$n$2YZHiov)#gMmtk#!r6RxzLqnPRWxdCJ?3y&Km=d)Nsp%W+ zswxtVJzrDD`yoI*i+Yl}^3^;SjXlH^+RmXJfUkG^N-oZM52|zwXPH8!prSBPkRD7O zp+E?7vn2dsjn|NnUbRIB4jFCIo6M%Iw9(j09vHqj!E`{N-{0v=yLgpg!b0|q0k9kz5^ z`Uj$fU)`yB4uJdh3BD1@sQ$Ujn540Rz7uF=UFg-q zW#>lGxn61L+`ewwxvU#3s{PU>1j{>zM%uwgvE7fJ~MS-Zg2(IcX0G z4y3ZX+8thqF+D1N%>gxrFjvP%-2q>Le;pTgsDU7h4HBgLPt2Ra2s5xPZom%A5k4AM zWGx69QWl#uC)hL46B1xNDQh#;ImH%|D?&peZY^!lpgKdo7X9}tW1V0P2yLOl)f}AQ zMu@&KlSLgqFp4x?`=Ife@bNSflHfa72?=25Kv7qKT$UuL03W8?*o6E;1vt1v6!-;H zUtx8S-jxkJ&`x{8UmQY=SDPYebpc}6;5cgD)$LE(eJlZ6uoR>C=ue+SEAthrM~Y@j z8cj+%Xgl3y_(ohBb-UB-j@B6=oG1ic(ZTVAln#N$6cFQePU@60O0Tx?kR*US{YwJ% zCc@dm(PkyVGb+SU=#I~gq@2SHF=yG*m3 zVi2Gym@Hw5%iae7(tCA(@J~6Vv-?Mg5zX{UxCdCRjUH)$PAGPuWh5kya*wP(oCu#m zW$6D3A0HM?3j;cQN9YO&92mph=ol^VeWPR0)Zz~w*8m8mv^r-@#tvfRm*8}z{fJ&E zZioz(?&5gJpZAB+gUzDzx+8=5VTbhfb&NG`a9B%FYTQB2N~r?^7%HIY8|G(~0N}xt zIX3UH4`?-kcdrBZ7;Zi)0wLj}dLQzbeN=>Vsw6DLH5m*CfElMhy$95T5<b1DJ@V;Dj*Fkmw_$+*yfqJIK}QS;s_chaDdM<&96W7JWN+Yf8`2&&Ei;A8MK zkU)w%Z?ABN=F1Imwa(D$uC9Ev#~ATP?Iz`30=n^fKjplHW=>=rtsTTDfElc5f~d^M z4M_lc;zQ>Eu3zb>$Ex}#sXs9+Wk?P7I)7IROAbG{2JoS|2ypQ$?VEWlKZy4|u{1Ch`vjVvoC)f>HYr-6Q~0H3w%z0S(&2 zje!P+wmO2SrfTf|VT#GVVZ*7|W#mNeFRZqkuNRF29Gv7iM6x^8vB0lSVz+KnT z9o8UmEIlLi;eL`PQO_U#hQcijZfkPaK0#rRDGIcdJag!pqIZ9y518YPhH*2Ru*BZ{ zCy6;-r;=J;iifKf&!cangz%RLDs`MQ3|FnnxRjNlTIDNQr>?3ybmlwc;y#nuJ{4mWjP z6AXxv8zbel)C3@le@TL_#}Lqe-3O4;39?u9`*Fv>9>>xd2av!Ce{N_R0b0CpSMGYveK`(gMq~wUZ(LT)JJSNW)^8nMjNppm1 zR?bfFZZoMxw@iUh^$scCPdNqjiJjd-bD@xcT+aLVjJ|N_pH+!93?wNc1+@Pw@QyW* zkqfy$0PElPRPaJp>*V_ z&4~Rer#LBRCOaY~S=A#MfmConG|7h?DAa--eMdKJ5ml5PT7sZhf$j-Mpm%U~D-mOV zrMWi8*WJ2^`2T7=m zbuzLX;0FrwktjVnT_>TP*ifS(&_Dpa9Z{{if<(vanW+>J3rvBk+XYJME--KBT{=%_ zL&S`s0&J6b;mG<}>WC4->9S+zRdodZezg=|{r)+pOG;l-py)a*I_d&^mQ=B)l@?czCgT?t;|}5ATSmI0IWUsv zagd}BTsp2W3C*Z3QiC(Z;h6;UQMaP}pCXPrQ%f~DE=W5t-+<{UXV$|#y_<}j5Q*VV z0Ha}$72}3l^5*-LhNKQx;EfK3iW9jHvkRlhr}5~XWYstxhoHoh0Zr|0-faz z=Gnl2D-h}~H4=BUiRQ#nY0sZ1jQLjijnbu;r&qQF&2bK*d!^n_m|s#Y_gq2~*c z*$dW*8zhW9onx7s4v+SoT`6`B!zk-co#l*Irt8izF;lJ#11dMsMi>eS?Zc8>)k}D) zs=_#?L){>g?i@YVK{-N24I_WL@6&zex`*!Ny^;69_p_rOqI0w&rzeMNjN3A1GGG`U zwSOyPb-EOORiP@0G+DVY9EXBj5m%2xZW$Jg+S~J<6!e%L9FH26tz?n>%n2``?+hBe zqh*OcidKY=_$!=b27G%^R~7J22B#$YBPQFt%6Q_n$zu7l(rq2n_rqvD%WdeKyvE6P zLn2@gg`k>?i##fT`p2wQe;SOAz?_Lms5A(m0Vn73irIR$9^b%z7Or!aAedq_IjC?L>g$Y5r1AO0^k!e45sV?X0#UJ)GKKvhv6r4kY-Cr3`9=d|- zPxCnCxNj*yj`{$0N8F!&AOf`II|}N~GhkmS@H*ulLY?411NbZjo@l2ljKfI99j|UM z7$TuU{&=5e>HuS2HJ-WRR79(%TSv54Qw5Bg<9_1hbw9BHf}Mk5g7B!jK2-vwsGz>| zRD_BHO$3Roj|cw)+l~F>ZLt7H$JC>Nd+;_j0ZQcM$Ro!N%jy^u1*E&BZmqQM2et%7 z*#<;7XV53!T*EGP1iTN!P-Azz&w1yS`E(xU3H7?V$Ci;aCP2^CmBhz5^nwBcqs+Is zH3&ddxT4$XA4usRX8B94jv9@%XVgz@bv<2qMBveqDKmzM#&NKhP@5#>IZ4zdl}Q&^ z0IDB+QTJ#&9-oW&OGwZr^4WRxZXcLMdDPvG_IoyZzmDB^P8!Yao0yOO7y8EV?OWuN z?wmM*nWT%MEf5m-!k@7L2Cun;EoP2Ubkl!&!_`BlN9-Jm z~j|MTM5=sI8rVhuY z7nO2ku+?QSaFbqCBe-|Qi~$MLDK>WvxEVPaTd~&mQM@nyqasNNpdA!^2n7;C{8d0v z4rH+1FD@V%o8Vf8$_D@mWnH@}{99$UIWX3ef3oaq55FIrHT0_dRRWBf-Yf6w7QSTg zyV5Kp?6{5idRqzPn@Z=D6wQ$GR8a(a9S?K)C`e`~NJps;$u*6`^^GgR*o#P|xt9eJ z@gdrPE3K-`t5*k0B@l-%^3cE)9ulFR)aaUqPXZS~;5Q&ag89Dc5G)B6VrHg{lGnO1 zmrpo)mrd-mM`Vvy0hqI6zSVK?mysIq9u4q=Dc{UG?HX$d^5gC%!i>3Kq&gkc#A`5# zU2Pz-uVa{nyGhWctX-XtL61=nG&GI_syLi2@f)NVR2`GcN_OzbULBIbRDHlec1eH% zh0u@70WU1%sA{sFs@7!xaC&7)0&PP=VL=OQ*gy*nCi=7#Ai2QGQhW%#2Ztg4n${`~ zaqv!Y7=rP20w2<`Se*dDxD0hPYu#0u69vo^ZYvG`b#rQSVB$DqAJp(=3BT$#r5(Z^ zK<8jp0szNR@YgWRj~p+8~f-+?;$_PBkY0#Lc#iy|QyuB9pi0j4BsH~>&WG+$VD zJ&0g|s)IVd=^BFz#BIp33VfZm4JHW))f#qi#Gr;7#?N*qtcWfICQ2vP06+keSuCM? zWj<2bzzb*JGr+G}RiT_ogYS@8YjxZS77R16Bdh_Zbrm%EKzr->#6{VqWXaiWDYy|3 zq<}u~Pwj_9JI0_eLISP3I$Y-z6#x}@MP~<@xG-0D$j*roygK7_r%b8&3k1XV!-&K6 zi58|wi0-FgY$}?{=mvFasz!{O^gy++fbI*uIi$VCy%VeSPkg;2FjE*+7)cL?zYmb# zCJ&8xSQ-)0;E>u4I$xCgtw|C6$OxULFeRudJP4`f4koMa*I_Av;;L&);6IG-RID5hm{FC_`{zjE}Qmn&~;O)1ox1vlHKDmD;Wn%GFY$;1fk+_AsDED!m9kZ44_bn zcgYysK?X=`26RY1;Fw7vAcf&fNO_>rz}Q8_r(_D9wU)&KEY_bc$_{j6ND6}s`c0MR zL1@qr@O&pqfnKZ*2`-&p*TE?cXkapU3B15`4-gE{cN897l~JTW?hgB&oYk?!sM~jH z8pFmtt#82Kl?cR=0kw&^1twGaO|l}AnsIZR&Q2_239WgQmcjD@x_N!H01QlX&aav0 zrdwS=1~gBq`ko_8f!Wk$7y|LZfklW=B^Tu?8UK|^M7-MOsQHN3CqD`n=&SI$qbK?` zIo7{Hoxm>T!MBx`wcEI{_3AX$VMY><_vDP&m1y8u=6pDTZkBEH>`UZvKV`H@hhHKv zu(1jifqZZS=@WZ|6KoTj*@gR>_tb>-+zy5yksTs}pdoOKkjA`owZ$=qAZAkztZj%< zaJc0NrOlHX#tIgp;+ZyxnnY%kHGq|G19co0`#-7fMS`M(;g1Ff=?Iq1yQ|RY=I2Zm zvtYZ%;KimA<*E#r7UdS|4iT!vm5Rf-`Lzl|QZWOz=>a=Lls&y?Xdn?7MgAsG;HgyB z8Y1vbgY{fxGzbt-z!}CB6$z?|2!hEIMAU3zU0HySe;>EMW=GmZ6@yAn#H~vlJx(8R z7rUtbY0MHnWim)Z3*|JIX*S^Q%m(ZHcwodb8D-UWyJ_z_Mi=Rw<&Et{%%D$2wB|!_ z2;(X?x?2-Da201fdC>P8Z6yXkZDus&M9?VZRFU|Ns_S(Fq-8`LOoPi503P z_%7~^;J_QcO>peqxExQ3$bf~Bt85AJIqr4Ltb+>pu?~#{=i(5<5)(ArJM&pY#HI=F ze?%{=XPc@X{F@RS7%MC61kzz2ENiH!CZK4T+^#+eVu;21q8gZ4FA&5{ODQ4}yP3el z29XBw2Ea}b(-xJIB&@%QB9Wm@T?}RFN`xQ~sPkZt>j7T&ff@Zv7QKwwiI7PqYH${^ zieSnY8U|cL0%o0Q%$poAUt(D4nWvEu5O7MY-y%Fn0?exbAkL*r64EClE%eJK^u1sX z1XTd|9igXoq0T7)x_9FCBoz=;0inVa5HNp^`s)l6#5Rajbg0|iAh`!Anx>`zu!_Qp z90_iBQ)ka<&BIc}Qsq(YYic`UIX8;=C`NIuT0(VVsd3MpU>gL$Z7s{@_@A_pOl5;TxLA7>3WtV1AMh zW-nC{V6@VKJ6XZi@4#-6kv=xl81@@->NXY@%XyJ0jVbm~MZ0TUQ z-neWyU@&QnR{1d;MiB%7dha6z=4@DA!_r)0fyE%w#amSaxl-i^T~;PODg=BnuZV}Q zBPlUY5qEGrDx#MpNfCB61-sc64oJb!2NzFYw(QLlkJ%-F%Q+4 z+=v$Jk`O(Xj=FX7uN>A6su<1_qag%e!|e=k>-`_8;F~UC2;Sa1-A0%nL-UqvnMhNe zv_V6W0P2S$+F)q*M_euMFnyK~@l_gf7^baZh_Fa27uI_ySm#X&@Y z0ZDj~j5y>D58;^vWaj2jVvdb0YtvO8%z6Svwd`F9$ z{PhYF(-^@hqiE#rxA}N+=y9AQD?AS5mMn^DdK%3_PC z%s22KbB&5;4%TE}y|EdGb;!iO@iyUrgV~D(&*)LrmwnKU6HI0zit#=YfdHWC#3;ZX z<;i-f%*=`|79z6Lb^KPLBZV491+4a*cTALb0imrRFe%UTi%qKv;_&xT3GM)*;F^b(%n?DxFAAftie!xfO4zYPd5M^KPN|vS=67dYl^f$7P=tU5?%w!eU{8Y zh7USXTZ-%VVV3HQ`I`KPugNS81$51b@_zMuK*JrKsr>BGM~d9hQYmm$7PWKDH5jp; zWl;WB60VcvK*GW$cFxQ^0%(RG4G$Gi!h((rmgOLvU#1n+Yj|dnNY!ac;AX`ZBj77% zO_M0-v|?`%@nW7YCk_OG-{kt^_`m6KhHA`kh_5PNJ-tb(_QEbryH*QjXP~q!3YmMJ zMF9>E&S!vorQhRj=~w$Z7O$)QXhY@Rxg^|gnI5~W{nv3THRBX{XaxeN4-Lstyb5{M zUO8)@R4%Am%~l3UECmD7@;h!H2?oChtkKl#Cj(%&(p40oWk7*-XPb-&w7-3f%XPO- z$`c__qCw%QB4}saJWOO9NXE|wq|zG= z5JbGimn4#pAdssabf5v4L5O&2AR+*S z2oOTn!fY>Sg5lR(SN?}l?_<#?WguhK7W6;%wOmp{1`rX{#1vZmK-@H`)e5i|9tdJk zjCrn5;U+v0kgYs$?bCqnm`8wydW>nw)Z_Y1vl?WKlp!J$0;9z)cf*)&AM2Sj3(y~V z5sLw6p;j6OL1S zivu=pD6Co=Pfhnsyx!^Ix$;g=%;HVRh}zSSd)QQH>_EaDDyQ{xQ5JLw&>a*k9Q`tv zL%ZmCmIPHJlmB)X0>F1!{Zz#qLAyTT@xW{!v~5pxmEo3OA=+KF1&j1Ru*XGMEe}gL zfG!7lVw=|xth5j6UQIo!=x{zp;gw;AGNwZeO^9K-1@uP!p6DBXJsR|@zAGHTXWbE> zc&ccO8LYA{jIfKg(C-c!PxjlfR-Jyk2CX09!qcEn(9YvjvQ#}dx)CR$)`rz+{>cFK zis?|rKPV(;vgVkhkg#jOU>3msyYv1ZcT#{JoTEqa1`6~y<_k-}&tB?~)_?^?0#v1H zc(9Y@WFTY@711oZ;>s}3dO^D(&o)QkYM+RwR_Tign_}qIf$7g;kD>~ z>AM2rxP3otLE+#%6rIY=9_FNDyNur;^QlhYE_ve;GdHoR8cgTLX`M!0ORUd4Qj6U(@E=Eh-}Iy?0p zN_{M4KJHnRfNvGBQTu^9zr{E8jh%<}I5Mc_yGIYtkqJKFp3yBA#1GfU&1+0morxXY z(D`HO{0c=z8z-=GhpyfBX&1g}F}kiK&oKpLu!SG5bne&k4zC5_IG3sWRJycf2yp&M z|E3N=8Dr(Rc12JaOS2^1%NTBLY%n*K)txk)Tm~gaT7N;+4}0o;giC`bA!dLc>}l|U zLG>evXuL-OUJ7tdkhH5uX&DC@6Q*gfr}NIv9~e5XQf(^d?U7Oi4jK`CS@&3?CAiYm6PA4E zILcfj-hQon$6A9{L(+hHY+$85K)4$WXIuKdMtf5*r$*xPILe++19&;J>!5g0XbY3o zWh6aJN)K@$zf53|_K@hW^bh7nO;IJ0IR2OEYdG2BfE8_F&(mR$!d`A3SnQ!3!P|4i3^c_vq8@-o9_wzGd1p79)VPq$KBl93cZZp-NY; z7q>?`9(A_@w{7t?@v;K_gp#t4;b?@xHPFCRCyvFgkErJvmAohg2^!1b6$F>ar|YNX zFAr6Ro)8tF=?aKPJ*&U`Ucb82wcO7skI)B6sT5I7D_7IAfHRZJGFNz3y~vJHW(wi3 znG^)Q8WM57tK5Se92H@;;8ce*Im=zSiKAAC;Y)B>_rZm9fNxoL|Jcxd@>JyEV~Q3J zAo9$ZlCum!a;1H;0;t}=3l4-Gt=U0RcJ@F>xAm*8K_5`D;%R zQlc@PSVtf@gFF?1rLtQdQw9{p%(~tuoP1qI&_TEJl_orCdZW{0!T_e?0athu+Ubmk zNkW*{oswB6Rne^=a?bebFyRw|rT@+XysGlDTXk~j$B&j5LJMc2vl6Z%sYQ8Gl*=wsI00u*HzPT=e=jUC;2A46>dJzf24Qr>hU=y?1Sew$#$TQis5RMopqX) z&Tmtf)RW`?)lM3cmvfCKOSdAUL&@2*#3ccA={)L1)$MTckT+Ji0lUw_OGPwZ9N=In zQEtfjV~bH~p2dwZzViUL zvOx%;T3T)_j(MboDn$CSep;_LQ;D?1O*99?pUF2A_zXQR*K`Z$u{-15rfc zNqWxLFzky`HY(aoX8NuUxjHS=YPy=O9F6XqYPY%+5}_B*cu z)0yk6^z`QJ_JB&WEW`UaGhXaM6r;c`)r`>$3x+7M9nG1>bM*tB{tR{QtT;2izpiDn zQfR5`nS2`ZZ?t+Z-dlZ+*zV^q*-Smio_6sq`x%Z-;k)ft)4BOdW?Lx-Sa_|Dnx269 z3_*A!ZmNMemI{7QCiOZRzKT8H=v6_1*nSgF8<$QT=62V12%mB`br<3LpQV7`&ILgFTeMKe{adPg818xAG3x1j;i%VZY$w z-f47su#0nv<@}Yv=m9q1V=4T@s@l@J*WUa4|c$;GWy@4U#JA!9`zljy9Khlv`8j zWzXpUy>?%Pt1P1YUIf=D54A#p7VnM*H~<}_6mg)$`vTr>P*JMAGtB2w00$IX zla(PqJPVdtIk){_t~4SY}NTomk4gIq4D(l85F2=xSCkU;?FRZ(-D*Rs!r3;5!3(kCtD z${|jIcBaaNQ83Q>dZaoIT?Jhrgq*Hu9}ODKIZ(IQ6}1q|l1Kny&}ES%j}CLi86|Tur}Z zrH)v7pZ*6RM4k9Z8Bjo_>3r|v7oq1UKucaM-}PaGEaJ0k3uhkWKGE={fGGt7)v{;a z6r(;K_~L^q(b{A!dk?tjv$-GalWi(SK^S$usy5l6{E3BEaoVEN@*5v$UyHJDAAh9p zBTBPb`M%zrj2Vk=CVsw*0(dSH}v=*p$oqSBlwW&m}xYMrY8XJ%s#`7eCOc02RRa_V-0f^y-q`Q&fYg~-iX1)=*SSfenuY!z9TQ3oy$dP)9tIn+a31RhEH36(y z%4qQrTC5VpH`5MZ{I=4QGS@GvUn&JqNN%KJy_>$3=ebTpxi7E zQRDN6B&<3H-gq)xT|G4wS%fus-DS)IHIl#cuJO|>GiI2>yM&(xHeO^V%M1yR?6|5n zEA8ajxmC*GZ zasK*j$mfgCQozm@dK=^FcF;`{rKOj4_UGLdYpxVJ0j%zX5A=83-_67#2C#|MB111S zuc5QE5J=w7AghA4oK;|+X1uuOxHRx0vV@mwbX-f1 zH-{d%hx>eou|hn<7FWP4rO`rq6(^cy4J>c%7us${KWGr&nTO#@P))9@k-#Ip!J{*6 z#;y}m8=o>sr(DYWRTdjrlmaAHE|vi=$Ye5--csyfzwfdWoDJpZ#gS+!3s%Qxb-Hjm zU&B&g?@%B@%lOnO z5QZWM*RY9j2{9Np$ua1%E>+l_q>lzMrGLt3miUON5&tqy(M8a#J{cBRcS3^!jjkk( zUU{biQ>pf9I}Q)E;MyCOf400we3xzoli`)06zY3=rNUopVs^%|59x{+umf=cfQnp= zn_K;-G3ULwzdP=ycq$i|M@~kuTMmlOrq1=PPHkm$vda1`5+HJ8R6LKuLq15W#&mK9 zE6YFi1{`L`xwUl0Q)g2yaXGp8fJMUinaZKQQ90%?AQ(hhG$5)N!09Or=nj~&;w@Vd ziQl8J4lj*-NQWXV)@grgj%&E_>b1iGQPZ=iC=?=#Bv?R2hq`HnxdL;y5EYXr_L*Kh zYjzmdAxJm9h2SZ9jHkNFVUI81xGRhYRkhHG#~A=ZNgpsA0cr}>K*K)@A7nq$qxQP) zP21oyeGrF7{p~bbwN$8GJ~4lGK&49~NoNhZ)(OEPo^?ou_*n9{??@^T<=nF`5G^dR2Ctj4h0x|8dHQ2$+Kj@Qoi1}>oyo+p@u%) z1BN69H5mvAfsxmLDHZ;SW@^FxE^or^o?~CP)DzA?noq|9LWS^r>V%UNBIwKI>3XvM z^kR2_QU)~MzIu)y(D82XOqpncJW^vPCe=LSvh3w7F}P+p;<6~9!5%97#T&b#`b@Dv zBVzg(_r<&p5Y^}wImwJOodL9JvP*Z{{?p}Z)^Cv2*43u(<5E=+{!zuiFnp~`Cm|nL zc}|+^34i=saa;zr9FLc-&Xqf9K~HOgJVoF2&$X|;Zo^f-W7d6FEdqMJ4|#gkCJ~Gh zHav|CFsB!~M^3vKHfu4tK4B$0@gtnuhN^wu&n*3{FcciR31oW2tUrkL;Q8D~&4#Yv zfg=~X8Av+-m_?0!J-e^~s&-v-Ci-excv@NPW$E=C2Z2F`UkeXe0T46+a3~Nct!^E6 z$Ym6gJ$r!*lQ|Lo@CCK>ekAmq^g>GRO5%A#PcTnU7$YVG$IBoL0Qpw)CY%JT6?ICT zxSg)D%fAy-YJw|0#n5zY*uV-pv5WcI%b3Em4_VpGf#F49=>}qDy?#UVslJf%uqJUz zY+mjB@ep>r2o{alV|9+~VBzS9_C?QiO#ow;rm}ODEQK=|-np#?lyS!!(k)c+JXF=Y z0e-qz1vi>pU68fA2*c*nfa42BTYjmEt3P_aupQBl48Z}8rNUN$!d*BPr56lY3VjnO zB#p3I+}QBulg)9YX{Xag@7oEq~Uf{`h zOpcDsHm>{r62d5=$qhzfE0=QR$V>f}k=4Z^3!ha&Q$tdjvw?e^zX34pBUreOid>a7 zSNj;KrE_swiNCWrBWC804$R`^s0DZtIpzz}k;~~-srq|QV00vHvPicgrk}fs&NAj^ zooX93yAaG=@s8u>>LA7qi4+cul-06_=vY`8BJwf{(SZS$9sp0b2kz+u(6Wfl9qNcD z7coO%#?(I7uZqG3cvUu#4}b-dWwkVXYM{4WVpy5x7{S2{O{uMHu=Xr|4M@kVS<8jP zqN%7`*S{z@>3Wu?M>n<3karUD4NWl~2R45}NJmF6=$3k_VG^p$a5Q@~Gmo3q>3|^h zmv$jGHtN3iVO3W)TSGzZ1O7;!HCI4;w-9iF>QU9lPbUv zo?Fq^!6sxECi+Ms%mKhnCwhV(?ph(=^d2@^% zVzhaQ`o_ahi}`W?5?dyiVjzM+!*>9q`w&3Of$}D=xQdxdgLh(~u$h@vdGZX;Ba(iV zdzKByy_~gN*Vu+-`OEtRXpjT&8KV}B_7YjU=42XyNN76Gf(Qin*mwukmlk`x#yxNt z=BkPitAyhrU9acdiwB7eK3api$jn+z7Z5RlVwUsHc=r9vhE};pEa1HQ<0#A-F4xpz z#!Ob|(2Dy4M*RaS7DTR#L^5&tGRy2c+D3x?=6nDe>T13w9DEt{17Ay-90RcfnFWwb zBmyc!^v;A&sX(^I<=ajBmxgXswB4~!2Q`@lP3NN#TMZ|DJZdX zQ{Z`)D9LNzzr42WbEP5@f18Q|!|kdndC~xH5u@ktDu$!+5Q)Xa^`(&9@XCZE{2`yX z?~Zn>Zlv9hK`}KS1Egvo#qNw+6dNIXex+?bV4EtpYFu|wHGtL97Rw*DTxP z1?IFD@gj87E(DXu3hJ1p3LWBRGKn~nV59jeC^B~<+UK}ETibnDCF4=bIAxQg0F$QC zG<+@%(+#-5W$#KCUj@x&zN_g1s(({mBVpmMzunfqn%9D8*8F~meEG+bAPT@Eq^#Go zJ>kF_cp6GJd6A)Vs-ZBerHQB56BPF(T|$Q8^OzH&1c`Ca;@V@O@(;$ti%9eIN}U|` zFv!0W32 zv>FZ4>%+TXTyS{-%9Z0th+$Hr+-9Nj+1(D)jA*k7dabEJdprWq42OB;a1k#@g#mo6 z@S>HzS0mB)wa(tbZ_uoGiY`oSb|-Zjt}267+wji>r}{YVE@t^bd#kxDqQn7Tb;R2; zI7O@5?eTM{NN%=gt(b0dCEgx}_icuT7!T?)vxuVEE;M{qxHv;g5RAKl*axz{^7SH4UcqYyOxTjy@z^n9hftQi^IREK zUYexs>qFbQn#S`J&2$6*n6i|jkzA)K@Qti4W+DQ1tZ!Jhyn9RyowJ)P)N@9M1$67p z=B8rsF^_!>4uZwkCk-qy(zNpqE8s8-4t`Q{%=FL&5q3*(nRce_W3zvru4eIix7mRP zobjM2@JclL#2hE^54>gUn4u$W;)YOu9;NZ+b4+G#q7!NX#kBJ# zSyk!laH#vSu&B0>$iKr>t9Th%w~zPjk0u|GN)VtJg?3wjTl9oNL=QuZt9+MB=PP{p zH}3CqIls}Z{xf;=w}Ax#8n~pV$@|Wlcg0+w}c+x(U+e|XW3<7CLe46Pvw z#AVj~>IWO9T({De4D*k&oC?{`FEJ4%=(s`sF#!jRc-IRHc3o{WQ!ns()$!MN;karZ zC!^GriylcU#n;VO`x{{&56GSaV}G7)>}oQ!l59Ll(ip`@@YF{t=UgNssoIl8s(NAE zpIkgRZ~As^I(k6UbP3taA#**n@W1Ju_P#>xD(hZcETsp)`hDTD09>bNm->O^qJy_J z1k}pEM6q;Dqerz-bj@F+NPu@S9+;wJlz|mJ&*U%&q-S9`h>&Q7RRMDX;$r?>65Bd5 z;3gfj9P2@pIRB4&k~X!S3Kb-p5YE&JsjRJ`MrW-(dl*AGt49AWn&xR4{vidRwP3f} zu}+IeWP$-ts#S&$l(;N2P@40OAt3V=psr!1&v8~U9H=YUoGqKnY`4v)qEh?@jBd`U z88jZUws2OjrE-Fg5)B<#xY{Ch8-kX+7&C!tFgM3V|9G{(++BV*Uz7 zMmueLyy;Eo2iDchkZyLc}Mx&Y7YB!{`sDEBgoL9OP?GaZhf=?N0p zo`vd|AIul4d3l#gtVZjidG^Fe)k6O)K#%*ale_gq0`_9ZZP2D)XBsFP;sDh^qTxw2 zH=tu%CzmMisAAr=onjY?k&vT;6Gu^Q_8eOcufVGpKDp>BXp?VjQCI&w*63YqlCj`+ z?fdRpe>J;6=q4$s1J4tn5LhlkjhkB1xCNaiPvir{1a9BQxx>R>yq& zmb4mi<-;nO5(iF`CaBw&+YQ|Z1h6>Rq97m_-v=s#J~gJh0+(Q84LUJPuSPbacO)?+ zTskn9c8<=~I)PARmb>sjfLchnkIBD7?dfNd6Q{^hDVLD>go#?Gc>@+mw2$Ehv1_r;2>b1 zGD5(#rIFx+JAU|bjW?c>;xj;;*&m-#@=GLlas;1{?1U#-qP=bPjGgP z9sL_Y_$P=yb->$TVr*ug$uQA=Z|xq00R|C;ALM0^bBL8aODAe1p~LiQ_G)a)%$-ta zVKiS^)6PGa*K?~ilGXlDALAmshW!(wrEpJgU7RUS*73@Q z>Axdg(>M8?-^0To(1DwRlQ9GN;hh<#BWs$a?jDy-U2F%Fqu9|M<_FM+R!*VFR(zpB z4XvxXPxzy6hx0p^*LdO>zn#ryu&x!>gu zEwrLyBndmH7{AHIYo16`UrFgAfUYhp)(Kj~MLmHDwf~-W^JKKPhhOMV)z4a&5=o}b zxDr=k?M*x{x6eR6cFV8H>vQdP+hXSq;(3Lk(`pLzIikjdE)Z+M6!(D7y`)ibGxJ%* zHzsp2Dt`2mG)u*JIV-ZrJreVFRjL(4fRE;OeDopv{IdbBXZEe<&5jrrzoM=mPYd|8 z_Od?0Yn?5jLvx$aDGTRR5k`=wmqJ6JXT68^<*IdI2l$sRc3Gmz6G3{L3z)$rZwGsD ztGTqf1T+Zy5jQYI!e>)i!D>mAx#OZ?tXnn4$$(CspxP{lF&p=Y2Ut2)E)paz5yp`2CQoC4v%58ourI~WQr zm`Cg-Bu zt&u@qXN(=4W-ywH+!h0MyEnkhv@sgsC1OhsNHbY8OFK3c5yENGQBUBFzYnKoxF8rX>V|q!6#CSA%K~Fvr1!Mjx96wYAB7EqURJMb zw9HQ`1h}w~24YSJLD-58T?OLAWXG2uk~M2fbU{lb6534uPq4EHfjF#sI~FJKERB1k zkt%1$P$_Z^etl{J@UJ0M%8wO;EFZJ_t3IJG+8jy=7Q<~UfX{6q;8pRWia^Jcg>6&{ zEGbk0_A z;O08Gb>lsvdQE&OjaL?2ajH_m!d31>8gxY7e0Jv%cM|KV{+^;#+xfY_OnNdh!VAq@ zg-IE3xrg;w@1uz=IGsLy}8}xW4NYq^7T6H`)T9DVJ#k0jK3@^OL#w0`w z=T2lccS`%dq;=W}RF!Bt4r1cq0I4`9{=6uc5>XsVq=N{Gvhjx8H=g)zSp5p)U*I#b zhjhFlhQBza@~}g?y{e0%*HaQ)SKMqlkxTDrmz5HK4`;F=(dN7_MXR9`s?Um9OSTM` zg#PNV&~YwVZNg3b^yC26dDx6F=}+nySEn@ z48*GwRu*N8QUpvPBdrLz-0(FHI4_h0hG`2jl#lLV!yg_-K4g!KWu)9PD-dd@_D!xG zS+SnlN|Qf^=BuV>%BPbgqL_{h=>38BXd4T~(QpoC_T-tVBNt3*ah2EkM?xK$aMGBS z9*f~dT{}kpip6yZmrUrPP$&c7d^gXKxlrIT1}S5-l9Fy9acCc#Ni*EKf*HH2Qx}FV z_|FluoHWfdt&kR&hG&#BmL)L^jG5mWl^xz^L&`)Tei=`xLDev{vPMd@b}Ya@4pP6L zPS&R2+QS=oMO|>qD`sXa7o4cv{Y;6GPwgNQH6BB-{t2k4VAVxv`Y4WuhaHT1CiM^q@?av0gps-32@+l*Swp_JYk48YPU+hMWZW-Ex9ly zL$!OB7c{<*VmMAZ;r6VFQ|#@~;3Ru+XH6-tgsPlPAwmk!NQkz|*q>5fwx#YQYuiL3 z$k!i`yeE!KFP{7XTy!Ng9=8ralN5kxZB%HFqnrHPbJw#hYN&+jep2MBx%A7JwC4P1 zkzAC094|3%4ULJDy12%RdH_--J!>bb5XG-{{NkE7XgrPxO^mcV3xI10|FC%Z;u^&) zdSh4vR4glD;sr;l$}Q_G$*i@zIQ~mGL9ReAsnjB^3kd7t+7>YFIbQ91R>$%3mnyYx zV{I9UcX;-~K^NnF&S6Ea$uXp-*pvlQO<7&r2GiJ4`0{}BB#m@PB0 z$^?T_jwTd(1b@!uvK4pU*-wJ#;B8Bc^70|=uMJTeS(?i7l#M2TaEJ zKSXWePiE?BH^|H}yd;%1%ddd;@^&Mu37RFh zX>#}*VX#(sH#)4-u~mNi8<)fXW>7$cUnNlJV^mmy$6|4^DZVPJ$t4t*`9O3TD>}cu z^L7RYr!QaZoiam>Z*w|0`bo#+D>8@MKy{2~jL~UocQO^2w4}nSv-~(O{nixhB`M-3 z%JGA3Rzzz(PoCfoP30fFluDMKMcYOd;^jBSYdoxItibaUDnTp4ewMD3ctxnWu(m(B z!c$ru@zxt_c;LpFGll5s(J7ElCfHeu1&*)b1#Melr9(2zws}W`?b{N3)|SwZ#047K zR!zsm1xEX(CHxMZLqv})$Nfl$7D5YB+H3^GoLKk4xIMD$E~z&!G=}0|wRVyN6Og+Z z138QYvZlGTwvWeUq&KID2W$db&ze9NRP`#9LR@5y4jnXIfi9}(ZR3c8<$abamw#1wuK_svPr$D@7T>5?Q_t=n$7 z7l-u@J>QJc7tbpA6plV37TsPxYbB`2pxXgYBqujizjTc+taR*3Xifa_nKMcrru2@B z37Ip_O_7k?P_%=a`>eEc4d)#bt#=m;*gXrvk-OQ>9uh~}N2q{2Aq#A+jE5MTVS`Pa zIv~fj@NVL&dyCqHV%{bFK$VP2uyr>PAqHgtC?J$^m%vg1<1r<7w{S|Z-tHtff-U6-uU2v)f^ZMIb=$-MFMVCLt8E% z)3{vmLA`e;6Plsqxl|@>j(lnYW3ILF;THcP9b_EiqBUbUS;^qWkQ4(MWCtD75lQ?m zKWK7X65wYq z>UwGdeL2QOKIzzUD|T*{mHCEHA{wO4v{N8v=I=jJK%3D#ueHPmj5&_o0B<0w1}Z%U z>c|z8Wt6f@mTCs6Y|so29x~$7<`?*l)W(Sk2NRYCDcPX~k`P+Zf4Zco-=*}&_`(+S zV)-3BRKr?9ji(NFpov^oZ%A8IQk0j)52z&z4>e9SQdlN=cs`*920RKE_|_zSRQ8mY z|7^}AQLhKNi<4> zR)e{zf9}Wo=})Mp=YExvX+;7nzw=AZ%>P5NhV|-nMYW}_;wMSQ)6~W?K7|<8K$}XX zA(V9}C%%|m7UwA~OW6^mpT<>T2*A(CQWFNLaD|rxaf}TL7*8?a+U^^)+mgXxYj-br z!VkepCWG5GgU1@?24^w1OpG#HWE&(o_#tan)}LtTz~rM!48{lq)Wc5eIBEu=6WTk% z@Ybr}(jFd@2dNm`P-LV%%`w%vduWl|e5slr?QJ3qjY!_ zVpM*DkNb|Z%s|EJr>nSK(y;#7AVqLM4wIX7jF8tDer4!}(HQ3d>VS9P_;ZHPq?Y!W z+OicaqWL~K#b?&J?$IgljHM`KTWkQlY*VjHlVm66#QPLP7))So$D}5MmP*)Re2f~J zC2^`?ybQkszihM8S>0!i3cmcpsKt8_G(*+aX&YvC=M&t-A!4p4)~K%Pebx{xxXz^T ziY9MuUtYrPGL`hr7^wZE^0^)ZTf9vWF@ZQ$<%go zlz|@FQJk4K90O;Tj5xwU(-5S3NIRGztFlE5{t*HL8#B`>&Vf8-oksS!3?m-*pSpO| zxG*Id5o<+=ESt4;-WY3HaTwOz(E@cZMylJ?!-y|j9`~iALW-nbk1Ij^Yi*Bi{7~EL zLsAvu4)ITt@V*)QqN~!yRN`7@i41)%48cE-nujzXY2&Z|GZyrvvXZB?2hMplVHNVC^cB9;Et=1#hdy37A-z!HXFhh94qX4R&2;GBg**+%RJX9Yp~5&oEZtdf<{+K}vG~tJq(6%uGUU zg)D}b63~j7Dmp-1Jf)#S)&tNb?nm&Eip6IqIB5+QF05UHL5QL?3VpT)Gbs8oWlq;I zY6%XxOx0erIG{Djf<@Qe(3iy*$2~T6ASe=srXGtHV{7v18m(EkK{a!?<8CIhQqSPI zZH{~EAwHXx4^;JH>i0ta*UxVA)UYk$@ z5hH*WKU=acY%$6z*-@6gaGd{1h-y==%hvA5#txQx1VO6g(4>YGxPeg z#my7%fe#7i{|m-QoeKXhp{{_2yMz{Iu1L8Md$JpC10+^S?ha49nic}=ASlBdhk=(y zgyyUf>$2Sg7R#MqJI1zsSmm3N(P6ddp_m9c}w_B_c4@-H_2(%kqYEs}58p3d= zei{QIVQk3L@MBwy3*Z9^87cxS37OnDq9CB-;x<;Gf<>57*wcG>tCV`j9V<~uT%+Zi zUDzNXGW3vH#~^7c6Rmj19dh^;q)H5MG1ZG}E2`BhM=gC|N@V{9DNBc@6jb9Bv2#XX z;E1keal$UIg;`@-iF5{&n8k~Y$h5C&6CeZJarJcXa+`5~W4K?n!GI<#`!eE#2vhw# z@30+*pdxZ{?Pglg9voRN=bJU3!+oxZg<_37JC1LqA!Wmj*07wMbx=+Guq8AEdSY3g zSxz0V5^0?sT(cO-2!tX?s|OiT28nagQ8^f9U@^jaaLdi~iliu-9Td%l3#p>hL^U5) z4loV8tB{@fp6Tr{7TPd5y@sNyWy>~v*%bfc{iQ=qi)(-B0yBXWnz_45Wh-q+2l_@E z=tyORv|nALCg-~~rcgdCw|WWI4^D|Csy(iFGKYj| zQ->&=>;2`J2eWF3vUq^9j3$Oq+o3(g;TJHvqdlrFk*AplE7dK=8KF>Kn^GR5vPYT- zt7na&eiE0K@i1s0>ntSBM?aEuj3zrg?huK+YH@Wwg#zscyhoEG$vC5mG=!5JQVn~S zr6{yzBS$nM_PV?YdCL^J@78v1*o5uK5hg*6gH}8wceNqXD(o6%#U-*B4)@6O$X z4E);FZhyne>AjApUcGqVoL@Q9G|-{Q-Me)G9Ki+R&E~B4A%_p$!}P&A+87$`lRzF8~_i!4~d%NrdNdkd{zZOy2C-3;%-*ogn&G&mTAeB0yj^9 z^`DV(xZ*`#t2irY7A=&XRowa}yqY-@*YguQ&~BW3o$k^xfd+Fc=BJ8Ooa>!&Muy>r zF~)^Va`8|EV}5|MujO4TS(1DEyU4UvwR$UoZ(w;0*-1vG>Vf~zcTxMyEIHLC1CrC6 zTc@vIF!c%Js%--^+tV8Bxj3`n%CwjiXTI_?c?Zn$YEIPFp#3Q{!aZ zm;{@7^LhW-i~C$DsYL5t2^hJ{Mf^3j@iDe=bD{rSf6T;D5z!8O=AW~)@tKFY?o4>y z8|oqqvH&Avy;f5;^=#Hb;8GgxKWD+phd7QZADZ0qIR*GPECGJZ_6q#@0;R3~G8ddW zn9UVi4R+>=oGUyi$0{Lu;sQs;CNg-b$;|GT;<)Tp+?lJgTEnthJhTq($Ia*&S}YGL zafh%!GK|n>aUG*IXNyMt4=1|=r4$7Aus^81FdW9sQG#V?&GN1coVHGXNDaxVGxE$0 zobzhOA%Hf1KnA5T#v/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='Togl' +PACKAGE_TARNAME='togl' +PACKAGE_VERSION='2.1' +PACKAGE_STRING='Togl 2.1' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +TCLSH_PROG +RANLIB_STUB +MAKE_STUB_LIB +MAKE_STATIC_LIB +MAKE_SHARED_LIB +MAKE_LIB +TCL_DBGX +LDFLAGS_DEFAULT +CFLAGS_DEFAULT +SHLIB_SUFFIX +LD_LIBRARY_PATH_VAR +SHLIB_CFLAGS +SHLIB_LD_LIBS +SHLIB_LD +STLIB_LD +CFLAGS_WARNING +CFLAGS_OPTIMIZE +CFLAGS_DEBUG +DL_LIBS +LIBOBJS +CELIB_DIR +AR +SHARED_BUILD +TCL_THREADS +TEA_WINDOWINGSYSTEM +LIBGLU +TOGL_WINDOWINGSYSTEM +AUTOSTEREOD +XMKMF +TK_XLIB_DIR_NATIVE +TK_TOP_DIR_NATIVE +TK_INCLUDES +TCL_TOP_DIR_NATIVE +TCL_INCLUDES +CLEANFILES +PKG_OBJECTS +PKG_SOURCES +MATH_LIBS +EGREP +GREP +RANLIB +SET_MAKE +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +CPP +OBJEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +TK_XINCLUDES +TK_LIBS +TK_STUB_LIB_SPEC +TK_STUB_LIB_FLAG +TK_STUB_LIB_FILE +TK_LIB_SPEC +TK_LIB_FLAG +TK_LIB_FILE +TK_SRC_DIR +TK_BIN_DIR +TK_VERSION +TCL_SHLIB_LD_LIBS +TCL_LD_FLAGS +TCL_EXTRA_CFLAGS +TCL_DEFS +TCL_LIBS +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_FILE +TCL_LIB_SPEC +TCL_LIB_FLAG +TCL_LIB_FILE +TCL_SRC_DIR +TCL_BIN_DIR +TCL_VERSION +PKG_CFLAGS +PKG_LIBS +PKG_INCLUDES +PKG_HEADERS +PKG_TCL_SOURCES +PKG_STUB_OBJECTS +PKG_STUB_SOURCES +PKG_STUB_LIB_FILE +PKG_LIB_FILE +EXEEXT +CYGPATH +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_tcl +with_tk +enable_stubs +with_tclinclude +with_tkinclude +with_x +with_autostereo +with_autostereod +with_Xmu +enable_threads +enable_shared +enable_64bit +enable_64bit_vis +enable_rpath +enable_wince +with_celib +enable_load +enable_symbols +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +XMKMF +AUTOSTEREOD' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Togl 2.1 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/togl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Togl 2.1:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-stubs build and link with stub libraries (--enable-stubs) + --enable-threads build with threads + --enable-shared build and link with shared libraries (default: on) + --enable-64bit enable 64bit support (default: off) + --enable-64bit-vis enable 64bit Sparc VIS support (default: off) + --disable-rpath disable rpath support (default: on) + --enable-wince enable Win/CE support (where applicable) + --enable-load allow dynamic loading and "load" command (default: + on) + --enable-symbols build with debugging symbols (default: off) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-tcl directory containing tcl configuration + (tclConfig.sh) + --with-tk directory containing tk configuration (tkConfig.sh) + --with-tclinclude directory containing the public Tcl header files + --with-tkinclude directory containing the public Tk header files + --with-x use the X Window System + --with-autostereo directory with autostereo source (for SGI) + --with-autostereod path to autostereod daemon (for SGI) + --with-Xmu use system's shared Xmu library + --with-celib=DIR use Windows/CE support library from DIR + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + XMKMF Path to xmkmf, Makefile generator for X Window System + AUTOSTEREOD Path to autostereod for SGI IRIX computers + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Togl configure 2.1 +generated by GNU Autoconf 2.65 + +Copyright (C) 2009 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Togl $as_me 2.1, which was +generated by GNU Autoconf 2.65. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +#-------------------------------------------------------------------- +# Call TEA_INIT as the first TEA_ macro to set up initial vars. +# This will define a ${TEA_PLATFORM} variable == "unix" or "windows" +# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. +#-------------------------------------------------------------------- + + + # TEA extensions pass this us the version of TEA they think they + # are compatible with. + TEA_VERSION="3.7" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5 +$as_echo_n "checking for correct TEA configuration... " >&6; } + if test x"${PACKAGE_NAME}" = x ; then + as_fn_error " +The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5 + fi + if test x"3.7" = x ; then + as_fn_error " +TEA version not specified." "$LINENO" 5 + elif test "3.7" != "${TEA_VERSION}" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&5 +$as_echo "warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5 +$as_echo "ok (TEA ${TEA_VERSION})" >&6; } + fi + case "`uname -s`" in + *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) + # Extract the first word of "cygpath", so it can be a program name with args. +set dummy cygpath; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CYGPATH+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CYGPATH"; then + ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CYGPATH="cygpath -w" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" +fi +fi +CYGPATH=$ac_cv_prog_CYGPATH +if test -n "$CYGPATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 +$as_echo "$CYGPATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + EXEEXT=".exe" + TEA_PLATFORM="windows" + ;; + *) + CYGPATH=echo + EXEEXT="" + TEA_PLATFORM="unix" + ;; + esac + + # Check if exec_prefix is set. If not use fall back to prefix. + # Note when adjusted, so that TEA_PREFIX can correct for this. + # This is needed for recursive configures, since autoconf propagates + # $prefix, but not $exec_prefix (doh!). + if test x$exec_prefix = xNONE ; then + exec_prefix_default=yes + exec_prefix=$prefix + fi + + + + + # This package name must be replaced statically for AC_SUBST to work + + # Substitute STUB_LIB_FILE in case package creates a stub library too. + + + # We AC_SUBST these here to ensure they are subst'ed, + # in case the user doesn't call TEA_ADD_... + + + + + + + + + +ac_aux_dir= +for ac_dir in tclconfig "$srcdir"/tclconfig; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +#-------------------------------------------------------------------- +# Load the tclConfig.sh file +#-------------------------------------------------------------------- + + + + # + # Ok, lets find the tcl configuration + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-tcl + # + + if test x"${no_tcl}" = x ; then + # we reset no_tcl in case something fails here + no_tcl=true + +# Check whether --with-tcl was given. +if test "${with_tcl+set}" = set; then : + withval=$with_tcl; with_tclconfig=${withval} +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 +$as_echo_n "checking for Tcl configuration... " >&6; } + if test "${ac_cv_c_tclconfig+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + # First check to see if --with-tcl was specified. + if test x"${with_tclconfig}" != x ; then + case ${with_tclconfig} in + */tclConfig.sh ) + if test -f ${with_tclconfig}; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5 +$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;} + with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` + fi ;; + esac + if test -f "${with_tclconfig}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` + else + as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 + fi + fi + + # then check for a private Tcl installation + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ../tcl \ + `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ + ../../tcl \ + `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ + ../../../tcl \ + `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + + # on Darwin, check in Framework installation locations + if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ + `ls -d /Library/Frameworks 2>/dev/null` \ + `ls -d /Network/Library/Frameworks 2>/dev/null` \ + `ls -d /System/Library/Frameworks 2>/dev/null` \ + ; do + if test -f "$i/Tcl.framework/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` + break + fi + done + fi + + # TEA specific: on Windows, check in common installation locations + if test "${TEA_PLATFORM}" = "windows" \ + -a x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d C:/Tcl/lib 2>/dev/null` \ + `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ + ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few common install locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few other private locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + +fi + + + if test x"${ac_cv_c_tclconfig}" = x ; then + TCL_BIN_DIR="# no Tcl configs found" + as_fn_error "Can't find Tcl configuration definitions" "$LINENO" 5 + else + no_tcl= + TCL_BIN_DIR=${ac_cv_c_tclconfig} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 +$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } + fi + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 +$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } + + if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 +$as_echo "loading" >&6; } + . "${TCL_BIN_DIR}/tclConfig.sh" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 +$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } + fi + + # eval is required to do the TCL_DBGX substitution + eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" + eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" + + # If the TCL_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable TCL_LIB_SPEC will be set to the value + # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC + # instead of TCL_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + if test -f "${TCL_BIN_DIR}/Makefile" ; then + TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} + TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} + TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} + elif test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use the libraries + # from the framework at the given location so that linking works + # against Tcl.framework installed in an arbitary location. + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then + for i in "`cd ${TCL_BIN_DIR}; pwd`" \ + "`cd ${TCL_BIN_DIR}/../..; pwd`"; do + if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then + TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" + break + fi + done + fi + if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then + TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" + TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" + fi + ;; + esac + fi + + # eval is required to do the TCL_DBGX substitution + eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" + eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" + eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" + eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" + + + + + + + + + + + + + + # TEA specific: + + + + + + + +#-------------------------------------------------------------------- +# Load the tkConfig.sh file if necessary (Tk extension) +#-------------------------------------------------------------------- + + + # + # Ok, lets find the tk configuration + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-tk + # + + if test x"${no_tk}" = x ; then + # we reset no_tk in case something fails here + no_tk=true + +# Check whether --with-tk was given. +if test "${with_tk+set}" = set; then : + withval=$with_tk; with_tkconfig=${withval} +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 +$as_echo_n "checking for Tk configuration... " >&6; } + if test "${ac_cv_c_tkconfig+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + # First check to see if --with-tkconfig was specified. + if test x"${with_tkconfig}" != x ; then + case ${with_tkconfig} in + */tkConfig.sh ) + if test -f ${with_tkconfig}; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5 +$as_echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;} + with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'` + fi ;; + esac + if test -f "${with_tkconfig}/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` + else + as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 + fi + fi + + # then check for a private Tk library + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ../tk \ + `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ + ../../tk \ + `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ + ../../../tk \ + `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ + `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + + # on Darwin, check in Framework installation locations + if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ + `ls -d /Library/Frameworks 2>/dev/null` \ + `ls -d /Network/Library/Frameworks 2>/dev/null` \ + `ls -d /System/Library/Frameworks 2>/dev/null` \ + ; do + if test -f "$i/Tk.framework/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` + break + fi + done + fi + + # check in a few common install locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + + # TEA specific: on Windows, check in common installation locations + if test "${TEA_PLATFORM}" = "windows" \ + -a x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d C:/Tcl/lib 2>/dev/null` \ + `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ + ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few other private locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + +fi + + + if test x"${ac_cv_c_tkconfig}" = x ; then + TK_BIN_DIR="# no Tk configs found" + as_fn_error "Can't find Tk configuration definitions" "$LINENO" 5 + else + no_tk= + TK_BIN_DIR=${ac_cv_c_tkconfig} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 +$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } + fi + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 +$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } + + if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 +$as_echo "loading" >&6; } + . "${TK_BIN_DIR}/tkConfig.sh" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 +$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } + fi + + # eval is required to do the TK_DBGX substitution + eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" + eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" + + # If the TK_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable TK_LIB_SPEC will be set to the value + # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC + # instead of TK_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + if test -f "${TK_BIN_DIR}/Makefile" ; then + TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} + TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} + TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} + elif test "`uname -s`" = "Darwin"; then + # If Tk was built as a framework, attempt to use the libraries + # from the framework at the given location so that linking works + # against Tk.framework installed in an arbitary location. + case ${TK_DEFS} in + *TK_FRAMEWORK*) + if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then + for i in "`cd ${TK_BIN_DIR}; pwd`" \ + "`cd ${TK_BIN_DIR}/../..; pwd`"; do + if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then + TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" + break + fi + done + fi + if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then + TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" + TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" + fi + ;; + esac + fi + + # eval is required to do the TK_DBGX substitution + eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" + eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" + eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" + eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" + + # TEA specific: Ensure windowingsystem is defined + if test "${TEA_PLATFORM}" = "unix" ; then + case ${TK_DEFS} in + *MAC_OSX_TK*) + +$as_echo "#define MAC_OSX_TK 1" >>confdefs.h + + TEA_WINDOWINGSYSTEM="aqua" + ;; + *) + TEA_WINDOWINGSYSTEM="x11" + ;; + esac + elif test "${TEA_PLATFORM}" = "windows" ; then + TEA_WINDOWINGSYSTEM="win32" + fi + + + + + + + + + + + + + + # TEA specific: + + + + +#----------------------------------------------------------------------- +# Handle the --prefix=... option by defaulting to what Tcl gave. +# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. +#----------------------------------------------------------------------- + + + if test "${prefix}" = "NONE"; then + prefix_default=yes + if test x"${TCL_PREFIX}" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5 +$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;} + prefix=${TCL_PREFIX} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5 +$as_echo "$as_me: --prefix defaulting to /usr/local" >&6;} + prefix=/usr/local + fi + fi + if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ + -o x"${exec_prefix_default}" = x"yes" ; then + if test x"${TCL_EXEC_PREFIX}" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5 +$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;} + exec_prefix=${TCL_EXEC_PREFIX} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5 +$as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;} + exec_prefix=$prefix + fi + fi + + +#----------------------------------------------------------------------- +# Standard compiler checks. +# This sets up CC by using the CC env var, or looks for gcc otherwise. +# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create +# the basic setup necessary to compile executables. +#----------------------------------------------------------------------- + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) + # in this macro, they need to go into TEA_SETUP_COMPILER instead. + + # If the user did not set CFLAGS, set it now to keep + # the AC_PROG_CC macro from adding "-g -O2". + if test "${CFLAGS+set}" != "set" ; then + CFLAGS="" + fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + #-------------------------------------------------------------------- + # Checks to see if the make program sets the $MAKE variable. + #-------------------------------------------------------------------- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + + #-------------------------------------------------------------------- + # Find ranlib + #-------------------------------------------------------------------- + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + #-------------------------------------------------------------------- + # Determines the correct binary file extension (.o, .obj, .exe etc.) + #-------------------------------------------------------------------- + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. + + + #------------------------------------------------------------------------ + # If we're using GCC, see if the compiler understands -pipe. If so, use it. + # It makes compiling go faster. (This is only a performance feature.) + #------------------------------------------------------------------------ + + if test -z "$no_pipe" -a -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5 +$as_echo_n "checking if the compiler understands -pipe... " >&6; } +if test "${tcl_cv_cc_pipe+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_cc_pipe=yes +else + tcl_cv_cc_pipe=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5 +$as_echo "$tcl_cv_cc_pipe" >&6; } + if test $tcl_cv_cc_pipe = yes; then + CFLAGS="$CFLAGS -pipe" + fi + fi + + #-------------------------------------------------------------------- + # Common compiler flag setup + #-------------------------------------------------------------------- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + if test "${TEA_PLATFORM}" = "unix" ; then + + #-------------------------------------------------------------------- + # On a few very rare systems, all of the libm.a stuff is + # already in libc.a. Set compiler flags accordingly. + # Also, Linux requires the "ieee" library for math to work + # right (and it must appear before "-lm"). + #-------------------------------------------------------------------- + + ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" +if test "x$ac_cv_func_sin" = x""yes; then : + MATH_LIBS="" +else + MATH_LIBS="-lm" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5 +$as_echo_n "checking for main in -lieee... " >&6; } +if test "${ac_cv_lib_ieee_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lieee $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ieee_main=yes +else + ac_cv_lib_ieee_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5 +$as_echo "$ac_cv_lib_ieee_main" >&6; } +if test "x$ac_cv_lib_ieee_main" = x""yes; then : + MATH_LIBS="-lieee $MATH_LIBS" +fi + + + #-------------------------------------------------------------------- + # Interactive UNIX requires -linet instead of -lsocket, plus it + # needs net/errno.h to define the socket-related error codes. + #-------------------------------------------------------------------- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 +$as_echo_n "checking for main in -linet... " >&6; } +if test "${ac_cv_lib_inet_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-linet $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_inet_main=yes +else + ac_cv_lib_inet_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 +$as_echo "$ac_cv_lib_inet_main" >&6; } +if test "x$ac_cv_lib_inet_main" = x""yes; then : + LIBS="$LIBS -linet" +fi + + ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_net_errno_h" = x""yes; then : + + +$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h + +fi + + + + #-------------------------------------------------------------------- + # Check for the existence of the -lsocket and -lnsl libraries. + # The order here is important, so that they end up in the right + # order in the command line generated by make. Here are some + # special considerations: + # 1. Use "connect" and "accept" to check for -lsocket, and + # "gethostbyname" to check for -lnsl. + # 2. Use each function name only once: can't redo a check because + # autoconf caches the results of the last check and won't redo it. + # 3. Use -lnsl and -lsocket only if they supply procedures that + # aren't already present in the normal libraries. This is because + # IRIX 5.2 has libraries, but they aren't needed and they're + # bogus: they goof up name resolution if used. + # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. + # To get around this problem, check for both libraries together + # if -lsocket doesn't work by itself. + #-------------------------------------------------------------------- + + tcl_checkBoth=0 + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = x""yes; then : + tcl_checkSocket=0 +else + tcl_checkSocket=1 +fi + + if test "$tcl_checkSocket" = 1; then + ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" +if test "x$ac_cv_func_setsockopt" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5 +$as_echo_n "checking for setsockopt in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_setsockopt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char setsockopt (); +int +main () +{ +return setsockopt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_setsockopt=yes +else + ac_cv_lib_socket_setsockopt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5 +$as_echo "$ac_cv_lib_socket_setsockopt" >&6; } +if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then : + LIBS="$LIBS -lsocket" +else + tcl_checkBoth=1 +fi + +fi + + fi + if test "$tcl_checkBoth" = 1; then + tk_oldLibs=$LIBS + LIBS="$LIBS -lsocket -lnsl" + ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" +if test "x$ac_cv_func_accept" = x""yes; then : + tcl_checkNsl=0 +else + LIBS=$tk_oldLibs +fi + + fi + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_gethostbyname=yes +else + ac_cv_lib_nsl_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : + LIBS="$LIBS -lnsl" +fi + +fi + + + # TEA specific: Don't perform the eval of the libraries here because + # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS + + TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5 +$as_echo_n "checking dirent.h... " >&6; } +if test "${tcl_cv_dirent_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ + +#ifndef _POSIX_SOURCE +# ifdef __Lynx__ + /* + * Generate compilation error to make the test fail: Lynx headers + * are only valid if really in the POSIX environment. + */ + + missing_procedure(); +# endif +#endif +DIR *d; +struct dirent *entryPtr; +char *p; +d = opendir("foobar"); +entryPtr = readdir(d); +p = entryPtr->d_name; +closedir(d); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_dirent_h=yes +else + tcl_cv_dirent_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5 +$as_echo "$tcl_cv_dirent_h" >&6; } + + if test $tcl_cv_dirent_h = no; then + +$as_echo "#define NO_DIRENT_H 1" >>confdefs.h + + fi + + # TEA specific: + ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = x""yes; then : + +else + +$as_echo "#define NO_ERRNO_H 1" >>confdefs.h + +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" +if test "x$ac_cv_header_float_h" = x""yes; then : + +else + +$as_echo "#define NO_FLOAT_H 1" >>confdefs.h + +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default" +if test "x$ac_cv_header_values_h" = x""yes; then : + +else + +$as_echo "#define NO_VALUES_H 1" >>confdefs.h + +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = x""yes; then : + +$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h + +else + +$as_echo "#define NO_LIMITS_H 1" >>confdefs.h + +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : + tcl_ok=1 +else + tcl_ok=0 +fi + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtol" >/dev/null 2>&1; then : + +else + tcl_ok=0 +fi +rm -f conftest* + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtoul" >/dev/null 2>&1; then : + +else + tcl_ok=0 +fi +rm -f conftest* + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtod" >/dev/null 2>&1; then : + +else + tcl_ok=0 +fi +rm -f conftest* + + if test $tcl_ok = 0; then + +$as_echo "#define NO_STDLIB_H 1" >>confdefs.h + + fi + ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = x""yes; then : + tcl_ok=1 +else + tcl_ok=0 +fi + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strstr" >/dev/null 2>&1; then : + +else + tcl_ok=0 +fi +rm -f conftest* + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strerror" >/dev/null 2>&1; then : + +else + tcl_ok=0 +fi +rm -f conftest* + + + # See also memmove check below for a place where NO_STRING_H can be + # set and why. + + if test $tcl_ok = 0; then + +$as_echo "#define NO_STRING_H 1" >>confdefs.h + + fi + + ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_wait_h" = x""yes; then : + +else + +$as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h + +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + +else + +$as_echo "#define NO_DLFCN_H 1" >>confdefs.h + +fi + + + + # OS/390 lacks sys/param.h (and doesn't need it, by chance). + for ac_header in sys/param.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_PARAM_H 1 +_ACEOF + +fi + +done + + + # Let the user call this, because if it triggers, they will + # need a compat/strtod.c that is correct. Users can also + # use Tcl_GetDouble(FromObj) instead. + #TEA_BUGGY_STRTOD + fi + + +#----------------------------------------------------------------------- +# __CHANGE__ +# Specify the C source files to compile in TEA_ADD_SOURCES, +# public headers that need to be installed in TEA_ADD_HEADERS, +# stub library C source files to compile in TEA_ADD_STUB_SOURCES, +# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. +# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS +# and PKG_TCL_SOURCES. +#----------------------------------------------------------------------- + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link with stubs library" >&5 +$as_echo_n "checking whether to link with stubs library... " >&6; } + # Check whether --enable-stubs was given. +if test "${enable_stubs+set}" = set; then : + enableval=$enable_stubs; tcl_ok=$enableval +else + tcl_ok=yes +fi + + + if test "${enable_stubs+set}" = set; then + enableval="$enable_stubs" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: stubs" >&5 +$as_echo "stubs" >&6; } + USE_STUBS=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no stubs" >&5 +$as_echo "no stubs" >&6; } + USE_STUBS=0 + fi + + + + vars="togl.c toglProcAddr.c toglStubInit.c" + for i in $vars; do + case $i in + \$*) + # allow $-var names + PKG_SOURCES="$PKG_SOURCES $i" + PKG_OBJECTS="$PKG_OBJECTS $i" + ;; + *) + # check for existence - allows for generic/win/unix VPATH + # To add more dirs here (like 'src'), you have to update VPATH + # in Makefile.in as well + if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ + -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ + ; then + as_fn_error "could not find source file '$i'" "$LINENO" 5 + fi + PKG_SOURCES="$PKG_SOURCES $i" + # this assumes it is in a VPATH dir + i=`basename $i` + # handle user calling this before or after TEA_SETUP_COMPILER + if test x"${OBJEXT}" != x ; then + j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" + else + j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" + fi + PKG_OBJECTS="$PKG_OBJECTS $j" + ;; + esac + done + + + +# togl_ws.h is added in Makefile.in because it is generated + + vars="togl.h toglDecls.h" + for i in $vars; do + # check for existence, be strict because it is installed + if test ! -f "${srcdir}/$i" ; then + as_fn_error "could not find header file '${srcdir}/$i'" "$LINENO" 5 + fi + PKG_HEADERS="$PKG_HEADERS $i" + done + + + + vars="" + for i in $vars; do + PKG_INCLUDES="$PKG_INCLUDES $i" + done + + + + vars="" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + + PKG_CFLAGS="$PKG_CFLAGS " + + +if test "${USE_STUBS}" = "1" ; then + + vars="toglStubLib.c" + for i in $vars; do + # check for existence - allows for generic/win/unix VPATH + if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ + -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ + ; then + as_fn_error "could not find stub source file '$i'" "$LINENO" 5 + fi + PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" + # this assumes it is in a VPATH dir + i=`basename $i` + # handle user calling this before or after TEA_SETUP_COMPILER + if test x"${OBJEXT}" != x ; then + j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" + else + j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" + fi + PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" + done + + + +fi + + vars="" + for i in $vars; do + # check for existence, be strict because it is installed + if test ! -f "${srcdir}/$i" ; then + as_fn_error "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5 + fi + PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" + done + + + +#-------------------------------------------------------------------- +# __CHANGE__ +# A few miscellaneous platform-specific items: +# +# Define a special symbol for Windows (BUILD_sample in this case) so +# that we create the export library with the dll. +# +# Windows creates a few extra files that need to be cleaned up. +# You can add more files to clean if your extension creates any extra +# files. +# +# TEA_ADD_* any platform specific compiler/build info here. +#-------------------------------------------------------------------- + +# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure +# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. +#CLEANFILES="pkgIndex.tcl" +if test "${TEA_PLATFORM}" = "windows" ; then + +$as_echo "#define BUILD_togl 1" >>confdefs.h + + CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch *.manifest" + #TEA_ADD_SOURCES([win/winFile.c]) + #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) +else + # Ensure no empty else clauses + : + CLEANFILES="so_locations" + #TEA_ADD_SOURCES([unix/unixFile.c]) + #TEA_ADD_LIBS([-lsuperfly]) +fi + + +#-------------------------------------------------------------------- +# __CHANGE__ +# Choose which headers you need. Extension authors should try very +# hard to only rely on the Tcl public header files. Internal headers +# contain private data structures and are subject to change without +# notice. +# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG +#-------------------------------------------------------------------- + +# find Tcl, Tk, and X11 headers +#TEA_PUBLIC_TCL_HEADERS + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5 +$as_echo_n "checking for Tcl public headers... " >&6; } + + +# Check whether --with-tclinclude was given. +if test "${with_tclinclude+set}" = set; then : + withval=$with_tclinclude; with_tclinclude=${withval} +fi + + + if test "${ac_cv_c_tclh+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + # Use the value from --with-tclinclude, if it was given + + if test x"${with_tclinclude}" != x ; then + if test -f "${with_tclinclude}/tcl.h" ; then + ac_cv_c_tclh=${with_tclinclude} + else + as_fn_error "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5 + fi + else + if test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use + # the framework's Headers directory + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" + ;; + esac + fi + + # Look in the source dir only if Tcl is not installed, + # and in that situation, look there before installed locations. + if test -f "${TCL_BIN_DIR}/Makefile" ; then + list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" + fi + + # Check order: pkg --prefix location, Tcl's --prefix location, + # relative to directory of tclConfig.sh. + + eval "temp_includedir=${includedir}" + list="$list \ + `ls -d ${temp_includedir} 2>/dev/null` \ + `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ + `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" + if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then + list="$list /usr/local/include /usr/include" + if test x"${TCL_INCLUDE_SPEC}" != x ; then + d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` + list="$list `ls -d ${d} 2>/dev/null`" + fi + fi + for i in $list ; do + if test -f "$i/tcl.h" ; then + ac_cv_c_tclh=$i + break + fi + done + fi + +fi + + + # Print a message based on how we determined the include path + + if test x"${ac_cv_c_tclh}" = x ; then + as_fn_error "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5 +$as_echo "${ac_cv_c_tclh}" >&6; } + fi + + # Convert to a native path and substitute into the output files. + + INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` + + TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + + + + # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh} + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private include files" >&5 +$as_echo_n "checking for Tcl private include files... " >&6; } + + TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` + TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" + + # Check to see if tclPort.h isn't already with the public headers + # Don't look for tclInt.h because that resides with tcl.h in the core + # sources, but the Port headers are in a different directory + if test "${TEA_PLATFORM}" = "windows" -a \ + -f "${ac_cv_c_tclh}/tclWinPort.h"; then + result="private headers found with public headers" + elif test "${TEA_PLATFORM}" = "unix" -a \ + -f "${ac_cv_c_tclh}/tclUnixPort.h"; then + result="private headers found with public headers" + else + TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" + if test "${TEA_PLATFORM}" = "windows"; then + TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" + else + TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" + fi + # Overwrite the previous TCL_INCLUDES as this should capture both + # public and private headers in the same set. + # We want to ensure these are substituted so as not to require + # any *_NATIVE vars be defined in the Makefile + TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" + if test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use + # the framework's Headers and PrivateHeaders directories + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + if test -d "${TCL_BIN_DIR}/Headers" -a \ + -d "${TCL_BIN_DIR}/PrivateHeaders"; then + TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}" + else + TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" + fi + ;; + esac + result="Using ${TCL_INCLUDES}" + else + if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then + as_fn_error "Cannot find private header tclInt.h in ${TCL_SRC_DIR}" "$LINENO" 5 + fi + result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" + fi + fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5 +$as_echo "${result}" >&6; } + + +#TEA_PUBLIC_TK_HEADERS + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk public headers" >&5 +$as_echo_n "checking for Tk public headers... " >&6; } + + +# Check whether --with-tkinclude was given. +if test "${with_tkinclude+set}" = set; then : + withval=$with_tkinclude; with_tkinclude=${withval} +fi + + + if test "${ac_cv_c_tkh+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + # Use the value from --with-tkinclude, if it was given + + if test x"${with_tkinclude}" != x ; then + if test -f "${with_tkinclude}/tk.h" ; then + ac_cv_c_tkh=${with_tkinclude} + else + as_fn_error "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5 + fi + else + if test "`uname -s`" = "Darwin"; then + # If Tk was built as a framework, attempt to use + # the framework's Headers directory. + case ${TK_DEFS} in + *TK_FRAMEWORK*) + list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" + ;; + esac + fi + + # Look in the source dir only if Tk is not installed, + # and in that situation, look there before installed locations. + if test -f "${TK_BIN_DIR}/Makefile" ; then + list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" + fi + + # Check order: pkg --prefix location, Tk's --prefix location, + # relative to directory of tkConfig.sh, Tcl's --prefix location, + # relative to directory of tclConfig.sh. + + eval "temp_includedir=${includedir}" + list="$list \ + `ls -d ${temp_includedir} 2>/dev/null` \ + `ls -d ${TK_PREFIX}/include 2>/dev/null` \ + `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ + `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ + `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" + if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then + list="$list /usr/local/include /usr/include" + fi + for i in $list ; do + if test -f "$i/tk.h" ; then + ac_cv_c_tkh=$i + break + fi + done + fi + +fi + + + # Print a message based on how we determined the include path + + if test x"${ac_cv_c_tkh}" = x ; then + as_fn_error "tk.h not found. Please specify its location with --with-tkinclude" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tkh}" >&5 +$as_echo "${ac_cv_c_tkh}" >&6; } + fi + + # Convert to a native path and substitute into the output files. + + INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` + + TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + + + if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then + # On Windows and Aqua, we need the X compat headers + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5 +$as_echo_n "checking for X11 header files... " >&6; } + if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then + INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" + TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${INCLUDE_DIR_NATIVE}" >&5 +$as_echo "${INCLUDE_DIR_NATIVE}" >&6; } + fi + + + # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh} + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private include files" >&5 +$as_echo_n "checking for Tk private include files... " >&6; } + + TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` + TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" + + # Check to see if tkPort.h isn't already with the public headers + # Don't look for tkInt.h because that resides with tk.h in the core + # sources, but the Port headers are in a different directory + if test "${TEA_PLATFORM}" = "windows" -a \ + -f "${ac_cv_c_tkh}/tkWinPort.h"; then + result="private headers found with public headers" + elif test "${TEA_PLATFORM}" = "unix" -a \ + -f "${ac_cv_c_tkh}/tkUnixPort.h"; then + result="private headers found with public headers" + else + TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" + TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" + if test "${TEA_PLATFORM}" = "windows"; then + TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" + else + TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" + fi + # Overwrite the previous TK_INCLUDES as this should capture both + # public and private headers in the same set. + # We want to ensure these are substituted so as not to require + # any *_NATIVE vars be defined in the Makefile + TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" + # Detect and add ttk subdir + if test -d "${TK_SRC_DIR}/generic/ttk"; then + TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\"" + fi + if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then + TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" + fi + if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then + TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\"" + fi + if test "`uname -s`" = "Darwin"; then + # If Tk was built as a framework, attempt to use + # the framework's Headers and PrivateHeaders directories + case ${TK_DEFS} in + *TK_FRAMEWORK*) + if test -d "${TK_BIN_DIR}/Headers" -a \ + -d "${TK_BIN_DIR}/PrivateHeaders"; then + TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}" + else + TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" + fi + ;; + esac + result="Using ${TK_INCLUDES}" + else + if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then + as_fn_error "Cannot find private header tkInt.h in ${TK_SRC_DIR}" "$LINENO" 5 + fi + result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5 +$as_echo "${result}" >&6; } + + + if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then : + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl dylib la dll; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /usr/lib64 | /lib | /lib64) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R7/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R7 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R7/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R7 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # We can compile using X headers with no special include directory. +ac_x_includes= +else + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + LIBS=$ac_save_LIBS +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl dylib la dll; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +$as_echo "$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } +fi + + not_really_there="" + if test "$no_x" = ""; then + if test "$x_includes" = ""; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + not_really_there="yes" +fi +rm -f conftest.err conftest.$ac_ext + else + if test ! -r $x_includes/X11/Intrinsic.h; then + not_really_there="yes" + fi + fi + fi + if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5 +$as_echo_n "checking for X11 header files... " >&6; } + found_xincludes="no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + found_xincludes="yes" +else + found_xincludes="no" +fi +rm -f conftest.err conftest.$ac_ext + if test "$found_xincludes" = "no"; then + dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" + for i in $dirs ; do + if test -r $i/X11/Intrinsic.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5 +$as_echo "$i" >&6; } + XINCLUDES=" -I$i" + found_xincludes="yes" + break + fi + done + fi + else + if test "$x_includes" != ""; then + XINCLUDES="-I$x_includes" + found_xincludes="yes" + fi + fi + if test found_xincludes = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find any!" >&5 +$as_echo "couldn't find any!" >&6; } + fi + + if test "$no_x" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 libraries" >&5 +$as_echo_n "checking for X11 libraries... " >&6; } + XLIBSW=nope + dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" + for i in $dirs ; do + if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5 +$as_echo "$i" >&6; } + XLIBSW="-L$i -lX11" + x_libraries="$i" + break + fi + done + else + if test "$x_libraries" = ""; then + XLIBSW=-lX11 + else + XLIBSW="-L$x_libraries -lX11" + fi + fi + if test "$XLIBSW" = nope ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5 +$as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; } +if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXwindow $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XCreateWindow (); +int +main () +{ +return XCreateWindow (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xwindow_XCreateWindow=yes +else + ac_cv_lib_Xwindow_XCreateWindow=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5 +$as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; } +if test "x$ac_cv_lib_Xwindow_XCreateWindow" = x""yes; then : + XLIBSW=-lXwindow +fi + + fi + if test "$XLIBSW" = nope ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find any! Using -lX11." >&5 +$as_echo "could not find any! Using -lX11." >&6; } + XLIBSW=-lX11 + fi + # TEA specific: + if test x"${XLIBSW}" != x ; then + PKG_LIBS="${PKG_LIBS} ${XLIBSW}" + fi + + fi + + +# find autostereo header, lib, and daemon + +# Check whether --with-autostereo was given. +if test "${with_autostereo+set}" = set; then : + withval=$with_autostereo; with_autostereo=${withval} +fi + + +# Check whether --with-autostereod was given. +if test "${with_autostereod+set}" = set; then : + withval=$with_autostereod; with_autostereod=${withval} +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for autostereo directory" >&5 +$as_echo_n "checking for autostereo directory... " >&6; } +if test x"${with_autostereo}" != x ; then + if test -f "${with_autostereo}/lib/autostereo.h" ; then + with_autostereo=`(cd ${with_autostereo}; pwd)` + + vars="-I${with_autostereo}/lib" + for i in $vars; do + PKG_INCLUDES="$PKG_INCLUDES $i" + done + + + + vars="-L${with_autostereo}/lib -lautostereo" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_AUTOSTEREO 1 +_ACEOF + + else + as_fn_error "${with_autostereo} directory doesn't contain lib/autostereo.h" "$LINENO" 5 + fi +fi + +# Extract the first word of "autostereod", so it can be a program name with args. +set dummy autostereod; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_AUTOSTEREOD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $AUTOSTEREOD in + [\\/]* | ?:[\\/]*) + ac_cv_path_AUTOSTEREOD="$AUTOSTEREOD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="`eval \"echo $sbindir\"`:$PATH:/sbin:/usr/sbin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_AUTOSTEREOD="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +AUTOSTEREOD=$ac_cv_path_AUTOSTEREOD +if test -n "$AUTOSTEREOD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOSTEREOD" >&5 +$as_echo "$AUTOSTEREOD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +# Choose OpenGL platform +case "${TEA_WINDOWINGSYSTEM}" in + aqua) + TOGL_WINDOWINGSYSTEM=TOGL_NSOPENGL + CFLAGS="-ObjC" + + +# vars="-framework AGL -framework OpenGL -framework ApplicationServices" + vars="-framework OpenGL -framework AppKit -framework ApplicationServices" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + # libGLU is implicit in OpenGL framework + LIBGLU= + ;; + + x11) + TOGL_WINDOWINGSYSTEM=TOGL_X11 + + +# Check whether --with-Xmu was given. +if test "${with_Xmu+set}" = set; then : + withval=$with_Xmu; +else + with_Xmu=no +fi + + if test "x$with_Xmu" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuLookupStandardColormap in -lXmu" >&5 +$as_echo_n "checking for XmuLookupStandardColormap in -lXmu... " >&6; } +if test "${ac_cv_lib_Xmu_XmuLookupStandardColormap+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXmu -lXt -lX11 + $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XmuLookupStandardColormap (); +int +main () +{ +return XmuLookupStandardColormap (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xmu_XmuLookupStandardColormap=yes +else + ac_cv_lib_Xmu_XmuLookupStandardColormap=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuLookupStandardColormap" >&5 +$as_echo "$ac_cv_lib_Xmu_XmuLookupStandardColormap" >&6; } +if test "x$ac_cv_lib_Xmu_XmuLookupStandardColormap" = x""yes; then : + + vars="-lXmu" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + +$as_echo "#define USE_SYSTEM_LIBXMU 1" >>confdefs.h + + +else + with_Xmu=no +fi + +fi + if test "x$with_Xmu" = xno; then : + + vars="Xmu/CmapAlloc.c Xmu/CrCmap.c Xmu/DelCmap.c Xmu/LookupCmap.c Xmu/StdCmap.c" + for i in $vars; do + case $i in + \$*) + # allow $-var names + PKG_SOURCES="$PKG_SOURCES $i" + PKG_OBJECTS="$PKG_OBJECTS $i" + ;; + *) + # check for existence - allows for generic/win/unix VPATH + # To add more dirs here (like 'src'), you have to update VPATH + # in Makefile.in as well + if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ + -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ + ; then + as_fn_error "could not find source file '$i'" "$LINENO" 5 + fi + PKG_SOURCES="$PKG_SOURCES $i" + # this assumes it is in a VPATH dir + i=`basename $i` + # handle user calling this before or after TEA_SETUP_COMPILER + if test x"${OBJEXT}" != x ; then + j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" + else + j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" + fi + PKG_OBJECTS="$PKG_OBJECTS $j" + ;; + esac + done + + + +fi + + vars="-lGL" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + LIBGLU=-lGLU + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GLX_GLXEXT_LEGACY interfers with including GL/glxext.h" >&5 +$as_echo_n "checking if GLX_GLXEXT_LEGACY interfers with including GL/glxext.h... " >&6; } + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_save_CFLAGS=$CFLAGS + CFLAGS=$TK_XINCLUDES + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define GLX_GLXEXT_LEGACY +#include +#undef GLX_VERSION_1_3 +#undef GLX_VERSION_1_4 +#include +int main() { return 0; } + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define UNDEF_GET_PROC_ADDRESS 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ac_save_CFLAGS + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ;; + win32) + TOGL_WINDOWINGSYSTEM=TOGL_WGL + + + vars="opengl32.lib user32.lib gdi32.lib" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + if test "$GCC" = "yes" ; then + LIBGLU=-lglu32 + else + # assume Microsoft compiler + LIBGLU=glu32.lib + fi + ;; + *) + as_fn_error "Unsupported windowing system: ${TEA_WINDOWINGSYSTEM}" "$LINENO" 5 + ;; +esac + + + +#-------------------------------------------------------------------- +# Check whether --enable-threads or --disable-threads was given. +# This auto-enables if Tcl was compiled threaded. +#-------------------------------------------------------------------- + + + # Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then : + enableval=$enable_threads; tcl_ok=$enableval +else + tcl_ok=yes +fi + + + if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then + TCL_THREADS=1 + + if test "${TEA_PLATFORM}" != "windows" ; then + # We are always OK on Windows, so check what this platform wants: + + # USE_THREAD_ALLOC tells us to try the special thread-based + # allocator that significantly reduces lock contention + +$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h + + +$as_echo "#define _REENTRANT 1" >>confdefs.h + + if test "`uname -s`" = "SunOS" ; then + +$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + fi + +$as_echo "#define _THREAD_SAFE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 +$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } +if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_init (); +int +main () +{ +return pthread_mutex_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_mutex_init=yes +else + ac_cv_lib_pthread_pthread_mutex_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then : + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = "no"; then + # Check a little harder for __pthread_mutex_init in the same + # library, as some systems hide it there until pthread.h is + # defined. We could alternatively do an AC_TRY_COMPILE with + # pthread.h, but that will work with libpthread really doesn't + # exist, like AIX 4.2. [Bug: 4359] + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5 +$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; } +if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __pthread_mutex_init (); +int +main () +{ +return __pthread_mutex_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread___pthread_mutex_init=yes +else + ac_cv_lib_pthread___pthread_mutex_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_pthread___pthread_mutex_init" = x""yes; then : + tcl_ok=yes +else + tcl_ok=no +fi + + fi + + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthread" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5 +$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; } +if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthreads $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_init (); +int +main () +{ +return pthread_mutex_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthreads_pthread_mutex_init=yes +else + ac_cv_lib_pthreads_pthread_mutex_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = x""yes; then : + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthreads" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5 +$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; } +if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_init (); +int +main () +{ +return pthread_mutex_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_pthread_mutex_init=yes +else + ac_cv_lib_c_pthread_mutex_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_c_pthread_mutex_init" = x""yes; then : + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5 +$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; } +if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_init (); +int +main () +{ +return pthread_mutex_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_r_pthread_mutex_init=yes +else + ac_cv_lib_c_r_pthread_mutex_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_c_r_pthread_mutex_init" = x""yes; then : + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -pthread" + else + TCL_THREADS=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5 +$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;} + fi + fi + fi + fi + fi + else + TCL_THREADS=0 + fi + # Do checking message here to not mess up interleaved configure output + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5 +$as_echo_n "checking for building with threads... " >&6; } + if test "${TCL_THREADS}" = 1; then + +$as_echo "#define TCL_THREADS 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 +$as_echo "yes (default)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + # TCL_THREADS sanity checking. See if our request for building with + # threads is the same as the way Tcl was built. If not, warn the user. + case ${TCL_DEFS} in + *THREADS=1*) + if test "${TCL_THREADS}" = "0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Building ${PACKAGE_NAME} without threads enabled, but building against Tcl + that IS thread-enabled. It is recommended to use --enable-threads." >&5 +$as_echo "$as_me: WARNING: + Building ${PACKAGE_NAME} without threads enabled, but building against Tcl + that IS thread-enabled. It is recommended to use --enable-threads." >&2;} + fi + ;; + *) + if test "${TCL_THREADS}" = "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + --enable-threads requested, but building against a Tcl that is NOT + thread-enabled. This is an OK configuration that will also run in + a thread-enabled core." >&5 +$as_echo "$as_me: WARNING: + --enable-threads requested, but building against a Tcl that is NOT + thread-enabled. This is an OK configuration that will also run in + a thread-enabled core." >&2;} + fi + ;; + esac + + + +#-------------------------------------------------------------------- +# The statement below defines a collection of symbols related to +# building as a shared library instead of a static library. +#-------------------------------------------------------------------- + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 +$as_echo_n "checking how to build libraries... " >&6; } + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; tcl_ok=$enableval +else + tcl_ok=yes +fi + + + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 +$as_echo "shared" >&6; } + SHARED_BUILD=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 +$as_echo "static" >&6; } + SHARED_BUILD=0 + +$as_echo "#define STATIC_BUILD 1" >>confdefs.h + + fi + + + +#-------------------------------------------------------------------- +# This macro figures out what flags to use with the compiler/linker +# when building shared/static debug/optimized objects. This information +# can be taken from the tclConfig.sh file, but this figures it all out. +#-------------------------------------------------------------------- + + + + + # Step 0.a: Enable 64 bit support? + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 +$as_echo_n "checking if 64bit support is requested... " >&6; } + # Check whether --enable-64bit was given. +if test "${enable_64bit+set}" = set; then : + enableval=$enable_64bit; do64bit=$enableval +else + do64bit=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 +$as_echo "$do64bit" >&6; } + + # Step 0.b: Enable Solaris 64 bit VIS support? + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 +$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; } + # Check whether --enable-64bit-vis was given. +if test "${enable_64bit_vis+set}" = set; then : + enableval=$enable_64bit_vis; do64bitVIS=$enableval +else + do64bitVIS=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5 +$as_echo "$do64bitVIS" >&6; } + # Force 64bit on with VIS + if test "$do64bitVIS" = "yes"; then : + do64bit=yes +fi + + # Step 0.c: Check if visibility support is available. Do this here so + # that platform specific alternatives can be used below if this fails. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5 +$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; } +if test "${tcl_cv_cc_visibility_hidden+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern __attribute__((__visibility__("hidden"))) void f(void); + void f(void) {} +int +main () +{ +f(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_cc_visibility_hidden=yes +else + tcl_cv_cc_visibility_hidden=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5 +$as_echo "$tcl_cv_cc_visibility_hidden" >&6; } + if test $tcl_cv_cc_visibility_hidden = yes; then : + + +$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h + + +fi + + # Step 0.d: Disable -rpath support? + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5 +$as_echo_n "checking if rpath support is requested... " >&6; } + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; doRpath=$enableval +else + doRpath=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 +$as_echo "$doRpath" >&6; } + + # TEA specific: Cross-compiling options for Windows/CE builds? + + if test "${TEA_PLATFORM}" = windows; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5 +$as_echo_n "checking if Windows/CE build is requested... " >&6; } + # Check whether --enable-wince was given. +if test "${enable_wince+set}" = set; then : + enableval=$enable_wince; doWince=$enableval +else + doWince=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5 +$as_echo "$doWince" >&6; } + +fi + + # Step 1: set the variable "system" to hold the name and version number + # for the system. + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 +$as_echo_n "checking system version... " >&6; } +if test "${tcl_cv_sys_version+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + # TEA specific: + if test "${TEA_PLATFORM}" = "windows" ; then + tcl_cv_sys_version=windows + elif test -f /usr/lib/NextStep/software_version; then + tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` + else + tcl_cv_sys_version=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 +$as_echo "$as_me: WARNING: can't find uname command" >&2;} + tcl_cv_sys_version=unknown + else + # Special check for weird MP-RAS system (uname returns weird + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then + tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + tcl_cv_sys_version=AIX-`uname -v`.`uname -r` + fi + fi + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 +$as_echo "$tcl_cv_sys_version" >&6; } + system=$tcl_cv_sys_version + + + # Step 2: check for existence of -ldl library. This is needed because + # Linux can use either -ldl or -ldld for dynamic loading. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + have_dl=yes +else + have_dl=no +fi + + + # Require ranlib early so we can override it in special cases below. + + + + # Step 3: set configuration options based on system name and version. + # This is similar to Tcl's unix/tcl.m4 except that we've added a + # "windows" case. + + do64bit_ok=no + LDFLAGS_ORIG="$LDFLAGS" + # When ld needs options to work in 64-bit mode, put them in + # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] + # is disabled by the user. [Bug 1016796] + LDFLAGS_ARCH="" + TCL_EXPORT_FILE_SUFFIX="" + UNSHARED_LIB_SUFFIX="" + # TEA specific: use PACKAGE_VERSION instead of VERSION + TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' + ECHO_VERSION='`echo ${PACKAGE_VERSION}`' + TCL_LIB_VERSIONS_OK=ok + CFLAGS_DEBUG=-g + CFLAGS_OPTIMIZE=-O + if test "$GCC" = yes; then : + + # TEA specific: + CFLAGS_OPTIMIZE=-O2 + CFLAGS_WARNING="-Wall -Wno-implicit-int" + +else + CFLAGS_WARNING="" +fi + TCL_NEEDS_EXP_FILE=0 + TCL_BUILD_EXP_FILE="" + TCL_EXP_FILE="" + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + STLIB_LD='${AR} cr' + LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" + case $system in + # TEA specific: + windows) + # This is a 2-stage check to make sure we have the 64-bit SDK + # We have to know where the SDK is installed. + # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs + # MACHINE is IX86 for LINK, but this is used by the manifest, + # which requires x86|amd64|ia64. + MACHINE="X86" + if test "$do64bit" != "no" ; then + if test "x${MSSDK}x" = "xx" ; then + MSSDK="C:/Progra~1/Microsoft Platform SDK" + fi + MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` + PATH64="" + case "$do64bit" in + amd64|x64|yes) + MACHINE="AMD64" ; # default to AMD64 64-bit build + PATH64="${MSSDK}/Bin/Win64/x86/AMD64" + ;; + ia64) + MACHINE="IA64" + PATH64="${MSSDK}/Bin/Win64" + ;; + esac + if test ! -d "${PATH64}" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 +$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5 +$as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} + do64bit="no" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5 +$as_echo " Using 64-bit $MACHINE mode" >&6; } + do64bit_ok="yes" + fi + fi + + if test "$doWince" != "no" ; then + if test "$do64bit" != "no" ; then + as_fn_error "Windows/CE and 64-bit builds incompatible" "$LINENO" 5 + fi + if test "$GCC" = "yes" ; then + as_fn_error "Windows/CE and GCC builds incompatible" "$LINENO" 5 + fi + + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-celib + + if test x"${no_celib}" = x ; then + # we reset no_celib in case something fails here + no_celib=true + +# Check whether --with-celib was given. +if test "${with_celib+set}" = set; then : + withval=$with_celib; with_celibconfig=${withval} +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5 +$as_echo_n "checking for Windows/CE celib directory... " >&6; } + if test "${ac_cv_c_celibconfig+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + # First check to see if --with-celibconfig was specified. + if test x"${with_celibconfig}" != x ; then + if test -d "${with_celibconfig}/inc" ; then + ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` + else + as_fn_error "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5 + fi + fi + + # then check for a celib library + if test x"${ac_cv_c_celibconfig}" = x ; then + for i in \ + ../celib-palm-3.0 \ + ../celib \ + ../../celib-palm-3.0 \ + ../../celib \ + `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \ + ${srcdir}/../celib-palm-3.0 \ + ${srcdir}/../celib \ + `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \ + ; do + if test -d "$i/inc" ; then + ac_cv_c_celibconfig=`(cd $i; pwd)` + break + fi + done + fi + +fi + + if test x"${ac_cv_c_celibconfig}" = x ; then + as_fn_error "Cannot find celib support library directory" "$LINENO" 5 + else + no_celib= + CELIB_DIR=${ac_cv_c_celibconfig} + CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5 +$as_echo "found $CELIB_DIR" >&6; } + fi + fi + + # Set defaults for common evc4/PPC2003 setup + # Currently Tcl requires 300+, possibly 420+ for sockets + CEVERSION=420; # could be 211 300 301 400 420 ... + TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... + ARCH=ARM; # could be ARM MIPS X86EM ... + PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" + if test "$doWince" != "yes"; then + # If !yes then the user specified something + # Reset ARCH to allow user to skip specifying it + ARCH= + eval `echo $doWince | awk -F, '{ \ + if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \ + if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ + if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \ + if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \ + if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \ + }'` + if test "x${ARCH}" = "x" ; then + ARCH=$TARGETCPU; + fi + fi + OSVERSION=WCE$CEVERSION; + if test "x${WCEROOT}" = "x" ; then + WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" + if test ! -d "${WCEROOT}" ; then + WCEROOT="C:/Program Files/Microsoft eMbedded Tools" + fi + fi + if test "x${SDKROOT}" = "x" ; then + SDKROOT="C:/Program Files/Windows CE Tools" + if test ! -d "${SDKROOT}" ; then + SDKROOT="C:/Windows CE Tools" + fi + fi + WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` + SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` + if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ + -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then + as_fn_error "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5 + doWince="no" + else + # We could PATH_NOSPACE these, but that's not important, + # as long as we quote them when used. + CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" + if test -d "${CEINCLUDE}/${TARGETCPU}" ; then + CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" + fi + CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" + fi + fi + + if test "$GCC" != "yes" ; then + if test "${SHARED_BUILD}" = "0" ; then + runtime=-MT + else + runtime=-MD + fi + + if test "$do64bit" != "no" ; then + # All this magic is necessary for the Win64 SDK RC1 - hobbs + CC="\"${PATH64}/cl.exe\"" + CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" + RC="\"${MSSDK}/bin/rc.exe\"" + lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + LINKBIN="\"${PATH64}/link.exe\"" + CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" + # Avoid 'unresolved external symbol __security_cookie' + # errors, c.f. http://support.microsoft.com/?id=894573 + + vars="bufferoverflowU.lib" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + elif test "$doWince" != "no" ; then + CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" + if test "${TARGETCPU}" = "X86"; then + CC="\"${CEBINROOT}/cl.exe\"" + else + CC="\"${CEBINROOT}/cl${ARCH}.exe\"" + fi + CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" + RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" + arch=`echo ${ARCH} | awk '{print tolower($0)}'` + defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" + if test "${SHARED_BUILD}" = "1" ; then + # Static CE builds require static celib as well + defs="${defs} _DLL" + fi + for i in $defs ; do + +cat >>confdefs.h <<_ACEOF +#define $i 1 +_ACEOF + + done + +cat >>confdefs.h <<_ACEOF +#define _WIN32_WCE $CEVERSION +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define UNDER_CE $CEVERSION +_ACEOF + + CFLAGS_DEBUG="-nologo -Zi -Od" + CFLAGS_OPTIMIZE="-nologo -Ox" + lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` + lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" + LINKBIN="\"${CEBINROOT}/link.exe\"" + + else + RC="rc" + lflags="-nologo" + LINKBIN="link" + CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" + fi + fi + + if test "$GCC" = "yes"; then + # mingw gcc mode + RC="windres" + CFLAGS_DEBUG="-g" + CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" + SHLIB_LD="$CC -shared" + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" + LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" + else + SHLIB_LD="${LINKBIN} -dll ${lflags}" + # link -lib only works when -lib is the first arg + STLIB_LD="${LINKBIN} -lib ${lflags}" + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' + PATHTYPE=-w + # For information on what debugtype is most useful, see: + # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp + # and also + # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx + # This essentially turns it all on. + LDFLAGS_DEBUG="-debug -debugtype:cv" + LDFLAGS_OPTIMIZE="-release" + if test "$doWince" != "no" ; then + LDFLAGS_CONSOLE="-link ${lflags}" + LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} + else + LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" + LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" + fi + fi + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dll" + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' + + TCL_LIB_VERSIONS_OK=nodots + # Bogus to avoid getting this turned off + DL_OBJS="tclLoadNone.obj" + ;; + AIX-*) + if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then : + + # AIX requires the _r compiler when gcc isn't being used + case "${CC}" in + *_r) + # ok ... + ;; + *) + CC=${CC}_r + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 +$as_echo "Using $CC for compiling with threads" >&6; } + +fi + LIBS="$LIBS -lc" + SHLIB_CFLAGS="" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + DL_OBJS="tclLoadDl.o" + LD_LIBRARY_PATH_VAR="LIBPATH" + + # Check to enable 64-bit flags for compiler/linker on AIX 4+ + if test "$do64bit" = yes -a "`uname -v`" -gt 3; then : + + if test "$GCC" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + +else + + do64bit_ok=yes + CFLAGS="$CFLAGS -q64" + LDFLAGS_ARCH="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LD_FLAGS="-b64" + +fi + +fi + + if test "`uname -m`" = ia64; then : + + # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + # AIX-5 has dl* in libc.so + DL_LIBS="" + if test "$GCC" = yes; then : + + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + +else + + CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' + +fi + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + +else + + if test "$GCC" = yes; then : + SHLIB_LD='${CC} -shared' +else + + SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" + +fi + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + TCL_NEEDS_EXP_FILE=1 + # TEA specific: use PACKAGE_VERSION instead of VERSION + TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' + +fi + + # AIX v<=4.1 has some different flags than 4.2+ + if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then : + + case " $LIBOBJS " in + *" tclLoadAix.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; +esac + + DL_LIBS="-lld" + +fi + + # On AIX <=v4 systems, libbsd.a has to be linked in to support + # non-blocking file IO. This library has to be linked in after + # the MATH_LIBS or it breaks the pow() function. The way to + # insure proper sequencing, is to add it to the tail of MATH_LIBS. + # This library also supplies gettimeofday. + # + # AIX does not have a timezone field in struct tm. When the AIX + # bsd library is used, the timezone global and the gettimeofday + # methods are to be avoided for timezone deduction instead, we + # deduce the timezone by comparing the localtime result on a + # known GMT value. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday in -lbsd" >&5 +$as_echo_n "checking for gettimeofday in -lbsd... " >&6; } +if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gettimeofday (); +int +main () +{ +return gettimeofday (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bsd_gettimeofday=yes +else + ac_cv_lib_bsd_gettimeofday=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gettimeofday" >&5 +$as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; } +if test "x$ac_cv_lib_bsd_gettimeofday" = x""yes; then : + libbsd=yes +else + libbsd=no +fi + + if test $libbsd = yes; then : + + MATH_LIBS="$MATH_LIBS -lbsd" + +$as_echo "#define USE_DELTA_FOR_TZ 1" >>confdefs.h + + +fi + ;; + BeOS*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -nostart' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + + #----------------------------------------------------------- + # Check for inet_ntoa in -lbind, for BeOS (which also needs + # -lsocket, even if the network functions are in -lnet which + # is always linked to, for compatibility. + #----------------------------------------------------------- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5 +$as_echo_n "checking for inet_ntoa in -lbind... " >&6; } +if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbind $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char inet_ntoa (); +int +main () +{ +return inet_ntoa (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bind_inet_ntoa=yes +else + ac_cv_lib_bind_inet_ntoa=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5 +$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; } +if test "x$ac_cv_lib_bind_inet_ntoa" = x""yes; then : + LIBS="$LIBS -lbind -lsocket" +fi + + ;; + BSD/OS-2.1*|BSD/OS-3*) + SHLIB_CFLAGS="" + SHLIB_LD="shlicc -r" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + BSD/OS-4.*) + SHLIB_CFLAGS="-export-dynamic -fPIC" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -export-dynamic" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + dgux*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + HP-UX-*.11.*) + # Use updated header definitions where possible + +$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h + + # TEA specific: Needed by Tcl, but not most extensions + #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) + #LIBS="$LIBS -lxnet" # Use the XOPEN network library + + if test "`uname -m`" = ia64; then : + + SHLIB_SUFFIX=".so" + # Use newer C++ library for C++ extensions + #if test "$GCC" != "yes" ; then + # CPPFLAGS="-AA" + #fi + +else + + SHLIB_SUFFIX=".sl" + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = yes; then : + + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" + SHLIB_LD_LIBS='${LIBS}' + DL_OBJS="tclLoadShl.o" + DL_LIBS="-ldld" + LDFLAGS="$LDFLAGS -Wl,-E" + CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_LIBRARY_PATH_VAR="SHLIB_PATH" + +fi + if test "$GCC" = yes; then : + + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + +fi + + # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc + #CFLAGS="$CFLAGS +DAportable" + + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = "yes"; then : + + if test "$GCC" = yes; then : + + case `${CC} -dumpmachine` in + hppa64*) + # 64-bit gcc in use. Fix flags for GNU ld. + do64bit_ok=yes + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + ;; + esac + +else + + do64bit_ok=yes + CFLAGS="$CFLAGS +DD64" + LDFLAGS_ARCH="+DD64" + +fi + +fi ;; + HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) + SHLIB_SUFFIX=".sl" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = yes; then : + + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" + SHLIB_LD_LIBS="" + DL_OBJS="tclLoadShl.o" + DL_LIBS="-ldld" + LDFLAGS="$LDFLAGS -Wl,-E" + CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_LIBRARY_PATH_VAR="SHLIB_PATH" + +fi ;; + IRIX-5.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + ;; + IRIX-6.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -n32 -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + if test "$GCC" = yes; then : + + CFLAGS="$CFLAGS -mabi=n32" + LDFLAGS="$LDFLAGS -mabi=n32" + +else + + case $system in + IRIX-6.3) + # Use to build 6.2 compatible binaries on 6.3. + CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" + ;; + *) + CFLAGS="$CFLAGS -n32" + ;; + esac + LDFLAGS="$LDFLAGS -n32" + +fi + ;; + IRIX64-6.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -n32 -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + # Check to enable 64-bit flags for compiler/linker + + if test "$do64bit" = yes; then : + + if test "$GCC" = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} + +else + + do64bit_ok=yes + SHLIB_LD="ld -64 -shared -rdata_shared" + CFLAGS="$CFLAGS -64" + LDFLAGS_ARCH="-64" + +fi + +fi + ;; + Linux*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + # TEA specific: + CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" + # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings + # when you inline the string and math operations. Turn this off to + # get rid of the warnings. + #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + if test "`uname -m`" = "alpha"; then : + CFLAGS="$CFLAGS -mieee" +fi + if test $do64bit = yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5 +$as_echo_n "checking if compiler accepts -m64 flag... " >&6; } +if test "${tcl_cv_cc_m64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -m64" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_cc_m64=yes +else + tcl_cv_cc_m64=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5 +$as_echo "$tcl_cv_cc_m64" >&6; } + if test $tcl_cv_cc_m64 = yes; then : + + CFLAGS="$CFLAGS -m64" + do64bit_ok=yes + +fi + +fi + + # The combo of gcc + glibc has a bug related to inlining of + # functions like strtod(). The -fno-builtin flag should address + # this problem but it does not work. The -fno-inline flag is kind + # of overkill but it works. Disable inlining only when one of the + # files in compat/*.c is being linked in. + + if test x"${USE_COMPAT}" != x; then : + CFLAGS="$CFLAGS -fno-inline" +fi + + ;; + GNU*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + SHLIB_LD='${CC} -shared' + DL_OBJS="" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + if test "`uname -m`" = "alpha"; then : + CFLAGS="$CFLAGS -mieee" +fi + ;; + Lynx*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + CFLAGS_OPTIMIZE=-02 + SHLIB_LD='${CC} -shared' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-mshared -ldl" + LD_FLAGS="-Wl,--export-dynamic" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + ;; + MP-RAS-02*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + MP-RAS-*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,-Bexport" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + NetBSD-1.*|FreeBSD-[1-2].*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 +$as_echo_n "checking for ELF... " >&6; } +if test "${tcl_cv_ld_elf+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __ELF__ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + tcl_cv_ld_elf=yes +else + tcl_cv_ld_elf=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 +$as_echo "$tcl_cv_ld_elf" >&6; } + if test $tcl_cv_ld_elf = yes; then : + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + +else + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + +fi + + # Ancient FreeBSD doesn't handle version numbers with dots. + + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + OpenBSD-*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 +$as_echo_n "checking for ELF... " >&6; } +if test "${tcl_cv_ld_elf+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __ELF__ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + tcl_cv_ld_elf=yes +else + tcl_cv_ld_elf=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 +$as_echo "$tcl_cv_ld_elf" >&6; } + if test $tcl_cv_ld_elf = yes; then : + + LDFLAGS=-Wl,-export-dynamic + +else + LDFLAGS="" +fi + + # OpenBSD doesn't do version numbers with dots. + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + NetBSD-*|FreeBSD-*) + # FreeBSD 3.* and greater have ELF. + # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="$LDFLAGS -export-dynamic" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + if test "${TCL_THREADS}" = "1"; then : + + # The -pthread needs to go in the CFLAGS, not LIBS + LIBS=`echo $LIBS | sed s/-pthread//` + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + +fi + case $system in + FreeBSD-3.*) + # FreeBSD-3 doesn't handle version numbers with dots. + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + TCL_LIB_VERSIONS_OK=nodots + ;; + esac + ;; + Darwin-*) + CFLAGS_OPTIMIZE="-Os" + SHLIB_CFLAGS="-fno-common" + # To avoid discrepancies between what headers configure sees during + # preprocessing tests and compiling tests, move any -isysroot and + # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: + CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ + if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`" + CFLAGS="`echo " ${CFLAGS}" | \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ + if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" + if test $do64bit = yes; then : + + case `arch` in + ppc) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5 +$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; } +if test "${tcl_cv_cc_arch_ppc64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_cc_arch_ppc64=yes +else + tcl_cv_cc_arch_ppc64=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5 +$as_echo "$tcl_cv_cc_arch_ppc64" >&6; } + if test $tcl_cv_cc_arch_ppc64 = yes; then : + + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + do64bit_ok=yes + +fi;; + i386) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5 +$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; } +if test "${tcl_cv_cc_arch_x86_64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch x86_64" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_cc_arch_x86_64=yes +else + tcl_cv_cc_arch_x86_64=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5 +$as_echo "$tcl_cv_cc_arch_x86_64" >&6; } + if test $tcl_cv_cc_arch_x86_64 = yes; then : + + CFLAGS="$CFLAGS -arch x86_64" + do64bit_ok=yes + +fi;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 +$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; + esac + +else + + # Check for combined 32-bit and 64-bit fat build + if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ + && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then : + + fat_32_64=yes +fi + +fi + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS + SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 +$as_echo_n "checking if ld accepts -single_module flag... " >&6; } +if test "${tcl_cv_ld_single_module+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_ld_single_module=yes +else + tcl_cv_ld_single_module=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 +$as_echo "$tcl_cv_ld_single_module" >&6; } + if test $tcl_cv_ld_single_module = yes; then : + + SHLIB_LD="${SHLIB_LD} -Wl,-single_module" + +fi + # TEA specific: link shlib with current and compatiblity version flags + vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` + SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dylib" + DL_OBJS="tclLoadDyld.o" + DL_LIBS="" + # Don't use -prebind when building for Mac OS X 10.4 or later only: + if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ + "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then : + + LDFLAGS="$LDFLAGS -prebind" +fi + LDFLAGS="$LDFLAGS -headerpad_max_install_names" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 +$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } +if test "${tcl_cv_ld_search_paths_first+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_ld_search_paths_first=yes +else + tcl_cv_ld_search_paths_first=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5 +$as_echo "$tcl_cv_ld_search_paths_first" >&6; } + if test $tcl_cv_ld_search_paths_first = yes; then : + + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + +fi + if test "$tcl_cv_cc_visibility_hidden" != yes; then : + + +$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h + + +fi + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" + # TEA specific: for combined 32 & 64 bit fat builds of Tk + # extensions, verify that 64-bit build is possible. + if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then : + + if test "${TEA_WINDOWINGSYSTEM}" = x11; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5 +$as_echo_n "checking for 64-bit X11... " >&6; } +if test "${tcl_cv_lib_x11_64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' + done + CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" + LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_lib_x11_64=yes +else + tcl_cv_lib_x11_64=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="$hold_'$v'"' + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5 +$as_echo "$tcl_cv_lib_x11_64" >&6; } + +fi + # remove 64-bit arch flags from CFLAGS et al. if configuration + # does not support 64-bit. + if test "${TEA_WINDOWINGSYSTEM}" = aqua -o "$tcl_cv_lib_x11_64" = no; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5 +$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;} + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' + done +fi + +fi + ;; + NEXTSTEP-*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -nostdlib -r' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadNext.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OS/390-*) + CFLAGS_OPTIMIZE="" # Optimizer is buggy + +$as_echo "#define _OE_SOCKETS 1" >>confdefs.h + + ;; + OSF1-1.0|OSF1-1.1|OSF1-1.2) + # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 + SHLIB_CFLAGS="" + # Hack: make package name same as library name + SHLIB_LD='ld -R -export :' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadOSF.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-1.*) + # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 + SHLIB_CFLAGS="-fPIC" + if test "$SHARED_BUILD" = 1; then : + SHLIB_LD="ld -shared" +else + + SHLIB_LD="ld -non_shared" + +fi + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-V*) + # Digital OSF/1 + SHLIB_CFLAGS="" + if test "$SHARED_BUILD" = 1; then : + + SHLIB_LD='${CC} -shared' + +else + + SHLIB_LD='${CC} -non_shared' + +fi + SHLIB_LD_LIBS="${LIBS}" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then : + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + if test "$GCC" = yes; then : + CFLAGS="$CFLAGS -mieee" +else + + CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" +fi + # see pthread_intro(3) for pthread support on osf1, k.furukawa + if test "${TCL_THREADS}" = 1; then : + + CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" + CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" + LIBS=`echo $LIBS | sed s/-lpthreads//` + if test "$GCC" = yes; then : + + LIBS="$LIBS -lpthread -lmach -lexc" + +else + + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + +fi + +fi + ;; + QNX-6*) + # QNX RTP + # This may work for all QNX, but it was only reported for v6. + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + # dlopen is in -lc on QNX + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SCO_SV-3.2*) + # Note, dlopen is available only on SCO 3.2.5 and greater. However, + # this test works, since "uname -s" was non-standard in 3.2.4 and + # below. + if test "$GCC" = yes; then : + + SHLIB_CFLAGS="-fPIC -melf" + LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" + +else + + SHLIB_CFLAGS="-Kpic -belf" + LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" + +fi + SHLIB_LD="ld -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SINIX*5.4*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SunOS-4*) + SHLIB_CFLAGS="-PIC" + SHLIB_LD="ld" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + + # SunOS can't handle version numbers with dots in them in library + # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it + # requires an extra version number at the end of .so file names. + # So, the library has to have a name like libtcl75.so.1.0 + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + SunOS-5.[0-6]) + # Careful to not let 5.10+ fall into this case + + # Note: If _REENTRANT isn't defined, then Solaris + # won't define thread-safe library routines. + + +$as_echo "#define _REENTRANT 1" >>confdefs.h + + +$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + + SHLIB_CFLAGS="-KPIC" + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + if test "$GCC" = yes; then : + + SHLIB_LD='${CC} -shared' + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + +else + + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + +fi + ;; + SunOS-5*) + # Note: If _REENTRANT isn't defined, then Solaris + # won't define thread-safe library routines. + + +$as_echo "#define _REENTRANT 1" >>confdefs.h + + +$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + + SHLIB_CFLAGS="-KPIC" + + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = yes; then : + + arch=`isainfo` + if test "$arch" = "sparcv9 sparc"; then : + + if test "$GCC" = yes; then : + + if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} + +else + + do64bit_ok=yes + CFLAGS="$CFLAGS -m64 -mcpu=v9" + LDFLAGS="$LDFLAGS -m64 -mcpu=v9" + SHLIB_CFLAGS="-fPIC" + +fi + +else + + do64bit_ok=yes + if test "$do64bitVIS" = yes; then : + + CFLAGS="$CFLAGS -xarch=v9a" + LDFLAGS_ARCH="-xarch=v9a" + +else + + CFLAGS="$CFLAGS -xarch=v9" + LDFLAGS_ARCH="-xarch=v9" + +fi + # Solaris 64 uses this as well + #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" + +fi + +else + if test "$arch" = "amd64 i386"; then : + + if test "$GCC" = yes; then : + + case $system in + SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) + do64bit_ok=yes + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; + esac + +else + + do64bit_ok=yes + case $system in + SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + CFLAGS="$CFLAGS -xarch=amd64" + LDFLAGS="$LDFLAGS -xarch=amd64";; + esac + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} +fi +fi + +fi + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + if test "$GCC" = yes; then : + + SHLIB_LD='${CC} -shared' + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + if test "$do64bit_ok" = yes; then : + + if test "$arch" = "sparcv9 sparc"; then : + + # We need to specify -static-libgcc or we need to + # add the path to the sparv9 libgcc. + # JH: static-libgcc is necessary for core Tcl, but may + # not be necessary for extensions. + SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" + # for finding sparcv9 libgcc, get the regular libgcc + # path, remove so name and append 'sparcv9' + #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." + #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + +else + if test "$arch" = "amd64 i386"; then : + + # JH: static-libgcc is necessary for core Tcl, but may + # not be necessary for extensions. + SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" + +fi +fi + +fi + +else + + case $system in + SunOS-5.[1-9][0-9]*) + SHLIB_LD='${CC} -G -z text ${LDFLAGS}';; + *) + SHLIB_LD='/usr/ccs/bin/ld -G -z text';; + esac + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + +fi + ;; + UNIX_SV* | UnixWare-5*) + SHLIB_CFLAGS="-KPIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers + # that don't grok the -Bexport option. Test that it does. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5 +$as_echo_n "checking for ld accepts -Bexport flag... " >&6; } +if test "${tcl_cv_ld_Bexport+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-Bexport" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_ld_Bexport=yes +else + tcl_cv_ld_Bexport=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5 +$as_echo "$tcl_cv_ld_Bexport" >&6; } + if test $tcl_cv_ld_Bexport = yes; then : + + LDFLAGS="$LDFLAGS -Wl,-Bexport" + +fi + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + esac + + if test "$do64bit" = yes -a "$do64bit_ok" = no; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 +$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} + +fi + + + + # Step 4: disable dynamic loading if requested via a command-line switch. + + # Check whether --enable-load was given. +if test "${enable_load+set}" = set; then : + enableval=$enable_load; tcl_ok=$enableval +else + tcl_ok=yes +fi + + if test "$tcl_ok" = no; then : + DL_OBJS="" +fi + + if test "x$DL_OBJS" != x; then : + BUILD_DLTEST="\$(DLTEST_TARGETS)" +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5 +$as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;} + SHLIB_CFLAGS="" + SHLIB_LD="" + SHLIB_SUFFIX="" + DL_OBJS="tclLoadNone.o" + DL_LIBS="" + LDFLAGS="$LDFLAGS_ORIG" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + BUILD_DLTEST="" + +fi + LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" + + # If we're running gcc, then change the C flags for compiling shared + # libraries to the right flags for gcc, instead of those for the + # standard manufacturer compiler. + + if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then : + + case $system in + AIX-*) ;; + BSD/OS*) ;; + IRIX*) ;; + NetBSD-*|FreeBSD-*) ;; + Darwin-*) ;; + SCO_SV-3.2*) ;; + *) SHLIB_CFLAGS="-fPIC" ;; + esac +fi + + if test "$SHARED_LIB_SUFFIX" = ""; then : + + # TEA specific: use PACKAGE_VERSION instead of VERSION + SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' +fi + if test "$UNSHARED_LIB_SUFFIX" = ""; then : + + # TEA specific: use PACKAGE_VERSION instead of VERSION + UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' +fi + + + + + + + + + + + + + + + + # These must be called after we do the basic CFLAGS checks and + # verify any possible 64-bit or similar switches are necessary + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5 +$as_echo_n "checking for required early compiler flags... " >&6; } + tcl_flags="" + + if test "${tcl_cv_flag__isoc99_source+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *)strtoll; char *q = (char *)strtoull; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__isoc99_source=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _ISOC99_SOURCE 1 +#include +int +main () +{ +char *p = (char *)strtoll; char *q = (char *)strtoull; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__isoc99_source=yes +else + tcl_cv_flag__isoc99_source=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then + +$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h + + tcl_flags="$tcl_flags _ISOC99_SOURCE" + fi + + + if test "${tcl_cv_flag__largefile64_source+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile64_source=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE64_SOURCE 1 +#include +int +main () +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile64_source=yes +else + tcl_cv_flag__largefile64_source=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then + +$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h + + tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" + fi + + + if test "${tcl_cv_flag__largefile_source64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *)open64; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile_source64=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE_SOURCE64 1 +#include +int +main () +{ +char *p = (char *)open64; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile_source64=yes +else + tcl_cv_flag__largefile_source64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then + +$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h + + tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" + fi + + if test "x${tcl_flags}" = "x" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5 +$as_echo "${tcl_flags}" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 +$as_echo_n "checking for 64-bit integer type... " >&6; } + if test "${tcl_cv_type_64bit+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + tcl_cv_type_64bit=none + # See if the compiler knows natively about __int64 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +__int64 value = (__int64) 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_type_64bit=__int64 +else + tcl_type_64bit="long long" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # See if we should use long anyway Note that we substitute in the + # type that is our current guess for a 64-bit type inside this check + # program, so it should be modified only carefully... + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +switch (0) { + case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; + } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_type_64bit=${tcl_type_64bit} +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "${tcl_cv_type_64bit}" = none ; then + +$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5 +$as_echo "using long" >&6; } + elif test "${tcl_cv_type_64bit}" = "__int64" \ + -a "${TEA_PLATFORM}" = "windows" ; then + # TEA specific: We actually want to use the default tcl.h checks in + # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5 +$as_echo "using Tcl header defaults" >&6; } + else + +cat >>confdefs.h <<_ACEOF +#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5 +$as_echo "${tcl_cv_type_64bit}" >&6; } + + # Now check for auxiliary declarations + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 +$as_echo_n "checking for struct dirent64... " >&6; } +if test "${tcl_cv_struct_dirent64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +struct dirent64 p; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_struct_dirent64=yes +else + tcl_cv_struct_dirent64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5 +$as_echo "$tcl_cv_struct_dirent64" >&6; } + if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then + +$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 +$as_echo_n "checking for struct stat64... " >&6; } +if test "${tcl_cv_struct_stat64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct stat64 p; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_struct_stat64=yes +else + tcl_cv_struct_stat64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 +$as_echo "$tcl_cv_struct_stat64" >&6; } + if test "x${tcl_cv_struct_stat64}" = "xyes" ; then + +$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h + + fi + + for ac_func in open64 lseek64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 +$as_echo_n "checking for off64_t... " >&6; } + if test "${tcl_cv_type_off64_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +off64_t offset; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_type_off64_t=yes +else + tcl_cv_type_off64_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_type_off64_t}" = "xyes" && \ + test "x${ac_cv_func_lseek64}" = "xyes" && \ + test "x${ac_cv_func_open64}" = "xyes" ; then + +$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + + +# should be part of TEA_CONFIG_CFLAGS, but more visible modification here + + +#-------------------------------------------------------------------- +# Set the default compiler switches based on the --enable-symbols option. +#-------------------------------------------------------------------- + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 +$as_echo_n "checking for build with symbols... " >&6; } + # Check whether --enable-symbols was given. +if test "${enable_symbols+set}" = set; then : + enableval=$enable_symbols; tcl_ok=$enableval +else + tcl_ok=no +fi + + DBGX="" + if test "$tcl_ok" = "no"; then + CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" + LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + CFLAGS_DEFAULT="${CFLAGS_DEBUG}" + LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" + if test "$tcl_ok" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 +$as_echo "yes (standard debugging)" >&6; } + fi + fi + # TEA specific: + if test "${TEA_PLATFORM}" != "windows" ; then + LDFLAGS_DEFAULT="${LDFLAGS}" + fi + + + + + if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then + +$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h + + fi + + if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then + if test "$tcl_ok" = "all"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5 +$as_echo "enabled symbols mem debugging" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 +$as_echo "enabled $tcl_ok debugging" >&6; } + fi + fi + + +#-------------------------------------------------------------------- +# Everyone should be linking against the Tcl stub library. If you +# can't for some reason, remove this definition. If you aren't using +# stubs, you also need to modify the SHLIB_LD_LIBS setting below to +# link against the non-stubbed Tcl library. Add Tk too if necessary. +#-------------------------------------------------------------------- + +if test "${USE_STUBS}" = "1" ; then + +$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h + + +$as_echo "#define USE_TK_STUBS 1" >>confdefs.h + +fi + +#-------------------------------------------------------------------- +# This macro generates a line to use when building a library. It +# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, +# and TEA_LOAD_TCLCONFIG macros above. +#-------------------------------------------------------------------- + + + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then + MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)" + MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)" + else + MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" + MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)" + fi + + if test "${SHARED_BUILD}" = "1" ; then + MAKE_LIB="${MAKE_SHARED_LIB} " + else + MAKE_LIB="${MAKE_STATIC_LIB} " + fi + + #-------------------------------------------------------------------- + # Shared libraries and static libraries have different names. + # Use the double eval to make sure any variables in the suffix is + # substituted. (@@@ Might not be necessary anymore) + #-------------------------------------------------------------------- + + if test "${TEA_PLATFORM}" = "windows" ; then + if test "${SHARED_BUILD}" = "1" ; then + # We force the unresolved linking of symbols that are really in + # the private libraries of Tcl and Tk. + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" + if test x"${TK_BIN_DIR}" != x ; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" + fi + eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + else + eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + fi + # Some packages build their own stubs libraries + eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + if test "$GCC" = "yes"; then + PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} + fi + # These aren't needed on Windows (either MSVC or gcc) + RANLIB=: + RANLIB_STUB=: + else + RANLIB_STUB="${RANLIB}" + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" + if test x"${TK_BIN_DIR}" != x ; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" + fi + eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + fi + # Some packages build their own stubs libraries + eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + fi + + # These are escaped so that only CFLAGS is picked up at configure time. + # The other values will be substituted at make time. + CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" + if test "${SHARED_BUILD}" = "1" ; then + CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" + fi + + + + + + + + +if test "${USE_STUBS}" = "0" ; then + SHLIB_LD_LIBS=`echo "$SHLIB_LD_LIBS" | sed -e 's!stub!!g'` +fi + +#-------------------------------------------------------------------- +# Determine the name of the tclsh and/or wish executables in the +# Tcl and Tk build directories or the location they were installed +# into. These paths are used to support running test cases only, +# the Makefile should not be making use of these paths to generate +# a pkgIndex.tcl file or anything else at extension build time. +#-------------------------------------------------------------------- + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 +$as_echo_n "checking for tclsh... " >&6; } + if test -f "${TCL_BIN_DIR}/Makefile" ; then + # tclConfig.sh is in Tcl build directory + if test "${TEA_PLATFORM}" = "windows"; then + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" + else + TCLSH_PROG="${TCL_BIN_DIR}/tclsh" + fi + else + # tclConfig.sh is in install location + if test "${TEA_PLATFORM}" = "windows"; then + TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" + else + TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" + fi + list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ + `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ + `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" + for i in $list ; do + if test -f "$i/${TCLSH_PROG}" ; then + REAL_TCL_BIN_DIR="`cd "$i"; pwd`/" + break + fi + done + TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5 +$as_echo "${TCLSH_PROG}" >&6; } + + +#TEA_PROG_WISH + +#-------------------------------------------------------------------- +# Finally, substitute all of the various values into the Makefile. +# You may alternatively have a special pkgIndex.tcl.in or other files +# which require substituting th AC variables in. Include these here. +#-------------------------------------------------------------------- + +ac_config_files="$ac_config_files Makefile pkgIndex.tcl togl_ws.h" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Togl $as_me 2.1, which was +generated by GNU Autoconf 2.65. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +Togl config.status 2.1 +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2009 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;; + "togl_ws.h") CONFIG_FILES="$CONFIG_FILES togl_ws.h" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/ng/Togl2.1/configure.in b/ng/Togl2.1/configure.in new file mode 100755 index 00000000..836073c4 --- /dev/null +++ b/ng/Togl2.1/configure.in @@ -0,0 +1,281 @@ +#!/bin/bash -norc +dnl This file is an input file used by the GNU "autoconf" program to +dnl generate the file "configure", which is run during Tcl installation +dnl to configure the system for the local environment. +# +# RCS: @(#) $Id: configure.in,v 1.17 2009/03/03 21:49:56 gregcouch Exp $ + +#----------------------------------------------------------------------- +# Sample configure.in for Tcl Extensions. The only places you should +# need to modify this file are marked by the string __CHANGE__ +#----------------------------------------------------------------------- + +#----------------------------------------------------------------------- +# __CHANGE__ +# Set your package name and version numbers here. +# +# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION +# set as provided. These will also be added as -D defs in your Makefile +# so you can encode the package version directly into the source files. +#----------------------------------------------------------------------- + +AC_INIT([Togl], [2.1]) + +#-------------------------------------------------------------------- +# Call TEA_INIT as the first TEA_ macro to set up initial vars. +# This will define a ${TEA_PLATFORM} variable == "unix" or "windows" +# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. +#-------------------------------------------------------------------- + +TEA_INIT([3.7]) + +AC_CONFIG_AUX_DIR(tclconfig) + +#-------------------------------------------------------------------- +# Load the tclConfig.sh file +#-------------------------------------------------------------------- + +TEA_PATH_TCLCONFIG +TEA_LOAD_TCLCONFIG + +#-------------------------------------------------------------------- +# Load the tkConfig.sh file if necessary (Tk extension) +#-------------------------------------------------------------------- + +TEA_PATH_TKCONFIG +TEA_LOAD_TKCONFIG + +#----------------------------------------------------------------------- +# Handle the --prefix=... option by defaulting to what Tcl gave. +# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. +#----------------------------------------------------------------------- + +TEA_PREFIX + +#----------------------------------------------------------------------- +# Standard compiler checks. +# This sets up CC by using the CC env var, or looks for gcc otherwise. +# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create +# the basic setup necessary to compile executables. +#----------------------------------------------------------------------- + +TEA_SETUP_COMPILER + +#----------------------------------------------------------------------- +# __CHANGE__ +# Specify the C source files to compile in TEA_ADD_SOURCES, +# public headers that need to be installed in TEA_ADD_HEADERS, +# stub library C source files to compile in TEA_ADD_STUB_SOURCES, +# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. +# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS +# and PKG_TCL_SOURCES. +#----------------------------------------------------------------------- + +TOGL_ENABLE_STUBS + +TEA_ADD_SOURCES([togl.c toglProcAddr.c toglStubInit.c]) +# togl_ws.h is added in Makefile.in because it is generated +TEA_ADD_HEADERS([togl.h toglDecls.h]) +TEA_ADD_INCLUDES([]) +TEA_ADD_LIBS([]) +TEA_ADD_CFLAGS([]) +if test "${USE_STUBS}" = "1" ; then + TEA_ADD_STUB_SOURCES([toglStubLib.c]) +fi +TEA_ADD_TCL_SOURCES([]) + +#-------------------------------------------------------------------- +# __CHANGE__ +# A few miscellaneous platform-specific items: +# +# Define a special symbol for Windows (BUILD_sample in this case) so +# that we create the export library with the dll. +# +# Windows creates a few extra files that need to be cleaned up. +# You can add more files to clean if your extension creates any extra +# files. +# +# TEA_ADD_* any platform specific compiler/build info here. +#-------------------------------------------------------------------- + +# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure +# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. +#CLEANFILES="pkgIndex.tcl" +if test "${TEA_PLATFORM}" = "windows" ; then + AC_DEFINE(BUILD_togl, 1, [Build windows export dll]) + CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch *.manifest" + #TEA_ADD_SOURCES([win/winFile.c]) + #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) +else + # Ensure no empty else clauses + : + CLEANFILES="so_locations" + #TEA_ADD_SOURCES([unix/unixFile.c]) + #TEA_ADD_LIBS([-lsuperfly]) +fi +AC_SUBST(CLEANFILES) + +#-------------------------------------------------------------------- +# __CHANGE__ +# Choose which headers you need. Extension authors should try very +# hard to only rely on the Tcl public header files. Internal headers +# contain private data structures and are subject to change without +# notice. +# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG +#-------------------------------------------------------------------- + +# find Tcl, Tk, and X11 headers +#TEA_PUBLIC_TCL_HEADERS +TEA_PRIVATE_TCL_HEADERS + +#TEA_PUBLIC_TK_HEADERS +TEA_PRIVATE_TK_HEADERS +TEA_PATH_X + +# find autostereo header, lib, and daemon +AC_ARG_WITH([autostereo], + [AS_HELP_STRING([--with-autostereo], + [directory with autostereo source (for SGI)])], + [with_autostereo=${withval}]) +AC_ARG_WITH([autostereod], + [AS_HELP_STRING([--with-autostereod], + [path to autostereod daemon (for SGI)])], + [with_autostereod=${withval}]) +AC_ARG_VAR([AUTOSTEREOD], [Path to autostereod for SGI IRIX computers]) + +AC_MSG_CHECKING([for autostereo directory]) +if test x"${with_autostereo}" != x ; then + if test -f "${with_autostereo}/lib/autostereo.h" ; then + with_autostereo=`(cd ${with_autostereo}; pwd)` + TEA_ADD_INCLUDES([-I${with_autostereo}/lib]) + TEA_ADD_LIBS([-L${with_autostereo}/lib -lautostereo]) + AC_DEFINE_UNQUOTED(HAVE_AUTOSTEREO, 1, + [Define this if you have the autostereo header]) + else + AC_MSG_ERROR([${with_autostereo} directory doesn't contain lib/autostereo.h]) + fi +fi + +AC_PATH_PROG([AUTOSTEREOD], [autostereod], [], + [`eval \"echo $sbindir\"`:$PATH:/sbin:/usr/sbin]) + + +# Choose OpenGL platform +case "${TEA_WINDOWINGSYSTEM}" in + aqua) + AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_AGL) + TEA_ADD_LIBS([-framework AGL -framework OpenGL -framework ApplicationServices]) + # libGLU is implicit in OpenGL framework + LIBGLU= + ;; + x11) + AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_X11) + AC_ARG_WITH([Xmu], + [AS_HELP_STRING([--with-Xmu], + [use system's shared Xmu library])], + [], + [with_Xmu=no]) + AS_IF([test "x$with_Xmu" != xno], + [AC_CHECK_LIB([Xmu], [XmuLookupStandardColormap], + [TEA_ADD_LIBS([-lXmu]) + AC_DEFINE(USE_SYSTEM_LIBXMU, 1, + [Define to use system Xmu library]) + ], + [with_Xmu=no], + [-lXt -lX11] + )]) + AS_IF([test "x$with_Xmu" = xno], + [TEA_ADD_SOURCES([Xmu/CmapAlloc.c Xmu/CrCmap.c Xmu/DelCmap.c Xmu/LookupCmap.c Xmu/StdCmap.c])]) + TEA_ADD_LIBS([-lGL]) + LIBGLU=-lGLU + TOGL_UNDEF_GET_PROC_ADDRESS + ;; + win32) + AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_WGL) + TEA_ADD_LIBS([opengl32.lib user32.lib gdi32.lib]) + if test "$GCC" = "yes" ; then + LIBGLU=-lglu32 + else + # assume Microsoft compiler + LIBGLU=glu32.lib + fi + ;; + *) + AC_MSG_ERROR([Unsupported windowing system: ${TEA_WINDOWINGSYSTEM}]) + ;; +esac +AC_SUBST(LIBGLU) +AC_SUBST(TEA_WINDOWINGSYSTEM) + +#-------------------------------------------------------------------- +# Check whether --enable-threads or --disable-threads was given. +# This auto-enables if Tcl was compiled threaded. +#-------------------------------------------------------------------- + +TEA_ENABLE_THREADS + +#-------------------------------------------------------------------- +# The statement below defines a collection of symbols related to +# building as a shared library instead of a static library. +#-------------------------------------------------------------------- + +TEA_ENABLE_SHARED + +#-------------------------------------------------------------------- +# This macro figures out what flags to use with the compiler/linker +# when building shared/static debug/optimized objects. This information +# can be taken from the tclConfig.sh file, but this figures it all out. +#-------------------------------------------------------------------- + +TEA_CONFIG_CFLAGS +# should be part of TEA_CONFIG_CFLAGS, but more visible modification here +AC_SUBST(SHLIB_SUFFIX) + +#-------------------------------------------------------------------- +# Set the default compiler switches based on the --enable-symbols option. +#-------------------------------------------------------------------- + +TEA_ENABLE_SYMBOLS + +#-------------------------------------------------------------------- +# Everyone should be linking against the Tcl stub library. If you +# can't for some reason, remove this definition. If you aren't using +# stubs, you also need to modify the SHLIB_LD_LIBS setting below to +# link against the non-stubbed Tcl library. Add Tk too if necessary. +#-------------------------------------------------------------------- + +if test "${USE_STUBS}" = "1" ; then + AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) + AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) +fi + +#-------------------------------------------------------------------- +# This macro generates a line to use when building a library. It +# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, +# and TEA_LOAD_TCLCONFIG macros above. +#-------------------------------------------------------------------- + +TEA_MAKE_LIB + +if test "${USE_STUBS}" = "0" ; then + SHLIB_LD_LIBS=`echo "$SHLIB_LD_LIBS" | sed -e 's!stub!!g'` +fi + +#-------------------------------------------------------------------- +# Determine the name of the tclsh and/or wish executables in the +# Tcl and Tk build directories or the location they were installed +# into. These paths are used to support running test cases only, +# the Makefile should not be making use of these paths to generate +# a pkgIndex.tcl file or anything else at extension build time. +#-------------------------------------------------------------------- + +TEA_PROG_TCLSH +#TEA_PROG_WISH + +#-------------------------------------------------------------------- +# Finally, substitute all of the various values into the Makefile. +# You may alternatively have a special pkgIndex.tcl.in or other files +# which require substituting th AC variables in. Include these here. +#-------------------------------------------------------------------- + +AC_OUTPUT([Makefile pkgIndex.tcl togl_ws.h]) diff --git a/ng/Togl2.1/doc/README.txt b/ng/Togl2.1/doc/README.txt new file mode 100644 index 00000000..07f6577b --- /dev/null +++ b/ng/Togl2.1/doc/README.txt @@ -0,0 +1,2 @@ +This directory contains the documentation of Togl, the Tk OpenGL widget. +The documentation also doubles as the contents of the Togl home page. diff --git a/ng/Togl2.1/doc/capi.html b/ng/Togl2.1/doc/capi.html new file mode 100644 index 00000000..b86c4a42 --- /dev/null +++ b/ng/Togl2.1/doc/capi.html @@ -0,0 +1,652 @@ + + + + + + + + Togl C API + + + + + + +

Togl C API

+ +

Contents

+
    +
  • Compiling and linking C Togl Functions +
  • Setup and Initialization Functions +
      +
    • Togl_Init, + Togl_InitStubs +
    +
  • Drawing-related Commands +
      +
    • Togl_PostRedisplay, + Togl_SwapBuffers, + Togl_MakeCurrent, + Togl_SwapInterval + Togl_CopyContext +
    +
  • Query Functions +
      +
    • Togl_Ident, + Togl_Width, + Togl_Height, + Togl_Interp, + Togl_TkWin, + Togl_GetProcAddr, + Togl_ContextTag + Togl_UpdatePending + Togl_HasRGBA + Togl_IsDoubleBuffered + Togl_HasDepthBuffer + Togl_HasAccumulationBuffer + Togl_HasDestinationAlpha + Togl_HasStencilBuffer + Togl_StereoMode + Togl_HasMultisample +
    +
  • Color Index Mode Functions +
      +
    • Togl_AllocColor, + Togl_FreeColor, + Togl_SetColor +
    +
  • Font Functions +
      +
    • Togl_LoadBitmapFont, + Togl_UnloadBitmapFont, + Togl_WriteObj, + Togl_WriteChars +
    +
  • Client Data Functions +
      +
    • Togl_SetClientData, + Togl_GetClientData +
    +
  • Overlay Functions +
      +
    • Togl_UseLayer, + Togl_ShowOverlay, + Togl_HideOverlay, + Togl_PostOveralyRedisplay, + Togl_ExistsOverlay, + Togl_GetOverlayTransparentValue, + Togl_IsMappedOverlay, + Togl_AllocColorOverlay, + Togl_FreeColorOverlay +
    +
  • Stereo Functions +
      +
    • Togl_Drawbuffer, +
    • Togl_Clear +
    • Togl_Frustum +
    • Togl_Ortho +
    • Togl_NumEyes +
    +
  • Image Functions +
      +
    • Togl_TakePhoto +
    +
  • Conversion Functions +
      +
    • Togl_GetToglFromObj, +
    • Togl_GetToglFromName +
    +
+ +
+ +

Compiling and linking C Togl Functions

+ +

+ All Togl functions are found in the Togl header file. + +

+ + #include "togl.h" + +
+ +

+ For portability, you should include the togl.h header + before any other OpenGL headers + so it will compile on Microsoft Windows. + +

+ Before calling any Togl functions, you need to initialize it. + Regardless if you're using stubs (by defining USE_TOGL_STUBS) + or not, the following code will properly initialize togl: + +

+if (Tcl_InitStubs(interp, "8.1", 0) == NULL
+|| Togl_InitStubs(interp, "2.0", 0) == NULL) {
+    /* fail */
+}
+
+ +

+ If you are using a prebuilt binary distribution, + you should be sure to define USE_TOGL_STUBS beforehand. + +

+ See the source for the demo programs in the Togl source distribution + for working examples. + +

Linking

+ +

+ If you are using a prebuilt binary, + be sure to link against the stub library. + On Microsoft Windows, + link against Toglstub21.lib opengl32.lib user32.lib gdi32.lib, + on Mac OS X, + link against -lToglstub2.1 -framework OpenGL, + on other platforms, + link against -lToglstub2.1 -lGLU -lGL -lm. + +

+ If building your own Togl package, + you can use the stubs interface or link in the Tcl and Tk libraries as well. + If using the stubs interface, link as shown above. + Otherwise: + on Microsoft Windows, + link against Togl21.lib tk84.lib tcl84.lib opengl32.lib user32.lib gdi32.lib, + on Mac OS X, + link against -lTogl2.1 -framework Tk -framework Tcl -framework OpenGL, + on other platforms, + link against -lTogl2.1 -ltk8.4 -ltcl8.4 -lGLU -lGL -lm. + +

Setup and Initialization Functions

+ +
+
int Togl_Init(Tcl_Interp *interp) +
+ Initializes the Togl module. This is typically called from the + Tk_Main() function + or other Tcl package initialization function that is directly linked + to the Togl (shared) library. + It is also indirectly called via + Tcl's package require Togl command. + If successful, the return value is TCL_OK. +
+ +
+
+ const char *Togl_InitStubs(Tcl_Interp *interp, const char *version, int exact) +
+ Loads the Togl package into the given interpreter + and initializes it. + version should be "2.0" or higher. + This is typically called from C/C++ code that accesses Togl's C API + and has installed Togl into the standard TCL hierarchy. + See the Tcl InitStubs(3) or the Tk TkInitStubs(3) manual pages for + more information. +
+ +

Drawing-related Commands

+ +
+
void Togl_PostRedisplay(Togl *togl) +
+ Signals that the widget should be redrawn. When Tk is next idle, + the displaycommand callback will be invoked. +
+ +
+
void Togl_SwapBuffers(const Togl *togl) +
+ Swaps the front and back color buffers for a double-buffered widget. + + glFlush is executed if the window is single-buffered. So this call + works for both single- and double-buffered contexts. This is + typically called in the displaycommand callback function. +
+ +
+
void Togl_MakeCurrent(const Togl *togl) +
+ Sets the current rendering context to the given widget. This is done + automatically before any Togl callback functions is called. So the + call is only needed if you have multiple widgets with separate OpenGL + contexts. If the argument is NULL, then the rendering context is cleared + and subsequent OpenGL commands will fail. +
+ +
+
Bool Togl_SwapInterval(const Togl *togl, int interval) +
+ Returns True if successful. + Attempts to change the maximum refresh rate + by setting the minimum number of cycles between successive swap buffers. + For benchmarking purposes, you should set the swap interval to 0. +
+ +
+
int Togl_CopyContext(const Togl *from, const Togl *to, unsigned int mask) +
+ Copy a subset of the OpenGL context state from from one context + to another using the mask parameter who values are the same as + + glPushAttrib. + The return value is TCL_OK if the context was copied. +
+ +

Query Functions

+ +
+
char *Togl_Ident(const Togl *togl) +
+ Returns a pointer to the identification string associated with a Togl + widget or NULL if there's no identifier string. +
+ +
+
int Togl_Width(const Togl *togl) +
+ Returns the width of the given Togl widget. Typically called in the + reshapecommand callback function. +
+ +
+
int Togl_Height(const Togl *togl) +
+ Returns the height of the given Togl widget. Typically called in the + reshapecommand callback function. +
+ +
+
Tcl_Interp *Togl_Interp(const Togl *togl) +
+ Returns the Tcl interpreter associated with the given Togl widget. +
+
+
+ Tk_Window Togl_TkWin(const Togl *togl) +
+ Returns the Tk window associated with the given Togl widget. +
+ +
+
Togl_FuncPtr Togl_GetProcAddr(const char *funcname) +
+ Platform-independent way to get OpenGL function pointers from a + function name. + Note that in Microsoft Windows (WGL) versions that + "the extension function addresses are unique for each pixel format. + All rendering contexts of a given pixel format + share the same extension function addresses." + And on *nix (GLX/X11) platforms, + "the function pointers returned are context independent" + (Linux ABI documentation). + The Mac OS X (AGL) platform acts like a *nix platform. +
+ +
+
int Togl_ContextTag(const Togl *t) +
+ Returns an integer that represents the context tag. + All Togl widgets with the same context tag share display lists. +
+ +
+
Bool Togl_UpdatePending(const Togl *t) +
+ Returns True if the window should be redrawn. See Togl_PostRedisplay. +
+ +
+
Bool Togl_HasRGBA(const Togl *t) +
+ Return True if Togl widget has a RBGA color buffer. + False means that the widget is using a color index buffer. +
+ +
+
Bool Togl_IsDoubleBuffered(const Togl *t) +
+ Return True if Togl widget is double buffered. +
+ +
+
Bool Togl_HasDepthBuffer(const Togl *t) +
+ Return True if Togl widget is has a depth buffer. +
+ +
+
Bool Togl_HasAccumulationBuffer(const Togl *t) +
+ Return True if Togl widget has an accumulation buffer. +
+ +
+
Bool Togl_HasDestinationAlpha(const Togl *t) +
+ Return True if Togl widget has a destination alpha buffer. +
+ +
+
Bool Togl_HasStencilBuffer(const Togl *t) +
+ Return True if Togl widget has a stencil buffer. +
+ +
+
int Togl_StereoMode(const Togl *t) +
+ Return current stereo mode. See ?? +
+ +
+
Bool Togl_HasMultisample(const Togl *t) +
+ Return True if Togl widget has a multisample buffer. +
+ +

Color Index Mode Functions

+ +

+ These functions are only used for color index mode. + +

+
unsigned long Togl_AllocColor(Togl *togl, float red, float green, float blue) +
+ Allocate a color from a read-only colormap. Given a color specified + by red, green, and blue return a colormap index (aka pixel value) + whose entry most closely matches the red, green, blue color. Red, + green, and blue are values in [0,1]. This function is only used in + color index mode when the -privatecmap option is false. +
+ +
+
void Togl_FreeColor(Togl *togl, unsigned long index) +
+ Free a color in a read-only colormap. Index is a value which was + returned by the Togl_AllocColor() function. This function is only + used in color index mode when the -privatecmap option + is false. +
+ +
+
void Togl_SetColor(Togl *togl, + int index, float red, float green, float blue) +
+ Load the colormap entry specified by index with the given red, green + and blue values. Red, green, and blue are values in [0,1]. This + function is only used in color index mode when the + -privatecmap option is true. +
+ + +

Font Functions

+ +

+ These functions provide an interface to the simple bitmap font capabilities + that every OpenGL implementation provides. + Better font support is found in other C APIs, e.g., + QuesoGLC + or FTGL. + +

+
Tcl_Obj *Togl_LoadBitmapFont(Togl *togl, + const char *fontname) +
+ Load the named font as a set of + + glBitmap display lists. + fontname may be any of the font description styles + accepted by the Tk font command. + For maximum portability, one of the standard Tk fonts, + Courier, Times, and Helvetica, should be used. + Unicode fonts are treated as if they have only have an 8-bit index + (so poorly). + If successful, a Togl BitmapFont object is returned. + NULL is returned on failure. +
+ +
+
int Togl_UnloadBitmapFont(Togl *togl, Tcl_Obj *toglfont) + +
+ Destroys the bitmap display lists created by by Togl_LoadBitmapFont(). + If successful, the return value is TCL_OK. +
+ +
+
int Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *string, int length) + + Draw the given string. + If the given length is zero, then it is computed using strlen. + Returns the length of the drawn string. +
+
+ +
+
int Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj) + +
+ Tcl_Obj interface to Tcl_WriteChars. +
+ +

Client Data Functions

+ +

+ Each Togl structure has a pointer to an arbitrary client data structure. + +

+
void Togl_SetClientData(Togl *togl, ClientData clientData) +
+ Set the Togl widget's client data pointer to clientData. +
+ +
+
ClientData Togl_GetClientData(const Togl *togl) +
+ Return the Togl widget's client data pointer. +
+ + +

Overlay Functions

+ +

+ These functions are modeled after GLUT's overlay sub-API. + +

+
void Togl_UseLayer(Togl *togl, int layer) +
+ Select the layer into which subsequent OpenGL rendering will be + directed. layer may be either TOGL_OVERLAY or + TOGL_NORMAL. +
+ +
+
void Togl_ShowOverlay(Togl *togl) +
+ Display the overlay planes, if any. +
+ +
+
void Togl_HideOverlay(Togl *togl) +
+ Hide the overlay planes, if any. +
+ +
+
void Togl_PostOverlayRedisplay(Togl *togl) +
+ Signal that the overlay planes should be redraw. + When Tk is next idle, + the overlaydisplaycommand callback will be invoked. +
+ +
+
int Togl_ExistsOverlay(Togl *togl) +
+ Returns 1 if overlay planes exist, 0 otherwise. +
+ +
+
int Togl_GetOverlayTransparentValue(const Togl *togl) +
+ Returns the color index of the overlay's transparent pixel value. +
+ +
+
int Togl_IsMappedOverlay(const Togl *togl) +
+ Returns 1 if the overlay planes are currently displayed, 0 otherwise. +
+ +
+
unsigned long Togl_AllocColorOverlay(const Togl *togl, + float red, float green, float blue) +
+ Allocate a color in the overlay planes. Red, green, and blue are + values in [0,1]. Return the color index or -1 if the allocation + fails. +
+ +
+
void Togl_FreeColorOverlay(const Togl *togl, unsigned long index) +
+ Free a color which was allocated with Togl_AllocColorOverlay(). +
+ +

Stereo Functions

+ +

+ Togl abstracts part of the stereo drawing process to seamlessly + support quad-buffered stereo as well as various alternative stereo + formats. The stereo viewing parameters, eyeseparation + and convergence need to be set with the Togl's + stereo options. + +

+
void Togl_DrawBuffer(Togl *togl, GLenum mode) +
+ Switch to OpenGL draw buffer. + Should be one of GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT_LEFT, or + GL_FRONT_RIGHT. + It is not possible to draw in the left and right buffers at the same + time in the alternate stereo modes. +
+ +
+
void Togl_Clear(const Togl *togl, GLbitfield mask) +
+ Replacement for OpenGL's + + glClear that takes into account the alternate stereo mode. +
+ +
+
void Togl_Frustum(const Togl *togl, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far) +
+ Replacement for OpenGL's + + glFrustum that takes into account the alternate stereo mode. +
+ +
+
void Togl_Ortho(const Togl *togl, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far) +
+ Replacement for OpenGL's + + glOrtho that takes into account the alternate stereo mode. +
+ +
+
int Togl_NumEyes(const Togl *togl) +
+
+ +

Stereo Example

+ +

+ This code works for quad-buffered stereo, + as well as the other stereo modes. + +

+if (Togl_NumEyes(togl) == 1) {
+    Togl_DrawBuffer(togl, GL_BACK);
+    Togl_Clear(togl);
+    glMatrixMode(GL_PROJECTION);
+    glLoadIdentity();
+    Togl_Frustum(togl, left, right, bottom, top, near, far);
+    glMatrixMode(GL_MODELVIEW);
+    draw image
+} else {
+    Togl_DrawBuffer(togl, GL_BACK_LEFT);
+    Togl_Clear(togl);
+    glMatrixMode(GL_PROJECTION);
+    glLoadIdentity();
+    Togl_Frustum(togl, left, right, bottom, top, near, far);
+    glMatrixMode(GL_MODELVIEW);
+    draw left-eye image
+    Togl_DrawBuffer(togl, GL_BACK_RIGHT);
+    Togl_Clear(togl);
+    glMatrixMode(GL_PROJECTION);
+    glLoadIdentity();
+    Togl_Frustum(togl, left, right, bottom, top, near, far);
+    glMatrixMode(GL_MODELVIEW);
+    draw right-eye image
+}
+Togl_SwapBuffers(togl);
+
+ +

Image Functions

+ +

+ + +

+
int Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo) +
+ Take a photo image of the current Togl window and place it in the + given photo object. + If the window is partially obscured, + either by other windows or by the edges of the display, + the results are undefined in the obscured region. + If successful, the return value is TCL_OK. +
+ +

Conversion Functions

+ +

+ These functions aid the programmer when writing Togl callback functions. + +

+
int Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr) +
+ Attempt to return a Togl structure "toglPtr" from the Tcl object "obj". + If successful, the return value is TCL_OK. +
+ +
+
int Togl_GetToglFromName(Tcl_Interp *interp, const char *cmdName, Togl **toglPtr) +
+ Attempt to return a Togl structure "toglPtr" from the Tcl command name "cmdName". + If successful, the return value is TCL_OK. +
+ +
+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/doc/download.html b/ng/Togl2.1/doc/download.html new file mode 100644 index 00000000..72b7c7b2 --- /dev/null +++ b/ng/Togl2.1/doc/download.html @@ -0,0 +1,340 @@ + + + + + + + + Downloading and Installing Togl + + + + + + +

Downloading and Installing Togl

+ +

Contents

+ + +
+ +

Prerequisites

+ +

+ You should have + Tcl and Tk + installed on your computer. + Togl works with Tcl/Tk version 8.1 and up + (all recent testing has been with version 8.4). + The Mac OS X version requires version 8.4 + (note: versions 8.4.12 and 8.4.13 have a bug when unmapping Togl widgets). + +

+ You must also have + OpenGL or + Mesa + (a free alternative to OpenGL with the same API) + installed on your computer. + +

+ And one should be familiar with Tcl, Tk, OpenGL, + and C programming to use Togl effectively. + +
+

Downloading Togl

+ +

+ Togl can be downloaded from the + + SourceForge Files page. + +

+ Several prebuilt binary distributions are available + as well as a source distribution. + +

Installing Togl

+ +

Installing prebuild binaries

+ +

+ Prebuilt binaries provide a Togl2.1 directory, + the togl.h, togl_ws.h and toglDecls.h include files, + and the togl stub library + (libToglstub2.1.a or Toglstub20.lib, etc). + The Togl2.1 directory needs to copied + into one of the directories on Tcl's package path + (type puts $auto_path in the Tcl interpreter to see + the list of directories). + If you have C code that needs to access Togl's subroutines directly, + place the include file in the same place as Tcl's include file and + the stub library in the same place as Tcl's stub library. + +

Installing from source

+ +

+ Togl uses the Tcl Extension Architecture to be able to build on the + same platforms Tcl can be built on. + In addition to the Togl source, + you will need to have the Tcl and Tk source distributions + because not all installations have the needed Tcl and Tk internal header files. + +

+ How you link with Togl depends on how you're planning to use it. + There are basically three ways of using Togl with your application: +

    +
  • + Install the Togl shared library and pkgIndex.tcl file + (using make install) + and link to the Togl stubs library with your executable or shared library. + In this case you must call Togl_InitStubs() (and probably Tcl_InitStubs() + — Tk_InitStubs is only needed if you call Tk functions). + This is the way the included Togl examples are built. + +
  • + Link to the Togl shared library + or "compile in" the Togl object files + with your executable or shared library. + In this case you must call Togl_Init() from your C code + to initialize Togl. + +
  • + Install the Togl shared library and pkgIndex.tcl file + (using make install) + and then load it using Tcl commands or Tcl_PkgRequire(). + Then use Tcl commands to create and manipulate the Togl widget. +
+ + Since Togl is compiled into a shared library using the Tcl/Tk stubs-interface, + the same binary can be used with any version of Tck/Tk from 8.1 and up. + See README.stubs for more info. + +

+ Specific platform notes follow: + +

Unix/X11 usage

+ +

+ Unix/X systems only need the public Tcl/Tk include files. + Just configure, make, + and optionally make install. + +

Microsoft Windows usage

+ +

+ Microsoft Windows platforms need tkWinInt.h + and other internal Tk header files. So you need a Tcl/Tk + source distribution in addition to the Togl distribution + (or copy over the various include files). +

+ Here's the minimal way to build Togl with Tcl/Tk + using the gcc that is distributed + as part of the cygwin tools + (Microsoft's compilers work too): +


+VER=8.4.12
+SRCDIR=`pwd`
+
+cd $SRCDIR/tcl$VER/win
+env 'CC=gcc -mno-cygwin' ./configure --enable-threads
+make libtclstub84.a
+
+cd $SRCDIR/tk$VER/win
+env 'CC=gcc -mno-cygwin' ./configure --enable-threads
+make libtkstub84.a
+
+cd $SRCDIR/Togl2.1
+env 'CC=gcc -mno-cygwin' ./configure --with-tcl=../tcl$VER/win --with-tk=../tk$VER/win
+
+make
+
+ The resulting Togl21.dll and pkgIndex.tcl + should be installed into your Tcl installation just like any other package. + +

+ If you change all of the above make's + to make install instead, + then the Togl package is installed correctly. + +

Mac OS X usage

+ +

+ These special instructions are for building the Aqua version of Togl. + Mac OS X needs tkMacOSXInt.h + and other internal Tk header files. + Unfortunately, the Tcl and Tk frameworks that Apple distributes + are missing the internal headers. + So you need a Tcl/Tk source distribution in addition to the Togl + distribution (or copy over the various include files). + You would probably want a newer version of Tcl and Tk anyway + because each minor revision of 8.4 has many Aqua bug fixes. +

+ Here's one way to build Tcl, Tk, and Togl on Mac OS X + (assuming they are all in the same directory) + to install in your home directory: +


+VER=8.4.12
+
+mkdir -p ~/bin
+make -C tcl$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks"
+make -C tk$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks" APPLICATION_INSTALL_PATH="${HOME}/Applications"
+
+cd Togl2.1
+./configure --prefix="${HOME}"
+make install
+
+ +
+

Version History

+ +

Version 1.0 — March, 1996

+
    +
  • Initial version +
+ +

Version 1.1 (never officially released)

+
    +
  • Added Togl_LoadBitmapFont function +
  • Fixed a few bugs +
+ +

Version 1.2 — November, 1996

+
    +
  • added swapbuffers and makecurrent Tcl commands +
  • more bug fixes +
  • upgraded to suport Tcl 7.6 and Tk 4.2 +
  • added stereo and overlay plane support +
  • added Togl_Get/SetClientData() functions +
  • added Togl_DestroyFunc() +
+ +

Version 1.3 — May 2, 1997

+
    +
  • fixed a bug in Togl_Configure() +
  • fixed a compilation problem in using Tcl_PkgProvide() with Tcl < 7.4 +
  • new overlay functions: Togl_ExistsOverlay, Togl_GetOverlayTransparentValue, + Togl_IsMappedOverlay, Togl_AllocColorOverlay, Togl_FreeColorOverlay +
  • added X11 functions: Togl_Display, Togl_Screen, Togl_ScreenNumber, + Togl_Colormap +
  • added Togl_DumpToEpsFile function +
  • fixed a C++ compilation problem +
  • more robust overlay code +
  • added timers (Togl_TimerFunc) from Peter Dern and Elmar Gerwalin +
+ +

Version 1.4 — September 17, 1997

+
    +
  • ported to Microsoft Windows NT (Robert Casto) +
  • updated for Tcl/Tk 8.0 +
  • added many config flags (-redsize, -depthsize, etc) (Matthias Ott) +
  • added Togl_Set*Func() functions to reassign callback functions (Matthias Ott) +
  • added Togl_ResetDefaultCallbacks() and Togl_ClientData() functions (Greg Couch) +
+ +

Version 1.5 — September 18, 1998

+
    +
  • fixed a few Unix and Microsoft Windows compilation bugs +
  • added Ben Evan's SGI stereo functions +
  • multiple expose events now reduced to one redraw +
  • destroying Togl widgets caused problems, patched by Adrian J. Chung +
  • added Togl_TkWin() function +
  • updated for Tcl/Tk 8.0p2 +
  • added gears demo from Philip Quaife +
  • added -sharelist and -sharecontext config flags +
  • fixed a few overlay update bugs +
  • added -indirect config flag +
+ +

Version 1.6 — May 7, 2003

+
    +
  • added Togl_SetTimerFunc function +
  • updated for Tcl/Tk 8.0.5 and 8.1 +
  • context sharing added for Microsoft Windows +
  • Macintosh support (by Paul Thiessen) +
  • Tcl/Tk stubs support — see README.tcl (by Jonas Beskow) +
+ +

Version 1.7 — January 6, 2006

+
    +
  • added Mac OS X support +
  • enabled asking for quad-buffered stereo pixel formats on all platforms + (use -oldstereo on SGIs for splitscreen stereo — C API changed too) +
  • configuring the cursor is no longer slow +
  • added -pixelformat config flag +
  • added setgrid support (unfortunately many window managers can't cope with 1x1 pixel grid) +
  • only free context when last reference is gone +
  • switched to TEA-based configure (instead of editting make files) +
+ +

Version 2.0 — April 22, 2008

+
    +
  • stubified C API +
  • replaced EPS support with TK photo image support +
  • simplified C API by requiring callback command options +
  • Added command arguments for create, destroy, etc. callbacks, + so there is a -createcommand option to the togl command (etc.). + (and removed Togl_*Func from the C API) +
  • added togl instance commands that call C API — + see documentation +
  • use Tcl objects internally +
  • use Tcl object interface for callbacks +
  • vertical sync control +
  • fix thread safety in anticipation that OpenGL drivers may someday be thread safe +
  • added simple stereo rendering interface +
  • revised font C API +
  • updated font support for Tk 8.4 on all platforms +
  • updated documentation +
  • prebuilt binaries +
+ +

Version 2.1 — December 2009

+
    +
  • incorporate the part of the X11R6 Xmu library that Togl uses + so it will work on (Linux) systems that don't have the Xmu shared library +
  • Mac OS X Aqua delete context bug fix +
  • multisampling support +
  • pbuffer support (Unix/X11, Microsoft Windows, Mac OS X) +
  • Ability to copy context state +
  • row interleaved stereo support +
+ +
+

Future plans

+ Patches for the following are especially welcome: +
    +
  • Tk 8.5 fonts +
  • Aqua Cocoa support (Tk 8.6b2) +
  • OpenGL 3 contexts +
  • EGL support +
  • RGB overlays +
  • Tcl access to colormap manipulation +
  • NVidia consumer stereo support +
+ +
+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/doc/faq.html b/ng/Togl2.1/doc/faq.html new file mode 100644 index 00000000..81018051 --- /dev/null +++ b/ng/Togl2.1/doc/faq.html @@ -0,0 +1,112 @@ + + + + + + + + Togl Frequently Asked Questions + + + + + + +

Togl Frequently Asked Questions

+ +

Contents

+ +

Frequently Asked Questions (and Problems)

+ +
+ +

+ If you have something to add to this section please let us know. + +

+
+ Bad Match X errors on Sun systems +
+ There is(was?) a bug in Sun's XmuLookupStandardColormap + X library function. + If you compile togl.c with the SOLARIS_BUG symbol defined (-DSOLARIS_BUG) + this function call will be omitted. + +

+

+ Is stereo rendering supported? +
+ Several different stereo modes are supported. + +

+

+ Is fullscreen stereo rendering supported? +
+ Before Tk 8.5, + Tk does not support true fullscreen windows. + Consequenly the full-screen stereo, + that gaming graphics cards support (ATI Radeon, NVidia GeForce), + won't be added until sometime after Tk 8.5 is available. + Fullscreen stereo on workstation graphics cards + (ATI FireGL, NVidia Quadro, Matrix Parhelia, 3Dlabs Wildcat) + does work. +

+

+ How do I get the Microsoft Windows device context? +
+ First call Togl_MakeCurrent to make sure you have the + right OpenGL context and device context set, + then call wglGetCurrentDC. + +

+

+ How do I use Togl from Python? +
+ The Togl source distribution comes with a Togl.py file + that provides a Tkinter-style Togl widget. + And for Togl callbacks that are C functions, + there is a toglpy.h file that provides a function + that converts a Python object into its corresponding Togl widget: +
+ Togl *getToglFromWidget(PyObject *widget) +
+ +

+

+ Is Togl compatible with Tile and Tk 8.5? +
+ Yes, Togl works as is (except for the bitmap font support for X11 and Aqua). + From Joe English: +
+ Complex "owner-draw" widgets like tkZinc, + or the text and canvas widgets, + really don't benefit much from themability, + so there's no reason to rewrite them. + (http://wiki.tcl.tk/13373) +
+
+ +
+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/doc/header.js b/ng/Togl2.1/doc/header.js new file mode 100644 index 00000000..5e87cd50 --- /dev/null +++ b/ng/Togl2.1/doc/header.js @@ -0,0 +1,20 @@ +function displayHeader(pageTitle) +{ + document.write("

" + pageTitle + "

"); +} + +function NavigationBar() +{ + document.write(""); + document.write(" "); + document.write(" "); + document.write(" "); + document.write(" "); + document.write(" "); + document.write(" "); + document.write(" "); + document.write(" "); + document.write(" "); + document.write("
IndexIntroDownload/InstallUsing ToglTcl APIC APIFAQ
"); + document.write("
"); +} diff --git a/ng/Togl2.1/doc/index.html b/ng/Togl2.1/doc/index.html new file mode 100644 index 00000000..222099e9 --- /dev/null +++ b/ng/Togl2.1/doc/index.html @@ -0,0 +1,150 @@ + + + + + + + + Togl, a Tk OpenGL widget + + + + + +

Togl — a Tk OpenGL widget

+

Copyright © 1996-2009 Brian Paul, Ben Bederson, and Greg Couch

+ +

Index

+ + + +
+ +

Introduction

+ + Togl is a Tk widget for + OpenGL rendering. + Togl was originally based on OGLTK, written by Benjamin Bederson at + the University of New Mexico. + + Togl's main features are: + +
    +
  • unifies Microsoft Windows, X11 (Linux/IRIX/...), and Mac OS X Aqua support +
  • support for requesting stencil, accumulation, alpha buffers, etc. +
  • multiple OpenGL drawing windows +
  • simple stereo rendering support +
  • simple, portable font support +
  • color-index mode support including color allocation functions +
  • overlay plane support +
  • OpenGL extension testing from Tcl +
  • Tcl Extension Architecture (TEA) 3 compliant +
+ +

+ Togl does almost no OpenGL drawing itself, + instead it manages OpenGL drawing by calling various Tcl commands + (a.k.a., callback functions). + Those commands can be C functions that call OpenGL (in)directly + or another Tcl package + (e.g., Tcl3D). + +

+ Togl is copyrighted by + Brian Paul + (brian_e_paulATyahooDOTcom), + Benjamin Bederson + (bedersonATcsDOTumdDOTedu), and + Greg Couch + (gregcouchATusersDOTsourceforgeDOTnet). + See the LICENSE file for details. + +

+ The + Togl project and + home page are + hosted by SourceForge. + +
+

Mailing list

+ +

+ See the + Togl project at SourceForge for mailing list information. + +
+

Reporting Bugs

+ +

+ There is a bug database on the + Togl Project Page. + You may also discuss bugs on the mailing list. +

+ It may be worth upgrading your graphics driver and retesting + before reporting a bug, + as, historically, + many Togl "bugs" have been fixed by a graphics driver upgrade, + especially on Microsoft Windows. +

+ When reporting bugs please provide as much information as possible. + Such as the version of Togl, which operating system + (e,g., Microsoft Windows, Red Hat Linux, Mac OS X, etc.), + the version of the operating system, + and the version of the graphics driver. + Also, it's very helpful to us if you can provide an example program + which demonstrates the problem. + +
+

Contributors

+ +

+ Several people have contributed new features to Togl. Among them are: + +

    +
  • Ramon Ramsan — overlay plane support +
  • Miguel A. De Riera Pasenau — more overlay functions, X11 functions + and EPS output +
  • Peter Dern and Elmar Gerwalin — Togl_TimerFunc and related code +
  • Robert Casto — Microsoft Windows NT port +
  • Geza Groma — Microsoft Windows 95/NT patches +
  • Ben Evans — SGI stereo support +
  • Paul Thiessen — Macintosh support +
  • Jonas Beskow — Tcl/Tk stubs support +
  • Paul Kienzle — TEA debugging and patches +
  • Greg Couch — version 1.7, 2.0, 2.1 +
+ + Many others have contributed bug fixes. Thanks for your contributions! + +
+
+ Last edited on 4 February 2009 by Greg Couch. + +
+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/doc/stereo.html b/ng/Togl2.1/doc/stereo.html new file mode 100644 index 00000000..72d4ec8d --- /dev/null +++ b/ng/Togl2.1/doc/stereo.html @@ -0,0 +1,171 @@ + + + + + + + + Togl Stereo Modes + + + + + + +

Togl Stereo Modes

+ +

Contents

+ + +
+ +

+ There are lots of stereo modes in Togl because there are many ways to + draw stereo with different tradeoffs. + All of the stereo modes are choosen with the + + -stereo configuration option. + All of the non-native stereo techniques + are software-only and can be changed at anytime. +

+ When using a non-native stereo mode, the OpenGL + glDrawBuffer, glClear, + glFrustum, and glOrtho calls + should be replaced with the Togl + Tcl or + C versions + for seemless stereo rendering. +

+ The various stereo modes are: +

+
+ none or "" or any false boolean value +
+ Turn off stereo. +
native or any true boolean value +
+ Use native OpenGL hardware accelerated stereo + (single- or double-buffered for both the left and the right eyes). + Each eye is drawn at full window resolution + which gives the best stereo image. + This mode requires support from the graphics driver and is + typically only supported on workstation-class graphics cards, e.g., + NVidia Quadro, + ATI FireGL, + Matrix Parhelia, + 3DLabs Wildcat + graphics cards + and SGI workstations. + The video refresh rate is changed automatically by the windowing system + except on SGI workstations. + Developers for SGI workstations can either switch the video manually with + /usr/gfx/setmon or /usr/bin/X11/xsetmon, or use the + + autostereo package. +

+ Currently, there is a limitation that a togl widget can not be + reconfigured in or out of the native stereo mode. + And if/when it is supported, + some graphics drivers might not allow it. +

+ anaglyph +
+ Draw the left eye in the red part of the color buffer + and the right eye in the blue and green parts. + Designed to be viewed with inexpensive red-blue or red-cyan glasses. + Works best with gray scale and non-saturated color images. +
+ cross-eye +
+ Draw right eye image on the left half of screen, + and draw left eye image on the right half of screen. + So each eye is drawn at less than half of the window resolution. +
+ wall-eye +
+ Draw left eye image on the left half of the screen, + and draw right eye image on the right half of the screen. + So each eye is drawn at less than half of the window resolution. +
+ dti +
+ Designed for DTI displays. + If you look at the window unassisted, + you'll see horizonally squished images + with the left eye image on the left, + and right eye image on the right. + So each eye is drawn at half of the window resolution. +
+ row interleaved +
+ Designed for + VRex, + Zalman, and + Hyundai displays. + Where the right eye is on the even scanlines + and the left is on the odd ones. + Requires that there be a stencil buffer + and uses the most significant stencil bit. + Changes to the stencil state should be placed within + + glPushAttrib(GL_STENCIL_BUFFER_BIT) and glPopAttrib() calls. +
+ left eye +
+ Only draw left eye view at full resolution. +
+ right eye +
+ Only draw right eye view at full resolution. +
+ sgioldstyle +
+ Support older-style SGI stereo where you lose half of the vertical resolution. + This uses the SGIStereo X extension, + that is only available on SGI workstations, + to tell the X server to duplicate non-stereo windows into both eyes. + This option only works when the monitor has been changed to the one + of the str_top, str_bot, or str_rect video output modes. + +
+ +
+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/doc/tclapi.html b/ng/Togl2.1/doc/tclapi.html new file mode 100644 index 00000000..6d6c9a97 --- /dev/null +++ b/ng/Togl2.1/doc/tclapi.html @@ -0,0 +1,774 @@ + + + + + + + + Togl Tcl API + + + + + + +

Togl Tcl API

+ +

Contents

+ + +
+ +

Togl Tcl command

+ +

+ The togl command creates a new Tk widget, a Tcl command, + whose name is pathName. + This command may be used to invoke various operations on the widget. +

+ togl pathName [options] +
+ If no options are given, a 400 by 400 pixel RGB window is created. + This command may be used to invoke various operations on the widget. + +

Togl widget commands

+ + The following commands are possible for an existing togl widget: + +

Configuration commands

+ +
+
pathName cget -option +
+ Return current value of given configuration option. +
+ +
+
+ pathName configure
+ pathName configure -option +
+ If no option is given, + then return information about + all configuration options. + Otherwise, + return configuration information for given option. + All configuration information consists of five values: + the configuration option name, + the option database name, + the option database class, + the default value, + and the current value. +
+ +
+
pathName configure -option value +
+ Reconfigure a Togl widget. + option may be any one of the options listed below. +
+ +
+
pathName contexttag +
+ Returns an integer that represents the context tag. + All Togl widgets with the same context tag share display lists. +
+ +

Extensions command

+ +
+
pathName extensions +
+ Returns a list of OpenGL extensions available. For example: +

+if {[lsearch [pathName extensions] GL_EXT_bgra] != -1]} {
+    ....
+}
+
+ would check if the GL_EXT_bgra extension were supported. +
+ +

Rendering commands

+ +
+
pathName postredisplay +
+ Cause the displaycommand callback to be called + the next time the event loop is idle. +
+ +
+
pathName render +
+ Causes the displaycommand callback to be called for pathName. +
+ +
+
pathName swapbuffers +
+ Causes front/back buffers to be swapped if in double buffer mode. + And flushs the OpenGL command buffer if in single buffer mode. + (So this is appropriate to call after every frame is drawn.) +
+ +
+
pathName makecurrent +
+ Make the widget specified by pathName and its OpenGL context + the current ones. + This is implicitly called before any callback command is invoked. +
+ +
+
pathName copycontextto toPathName mask +
+ Copy a subset of the OpenGL context state from pathName to + toPathName according the given mask. + The mask is an integer corresponding to the same values as + + glPushAttrib. +
+ +

Image commands

+ +
+
pathName takephoto imagename +
+ Copy the contents of the togl window into the given Tk photo image. + Transparency values are copied and should be fully opaque for windows + without alpha bitplanes. +
+ +

Font commands

+ +

+ These functions provide an interface to the simple bitmap font capabilities + that every OpenGL implementation provides. + Better font support is found in other packages, e.g., + Tcl3D + or with different C APIs. + +

+
pathName loadbitmapfont font +
+ font can be any of font descriptions listed in the Tk + font command. + It returns a togl font object. +
+ +
+
pathName unloadbitmapfont toglfont +
+ Releases the OpenGL resources needed by the toglfont. +
+ +
+
pathName write toglfont [-pos xyzw] [-color rgba] string +
+ Write the given string in the given toglfont, + optionally at a particular position, xyzw + and color, rgba. + xyzw is either a 2, 3, or 4 element list of numbers. + rgba is either a 3 or 4 element list of numbers. +
+ +

Overlay Commands

+ +
+
pathName uselayer layer +
+ This is a variation on the makecurrent command + that makes the overlay OpenGL context current + if layer is 2 + and makes the normal OpenGL context current + if layer is 1. +
+ +
+
pathName showoverlay +
+ Turn on drawing in the overlay planes. +
+ +
+
pathName hideoverlay +
+ Turn off drawing in the overlay planes. +
+ +
+
pathName postredisplayoverlay +
+ Cause the overlay OpenGL context to be redrawn the next time + the Tcl event loop is idle. +
+ +
+
pathName renderoverlay +
+ Causes the overlaydisplaycommand callback to be called for pathName. +
+ +
+
pathName existsoverlay +
+ Return true if togl widget has overlay planes. +
+ +
+
pathName ismappedoverlay +
+ Return true if overlay planes are shown. +
+ +
+
pathName getoverlaytransparentvalue +
+ Return overlay plane's transparent pixel value. +
+ +

OpenGL (Stereo) Commands

+ These commands exist to support stereo rendering. + Just replace select OpenGL calls with the Togl versions + and stereo rendering will magically work. And don't forget + to update the stereo options. + +
+
pathName drawbuffer mode +
+ Replaces calls to + + glDrawBuffer. + The mode is an integer. +
+ +
+
pathName clear mask +
+ Replaces calls to + + glClear. + The mask is an integer. +
+ +
+
pathName frustum left right bottom top near far +
+ Replaces calls to + + glFrustum. +
+ +
+
pathName ortho left right bottom top near far +
+ Replaces calls to + + glOrtho. +
+ +
+
pathName numeyes +
+ Returns numbers of eyes — basically, + 2 for stereo views and 1 for all others, + except some stereo views only need one eye from OpenGL. +
+ +

Togl configuration options

+ + Togl's configuration options can be separated into several categories: + geometry, pixel format, and other. + The pixel format related options can only be set at widget creation time. + The other options can be changed dynamically + by the pathName configure command (see above). + +

Drawing callbacks

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDefaultComments
-createcommand{} + Can be abbreviated -create. +
-displaycommand{} + Can be abbreviated -display. +
-reshapecommand{} + Can be abbreviated -reshape. +
-destroycommand{} + Can be abbreviated -destroy. +
-overlaydisplaycommand{} + Can be abbreviated -overlaydisplay. +
+ +

Geometry Options

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDefaultComments
-width400 + Set width of widget in pixels. + It may have any of the forms accepted by Tk_GetPixels. +
-height400 + Set height of widget in pixels. + It may have any of the forms accepted by Tk_GetPixels(3). +
-setgrid0 + Turn on gridded geometry management for togl widget's toplevel + window and specify the geometry of the grid. + See the manual pages for Tk's wm(n) and Tk_SetGrid(3) + for more information. + Unlike the text widget, + the same value is used for both width and height increments. +
+ +

Timer Options

+ + + + + + + + + + + + + + + + + + + + + +
OptionDefaultComments
-time1 + Specifies the interval, in milliseconds, for + calling the timer callback function which + was registered with -timercommand.
-timercommand{} + Can be abbreviated -timer. +
+ +

Stereo Options

+ + + + + + + + + + + + + + + + + + + + + + +
OptionDefaultComments
-eyeseparation2.0 + Set the distance between the eyes in viewing coordinates. +
-convergence30.0 + Set the distance to the screen from the eye in viewing coordinates + (the distance at which the eyes converge). +
+ +
+ You'd think these values would be given in physical units, + but there's no single right way to convert to viewing coordinates + from physical units. + So if you're willing to use Tk's idea of the horizontal size of a + window in millimeters (not always correct), + you could convert the average eye separation of 63 mm + to your viewing coordinates, and use that value as the eye separation. +
+ +

Miscellaneous Options

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDefaultComments
-cursor"" + Set the cursor in the widget window. +
-swapinterval1 + Set the minimum swap interval measure in video frame periods. + The default is 1 for for non-tearing artifacts + when swapping buffers. + Use a value of 0 when benchmarking frame rates. +
-ident"" + A user identification string. This is used match widgets + for the -sharecontext + and the -sharelist options (see below). + This is also useful in your callback functions + to determine which Togl widget is the caller. +
+ +

Pixel Format Options

+ + The following options can only be given when the togl widget is created + — that is, unlike other options, + the togl widget can not be reconfigured with different values + for the following options after it is created. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDefaultComments
-rgbatrueIf true, use RGB(A) mode, otherwise use Color Index mode.
-redsize1Minimum number of bits in red component.
-greensize1Minimum number of bits in green component.
-bluesize1Minimum number of bits in blue component.
-alpha1 + If true and -rgba is true, request an alpha channel. +
-alphasize1Minimum number of bits in alpha component.
 
-doublefalse + If true, request a double-buffered window, otherwise + request a single-buffered window. +
 
-depthfalseIf true, request a depth buffer.
-depthsize1Minimum number of bits in depth buffer.
 
-accumfalseIf true, request an accumulation buffer.
-accumredsize1Minimum number of bits in accumulation buffer red component.
-accumgreensize1 + Minimum number of bits in accumulation buffer green component. +
-accumbluesize1Minimum number of bits in accumulation buffer blue component.
-accumalphasize1 + Minimum number of bits in accumulation buffer alpha component. +
 
-stencilfalseIf true, request a stencil buffer.
-stencilsize1Minimum number of bits in stencil component.
 
-auxbuffers0Desired number of auxiliary buffers.
 
-privatecmapfalse + Only applicable in color index mode. + If false, use a shared read-only colormap. + If true, use a private read/write colormap. +
 
-overlayfalseIf true, request overlay planes.
 
-stereomode + See the stereo information + for details about the various modes. + Stereo parameters are changed with the + stereo options. +

+ When using a non-native stereo mode, the OpenGL + + glDrawBuffer, + + glClear, + + glFrustum, and + + glOrtho calls + must be replaced with the Togl + Tcl or + C versions. +

 
-pbufferfalse + If true, request off-screen framebuffer memory for the graphics. + The resulting togl widget should not be managed. +
-largestpbufferfalse + If true, when asking for a pbuffer of a given size + and there isn't enough framebuffer memory available, + fallback to the largest size available. +
 
-multisamplefalse + If true, request an multisampled rendering context. +
-indirectfalse + If present, request an indirect rendering context. + A direct rendering context is normally requested. + Only significant on Unix/X11. +
-sharelist"" + Togl identification string or window path name + of an existing Togl widget with which to share display lists. + If it is not possible to share display lists + between the two togl widgets + (depends on the graphics driver and the particular formats), + it fails. +
-sharecontext"" + Togl identification string or window path name + of an existing Togl widget with which to share the OpenGL context. + Note: all other pixel format options are ignored. +
-pixelformat0 + Set the pixel format to the (platform-dependent) given value. + This is a backdoor into choosing a particular pixel format + that was determined by other means. +
+ +
+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/doc/upgrading.html b/ng/Togl2.1/doc/upgrading.html new file mode 100644 index 00000000..790cc732 --- /dev/null +++ b/ng/Togl2.1/doc/upgrading.html @@ -0,0 +1,109 @@ + + + + + + + + Upgrading to Version 2 + + + + + + +

Upgrading to Version 2

+ +

Contents

+ + +
+ +

+ Internally, Togl version 2 isn't very different from version 1, + and much of the C interface is the same. + The main difference is that the focus of the Togl API has changed + from being a C API to being a Tcl API. + Which means that the full power of Togl is accessible from Tcl + (the few exceptions are considered bugs). + +

Widget callback changes

+ + The biggest change is how the various callback are initialized. + In version 1, + the C API Togl_Set*Func functions had to be used + to setup the callback functions before creating the Togl widget. + And once the callbacks were set for a particular Togl widget, + they could not be changed. + If more than once Togl widget was needed, + the callback functions would need to be reset before each widget creation. + In version 2, + the callbacks are configuration arguments to the widget + and can be updated like any other standard widget configuration option. + See the Tcl API for details. + +

Widget subcommand changes

+ + Version 1 also allowed new subcommands to be added + to the togl widget command via the C API. + This was dropped for a variety of reasons: + there is no exact Tcl equivalent, + there is no standard object-oriented technique + currently in the Tcl core (8.4.13), + it is unclear how to make the API thread safe, + and the internal Tcl C API doesn't support + dynamicly changing sets of subcommands. + That said, this functionality might come back, especially when + TIP #257 is implemented. + Instead, in version 2, + create a Tcl function that takes the Togl widget as an argument. + Functions written in C can get the underlying Togl structure handle + with either the Togl_GetToglFromObj + or the Togl_GetToglFromName function, + as appropriate. + This means that there are no special Togl commands, only Tcl commands. + See the C API for details. + +

Stereo changes

+ + The stereo support has been totally revamped. + Some form of stereo is available all of the time. + +

Font changes

+ + Tcl support for writing strings has been added. +

+ + The font C API has been revised + so that Togl_LoadBitmapFont returns a font object instead an integer + (likewise for Togl_UnloadBitmapFont). + So instead of calling glListBase and glCallLists directly, + use Togl_WriteObj or Togl_WriteChars. +

+ The TOGL_BITMAP_* constants remain for limited backwards + source compatibility and are deprecated. + The acceptable font names are now the same as Tk_GetFont + and the Tk font command on all platforms. + +


+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/doc/using.html b/ng/Togl2.1/doc/using.html new file mode 100644 index 00000000..0e847d1f --- /dev/null +++ b/ng/Togl2.1/doc/using.html @@ -0,0 +1,180 @@ + + + + + + + + Using the Togl Widget + + + + + + +

Using the Togl Widget

+ +

Contents

+ + +
+ +

Using Togl With Your Application

+ +

+ First, double check that you have all of the + prerequisites + and that you have + compiled and installed Togl. +

+ Then, Togl acts like any other extension package — + to load it, you use the Tcl package command: +

+ package require Togl 2.0 +
+ After that, you can create a Togl widget just like any other Tk widget. + +

Examples

+ +

+ There are eight working examples: + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
double.tcl— compares single vs double buffering with two Togl widgets
texture.tcl— lets you play with texture mapping options
index.tcl— example of using color index mode
overlay.tcl— example of using overlay planes (requires overlay hardware)
stereo.tcl— stereo example
gears.tcl— spinning gears example
multisample.tcl— multisampling example
pbuffer.tcl— pbuffer (off-screen rendering) example
+
+ +

+ Each example consists of two files: a Tcl script for the user interface, + and a Tcl C package that does the OpenGL drawing. + To compile the examples, type make examples + in the Togl source directory. + The C packages are compiled into shared libraries + that are loaded into the Tcl interpreter as Tcl/Tk-extensions. + The examples are started by running the corrsponding Tcl script: + just type ./double.tcl + (or ./texture.tcl etc.) + or run under one of the Tcl interpreters, i.e., + tclsh or wish. + For example: +

+ tclsh84 double.tcl +
+ +

+ Other examples that use Tcl for OpenGL drawing can be found in the + Tcl3D demos. + +

Togl callbacks

+

+ All of the examples have similar structure. + First they create the user interface with one or more Togl widgets. + Each Togl widget is configured with the desired pixel format + and several callback commands (not all are needed): + + + + + + + + + + + + + + + + + + + + + + + + + +
-createcommand + Called when Togl widget is mapped — + when it is safe to initialize the OpenGL context. +
-reshapecommand + Called when the Togl widget is resized — + when the OpenGL context's viewport needs to be changed. +
-displaycommand + Called when the contents of the Togl widget needs to be redrawn. + Redraws are normally delayed to be when the Tcl event loop is idle + (see the togl widget's postredisplay command), + or as the result of an explict call to the togl's widgets + render command. +
-destroycommand + Called when the Togl widget is destroyed. + While OpenGL frees display lists and other resources, + sometimes there's some associated state that is no longer needed. +
-timercommand + Called every n milliseconds + as given by the -time option. +
-overlaydisplaycommand + Called when the overlay planes needs to be redrawn. + The overlay planes are created and reshaped + at the same time as the main OpenGL context. +
+ + Typically, only -createcommand, -reshapecommand + and -displaycommand are used. + +


+ + Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads + + + Valid HTML 4.01 Transitional + + + diff --git a/ng/Togl2.1/double.c b/ng/Togl2.1/double.c new file mode 100644 index 00000000..be6f5a38 --- /dev/null +++ b/ng/Togl2.1/double.c @@ -0,0 +1,279 @@ +/* $Id: double.c,v 1.22 2009/03/12 23:59:35 gregcouch Exp $ */ + +/* + * Togl - a Tk OpenGL widget + * Copyright (C) 1996-1997 Brian Paul and Ben Bederson + * Copyright (C) 2006-2007 Greg Couch + * See the LICENSE file for copyright details. + */ + +#define USE_TOGL_STUBS + +#include "togl.h" +#include +#include +#include + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + +static Tcl_Obj *toglFont; +static double xAngle = 0, yAngle = 0, zAngle = 0; +static GLdouble CornerX, CornerY, CornerZ; /* where to print strings */ + + +/* + * Togl widget create callback. This is called by Tcl/Tk when the widget has + * been realized. Here's where one may do some one-time context setup or + * initializations. + */ +static int +create_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (!toglFont) + toglFont = Togl_LoadBitmapFont(togl, "Helvetica"); + if (!toglFont) { + static int shown; + + if (!shown) { + fprintf(stderr, "Couldn't load font!\n"); + shown = 1; + } + } + return TCL_OK; +} + + +/* + * Togl widget reshape callback. This is called by Tcl/Tk when the widget + * has been resized. Typically, we call glViewport and perhaps setup the + * projection matrix. + */ +static int +reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + int width; + int height; + double aspect; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + aspect = (double) width / (double) height; + + glViewport(0, 0, width, height); + + /* Set up projection transform */ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-aspect, aspect, -1, 1, 1, 10); + + CornerX = -aspect; + CornerY = -1; + CornerZ = -1.1; + + /* Change back to model view transform for rendering */ + glMatrixMode(GL_MODELVIEW); + + return TCL_OK; +} + + + +static void +print_string(Togl *togl, const char *s) +{ + if (toglFont) + Togl_WriteChars(togl, toglFont, s, 0); +} + + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +display_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + static GLuint cubeList = 0; + const char *ident; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) + return TCL_ERROR; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glLoadIdentity(); /* Reset modelview matrix to the identity + * matrix */ + glTranslatef(0, 0, -3); /* Move the camera back three units */ + glRotated(xAngle, 1, 0, 0); /* Rotate by X, Y, and Z angles */ + glRotated(yAngle, 0, 1, 0); + glRotated(zAngle, 0, 0, 1); + + glEnable(GL_DEPTH_TEST); + + if (!cubeList) { + cubeList = glGenLists(1); + glNewList(cubeList, GL_COMPILE); + + /* Front face */ + glBegin(GL_QUADS); + glColor3f(0, 0.7f, 0.1f); /* Green */ + glVertex3f(-1, 1, 1); + glVertex3f(1, 1, 1); + glVertex3f(1, -1, 1); + glVertex3f(-1, -1, 1); + /* Back face */ + glColor3f(0.9f, 1, 0); /* Yellow */ + glVertex3f(-1, 1, -1); + glVertex3f(1, 1, -1); + glVertex3f(1, -1, -1); + glVertex3f(-1, -1, -1); + /* Top side face */ + glColor3f(0.2f, 0.2f, 1); /* Blue */ + glVertex3f(-1, 1, 1); + glVertex3f(1, 1, 1); + glVertex3f(1, 1, -1); + glVertex3f(-1, 1, -1); + /* Bottom side face */ + glColor3f(0.7f, 0, 0.1f); /* Red */ + glVertex3f(-1, -1, 1); + glVertex3f(1, -1, 1); + glVertex3f(1, -1, -1); + glVertex3f(-1, -1, -1); + glEnd(); + + glEndList(); + + } + glCallList(cubeList); + + glDisable(GL_DEPTH_TEST); + glLoadIdentity(); + glColor3f(1, 1, 1); + glRasterPos3d(CornerX, CornerY, CornerZ); + ident = Togl_Ident(togl); + if (ident) + print_string(togl, ident); + Togl_SwapBuffers(togl); + return TCL_OK; +} + + + + +static int +setXrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "angle"); + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[1], &xAngle) != TCL_OK) { + return TCL_ERROR; + } + + /* printf( "before %f ", xAngle ); */ + + xAngle = fmod(xAngle, 360.0); + if (xAngle < 0) + xAngle += 360.0; + + /* printf( "after %f \n", xAngle ); */ + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[1]); + return TCL_OK; +} + + +static int +setYrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[1], &yAngle) != TCL_OK) { + return TCL_ERROR; + } + + yAngle = fmod(yAngle, 360.0); + if (yAngle < 0) + yAngle += 360.0; + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[1]); + return TCL_OK; +} + +/* + * Called by Tcl to let me initialize the modules (Togl) I will need. + */ +EXTERN int +Double_Init(Tcl_Interp *interp) +{ + /* + * Initialize Tcl and the Togl widget module. + */ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL + || Togl_InitStubs(interp, "2.0", 0) == NULL) { + return TCL_ERROR; + } + + /* + * Specify the C callback functions for widget creation, display, + * and reshape. + */ + Tcl_CreateObjCommand(interp, "double::create_cb", create_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "double::display_cb", display_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "double::reshape_cb", reshape_cb, NULL, NULL); + + /* + * Make a new Togl widget command so the Tcl code can set a C variable. + */ + + Tcl_CreateObjCommand(interp, "double::setXrot", setXrot_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "double::setYrot", setYrot_cb, NULL, NULL); + + /* + * Call Tcl_CreateCommand for application-specific commands, if + * they weren't already created by the init procedures called above. + */ + + return TCL_OK; +} diff --git a/ng/Togl2.1/double.tcl b/ng/Togl2.1/double.tcl new file mode 100644 index 00000000..ed749430 --- /dev/null +++ b/ng/Togl2.1/double.tcl @@ -0,0 +1,96 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# $Id: double.tcl,v 1.11 2009/03/12 23:59:35 gregcouch Exp $ + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996 Brian Paul and Ben Bederson +# Copyright (C) 2006-2007 Greg Couch +# See the LICENSE file for copyright details. + + +# An Tk/OpenGL widget demo with two windows, one single buffered and the +# other double buffered. + +package provide double 1.0 + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/double[info sharedlibextension] + +# create ::double namespace +namespace eval ::double { +} + +proc double::setup {} { + wm title . "Single vs Double Buffering" + + # create first Togl widget + togl .o1 -width 200 -height 200 -rgba true -double false -depth true -ident "Single Buffered" -create double::create_cb -display double::display_cb -reshape double::reshape_cb + + # create second Togl widget, share display lists with first widget + togl .o2 -width 200 -height 200 -rgba true -double true -depth true -ident "Double Buffered" -sharelist "Single Buffered" -create double::create_cb -display double::display_cb -reshape double::reshape_cb + + scale .sx -label {X Axis} -from 0 -to 360 -command {::double::setAngle x} -orient horizontal + scale .sy -label {Y Axis} -from 0 -to 360 -command {::double::setAngle y} -orient horizontal + button .btn -text Quit -command exit + + bind .o1 { + ::double::motion_event [lindex [%W config -width] 4] \ + [lindex [%W config -height] 4] \ + %x %y + } + + bind .o2 { + ::double::motion_event [lindex [%W config -width] 4] \ + [lindex [%W config -height] 4] \ + %x %y + } + + grid rowconfigure . 0 -weight 1 + grid columnconfigure . 0 -weight 1 -uniform same + grid columnconfigure . 1 -weight 1 -uniform same + grid .o1 -row 0 -column 0 -sticky nesw -padx 3 -pady 3 + grid .o2 -row 0 -column 1 -sticky nesw -padx 3 -pady 3 + #grid .l1 -row 1 -column 0 -sticky ew -padx 3 -pady 3 + #grid .l2 -row 1 -column 1 -sticky ew -padx 3 -pady 3 + grid .sx -row 2 -column 0 -columnspan 2 -sticky ew + grid .sy -row 3 -column 0 -columnspan 2 -sticky ew + grid .btn -row 4 -column 0 -columnspan 2 -sticky ew +} + + + +# This is called when mouse button 1 is pressed and moved in either of +# the OpenGL windows. +proc double::motion_event { width height x y } { + .sx set [double::setXrot [expr 360.0 * $y / $height]] + .sy set [double::setYrot [expr 360.0 * ($width - $x) / $width]] + + .o1 postredisplay + .o2 postredisplay +} + +# This is called when a slider is changed. +proc double::setAngle {axis value} { + global xAngle yAngle zAngle + + switch -exact $axis { + x {double::setXrot $value + double::setXrot $value} + y {double::setYrot $value + double::setYrot $value} + } + + .o1 postredisplay + .o2 postredisplay +} + +# Execution starts here! +if { [info script] == $argv0 } { + ::double::setup +} diff --git a/ng/Togl2.1/gears.c b/ng/Togl2.1/gears.c new file mode 100644 index 00000000..8e557dc3 --- /dev/null +++ b/ng/Togl2.1/gears.c @@ -0,0 +1,491 @@ +/* gears.c */ + +/* + * 3-D gear wheels. This program is in the public domain. + * + * Brian Paul + * + * + * Modified to work under Togl as a widget for TK 1997 + * + * Philip Quaife + * + */ + +#define USE_TOGL_STUBS + +#include "togl.h" +#include +#include +#include + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + +#ifndef M_PI +# define M_PI 3.14159265 +#endif +#define FM_PI ((float) M_PI) + +#ifdef _MSC_VER +__inline float +sinf(double a) +{ + return (float) sin(a); +} +__inline float +cosf(double a) +{ + return (float) cos(a); +} +__inline float +sqrtf(double a) +{ + return (float) sqrt(a); +} + +# define sin sinf +# define cos cosf +# define sqrt sqrtf +#endif + +struct WHIRLYGIZMO +{ + int Gear1, Gear2, Gear3; + double Rotx, Roty, Rotz; + double Angle; + int Height, Width; +}; + +typedef struct WHIRLYGIZMO WHIRLYGIZMO; + +/* + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * Input: inner_radius - radius of hole at center + * outer_radius - radius at center of teeth + * width - width of gear + * teeth - number of teeth + * tooth_depth - depth of tooth + */ +static void +gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, + GLint teeth, GLfloat tooth_depth) +{ + GLint i; + GLfloat r0, r1, r2; + GLfloat angle, da; + GLfloat u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2; + r2 = outer_radius + tooth_depth / 2; + + da = 2 * FM_PI / teeth / 4; + + glShadeModel(GL_FLAT); + + glNormal3f(0, 0, 1); + + /* draw front face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2 * FM_PI / teeth; + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), + width * 0.5f); + } + glEnd(); + + /* draw front sides of teeth */ + glBegin(GL_QUADS); + da = 2 * FM_PI / teeth / 4; + for (i = 0; i < teeth; i++) { + angle = i * 2 * FM_PI / teeth; + + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), + width * 0.5f); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), + width * 0.5f); + } + glEnd(); + + + glNormal3f(0, 0, -1); + + /* draw back face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2 * FM_PI / teeth; + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), + -width * 0.5f); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw back sides of teeth */ + glBegin(GL_QUADS); + da = 2 * FM_PI / teeth / 4; + for (i = 0; i < teeth; i++) { + angle = i * 2 * FM_PI / teeth; + + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), + -width * 0.5f); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), + -width * 0.5f); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f); + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); + } + glEnd(); + + + /* draw outward faces of teeth */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i < teeth; i++) { + angle = i * 2 * FM_PI / teeth; + + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); + u = r2 * cos(angle + da) - r1 * cos(angle); + v = r2 * sin(angle + da) - r1 * sin(angle); + len = sqrt(u * u + v * v); + u /= len; + v /= len; + glNormal3f(v, -u, 0); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f); + glNormal3f(cos(angle), sin(angle), 0); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), + width * 0.5f); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), + -width * 0.5f); + u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); + v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); + glNormal3f(v, -u, 0); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), + width * 0.5f); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), + -width * 0.5f); + glNormal3f(cos(angle), sin(angle), 0); + } + + glVertex3f(r1 /* * cos(0) */ , /* r1 * sin(0) */ 0, width * 0.5f); + glVertex3f(r1 /* * cos(0) */ , /* r1 * sin(0) */ 0, -width * 0.5f); + + glEnd(); + + + glShadeModel(GL_SMOOTH); + + /* draw inside radius cylinder */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2 * FM_PI / teeth; + glNormal3f(-cos(angle), -sin(angle), 0); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); + } + glEnd(); + +} + +/* + * static GLfloat view_rotx=20, view_roty=30, view_rotz=0; static GLint + * gear1, gear2, gear3; static GLfloat angle = 0; */ +static GLuint limit; +static GLuint count = 1; + +static GLubyte polycolor[4] = { 255, 255, 255, 255 }; + +static int +draw(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) +{ + WHIRLYGIZMO *Wg; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); + glDisable(GL_TEXTURE_2D); + glPushMatrix(); + glRotatef((float) Wg->Rotx, 1, 0, 0); + glRotatef((float) Wg->Roty, 0, 1, 0); + glRotatef((float) Wg->Rotz, 0, 0, 1); + + glPushMatrix(); + glTranslatef(-3, -2, 0); + glRotatef((float) Wg->Angle, 0, 0, 1); + glEnable(GL_DEPTH_TEST); + glCallList(Wg->Gear1); + glEnable(GL_DEPTH_TEST); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1f, -2, 0); + glRotatef(-2 * (float) Wg->Angle - 9, 0, 0, 1); + glCallList(Wg->Gear2); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1f, 4.2f, 0); + glRotatef(-2 * (float) Wg->Angle - 25, 0, 0, 1); + glCallList(Wg->Gear3); + glPopMatrix(); + + glPopMatrix(); + + Togl_SwapBuffers(togl); + + return TCL_OK; +} + + +static int +zap(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) +{ + WHIRLYGIZMO *Wg; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); + free(Wg); + + return TCL_OK; +} + + +static int +idle(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) +{ + WHIRLYGIZMO *Wg; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); + Wg->Angle += 2; + Togl_PostRedisplay(togl); + + return TCL_OK; +} + + +/* change view angle, exit upon ESC */ +/* + * static GLenum key(int k, GLenum mask) { switch (k) { case TK_UP: view_rotx + * += 5; return GL_TRUE; case TK_DOWN: view_rotx -= 5; return GL_TRUE; case + * TK_LEFT: view_roty += 5; return GL_TRUE; case TK_RIGHT: view_roty -= 5; + * return GL_TRUE; case TK_z: view_rotz += 5; return GL_TRUE; case TK_Z: + * view_rotz -= 5; return GL_TRUE; } return GL_FALSE; } */ + +/* new window size or exposure */ +static int +reshape(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + int width, height; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + glViewport(0, 0, (GLint) width, (GLint) height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + if (width > height) { + GLfloat w = (GLfloat) width / (GLfloat) height; + + glFrustum(-w, w, -1, 1, 5, 60); + } else { + GLfloat h = (GLfloat) height / (GLfloat) width; + + glFrustum(-1, 1, -h, h, 5, 60); + } + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0, 0, -40); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + return TCL_OK; +} + + +static int +init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) +{ + WHIRLYGIZMO *Wg; + static GLfloat red[4] = { 0.8f, 0.1f, 0, 1 }; + static GLfloat green[4] = { 0, 0.8f, 0.2f, 1 }; + static GLfloat blue[4] = { 0.2f, 0.2f, 1, 1 }; + static GLfloat pos[4] = { 5, 5, 10, 0 }; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + glLightfv(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + /* make the gears */ + Wg = (WHIRLYGIZMO *) malloc(sizeof (WHIRLYGIZMO)); + if (!Wg) { + Tcl_SetResult(Togl_Interp(togl), + "\"Cannot allocate client data for widget\"", TCL_STATIC); + } + Wg->Gear1 = glGenLists(1); + glNewList(Wg->Gear1, GL_COMPILE); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + gear(1, 4, 1, 20, 0.7f); + glEndList(); + + Wg->Gear2 = glGenLists(1); + glNewList(Wg->Gear2, GL_COMPILE); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + gear(0.5f, 2, 2, 10, 0.7f); + glEndList(); + + Wg->Gear3 = glGenLists(1); + glNewList(Wg->Gear3, GL_COMPILE); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + gear(1.3f, 2, 0.5f, 10, 0.7f); + glEndList(); + + glEnable(GL_NORMALIZE); + Wg->Height = Togl_Height(togl); + Wg->Width = Togl_Width(togl); + Wg->Angle = 0; + Wg->Rotx = 0; + Wg->Roty = 0; + Wg->Rotz = 0; + Togl_SetClientData(togl, (ClientData) Wg); + + return TCL_OK; +} + +static int +position(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + WHIRLYGIZMO *Wg; + char Result[100]; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); + + /* Let result string equal value */ + sprintf(Result, "%g %g", Wg->Roty, Wg->Rotx); + + Tcl_SetResult(interp, Result, TCL_VOLATILE); + return TCL_OK; +} + +static int +rotate(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + WHIRLYGIZMO *Wg; + Togl *togl; + + if (objc != 4) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName yrot xrot"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); + + if (Tcl_GetDoubleFromObj(interp, objv[2], &Wg->Roty) != TCL_OK) { + return TCL_ERROR; + } + if (Tcl_GetDoubleFromObj(interp, objv[3], &Wg->Rotx) != TCL_OK) { + return TCL_ERROR; + } + Togl_PostRedisplay(togl); + + return TCL_OK; +} + +EXTERN int +Gears_Init(Tcl_Interp *interp) +{ + /* + * Initialize Tcl and the Togl widget module. + */ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL + || Togl_InitStubs(interp, "2.0", 0) == NULL) { + return TCL_ERROR; + } + + /* + * Specify the C callback functions for widget creation, display, + * and reshape. + */ + Tcl_CreateObjCommand(interp, "init", init, NULL, NULL); + Tcl_CreateObjCommand(interp, "zap", zap, NULL, NULL); + Tcl_CreateObjCommand(interp, "draw", draw, NULL, NULL); + Tcl_CreateObjCommand(interp, "reshape", reshape, NULL, NULL); + Tcl_CreateObjCommand(interp, "idle", idle, NULL, NULL); + Tcl_CreateObjCommand(interp, "rotate", rotate, NULL, NULL); + Tcl_CreateObjCommand(interp, "position", position, NULL, NULL); + return TCL_OK; +} diff --git a/ng/Togl2.1/gears.tcl b/ng/Togl2.1/gears.tcl new file mode 100644 index 00000000..42a77314 --- /dev/null +++ b/ng/Togl2.1/gears.tcl @@ -0,0 +1,90 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996-1997 Brian Paul and Ben Bederson +# Copyright (C) 2006-2007 Greg Couch +# See the LICENSE file for copyright details. + + +# +# Test Togl using GL Gears Demo +# +# Copyright (C) 1997 Philip Quaife +# + +package provide gears 1.0 + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/gears[info sharedlibextension] + +# create ::gears namespace +namespace eval ::gears { +} + +proc ::gears::setup {} { + global startx starty xangle0 yangle0 xangle yangle RotCnt + global vTime + set RotCnt 1 + set xangle 0.0 + set yangle 0.0 + set vTime 100 + wm title . "Rotating Gear Widget Test" + + label .t -text "Click and drag to rotate image" + pack .t -side top -padx 2 -pady 10 + frame .f + pack .f -side top + button .f.n1 -text " Add " -command ::gears::AutoRot + button .f.r1 -text "Remove" -command ::gears::DelRot + button .f.b1 -text " Quit " -command exit + entry .f.t -width 4 -textvariable vTime + pack .f.n1 .f.t .f.r1 .f.b1 -side left -anchor w -padx 5 + newRot .w0 10 + +} +proc ::gears::AutoRot {} { + global RotCnt vTime + newRot .w$RotCnt $vTime + set RotCnt [expr $RotCnt + 1] +} + +proc ::gears::DelRot {} { + global RotCnt vTime + if { $RotCnt != 0 } { + set RotCnt [expr $RotCnt - 1] + destroy .w$RotCnt + } +} + +proc ::gears::newRot {win {tick 100} } { + togl $win -width 200 -height 200 -rgba true -double true -depth true -privatecmap false -time $tick -create init -destroy zap -display draw -reshape reshape -timer idle + bind $win {::gears::RotStart %x %y %W} + bind $win {::gears::RotMove %x %y %W} + pack $win -expand true -fill both +} + +proc ::gears::RotStart {x y W} { + global startx starty xangle0 yangle0 xangle yangle + set startx $x + set starty $y + set vPos [position $W] + set xangle0 [lindex $vPos 0] + set yangle0 [lindex $vPos 1] +} + +proc ::gears::RotMove {x y W} { + global startx starty xangle0 yangle0 xangle yangle + set xangle [expr $xangle0 + ($x - $startx)] + set yangle [expr $yangle0 + ($y - $starty)] + rotate $W $xangle $yangle +} + +if { [info script] == $argv0 } { + ::gears::setup +} diff --git a/ng/Togl2.1/image.c b/ng/Togl2.1/image.c new file mode 100644 index 00000000..33e6a6a3 --- /dev/null +++ b/ng/Togl2.1/image.c @@ -0,0 +1,249 @@ +/* + * SGI rgb file reader borrowed from gltk library + */ + +#include "togl.h" /* added by GG to include windows.h */ +#include +#include +#include +#include "image.h" + +#ifndef SEEK_SET +# define SEEK_SET 0 +#endif + + +static void +tkQuit(void) +{ + exit(0); +} + + +/******************************************************************************/ + +typedef struct _rawImageRec +{ + unsigned short imagic; + unsigned short type; + unsigned short dim; + unsigned short sizeX, sizeY, sizeZ; + unsigned long min, max; + unsigned long wasteBytes; + char name[80]; + unsigned long colorMap; + FILE *file; + unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA; + unsigned long rleEnd; + GLuint *rowStart; + GLint *rowSize; +} rawImageRec; + + +/******************************************************************************/ + +static void +ConvertShort(unsigned short *array, long length) +{ + unsigned long b1, b2; + unsigned char *ptr; + + ptr = (unsigned char *) array; + while (length--) { + b1 = *ptr++; + b2 = *ptr++; + *array++ = (unsigned short) ((b1 << 8) | b2); + } +} + +static void +ConvertLong(GLuint *array, long length) +{ + unsigned long b1, b2, b3, b4; + unsigned char *ptr; + + ptr = (unsigned char *) array; + while (length--) { + b1 = *ptr++; + b2 = *ptr++; + b3 = *ptr++; + b4 = *ptr++; + *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4); + } +} + +static rawImageRec * +RawImageOpen(const char *fileName) +{ + union + { + int testWord; + char testByte[4]; + } endianTest; + rawImageRec *raw; + GLenum swapFlag; + int x; + + endianTest.testWord = 1; + if (endianTest.testByte[0] == 1) { + swapFlag = GL_TRUE; + } else { + swapFlag = GL_FALSE; + } + + raw = (rawImageRec *) malloc(sizeof (rawImageRec)); + if (raw == NULL) { + fprintf(stderr, "Out of memory!\n"); + tkQuit(); + } + if ((raw->file = fopen(fileName, "rb")) == NULL) { + perror(fileName); + tkQuit(); + } + + fread(raw, 1, 12, raw->file); + + if (swapFlag) { + ConvertShort(&raw->imagic, 6); + } + + raw->tmp = (unsigned char *) malloc(raw->sizeX * 256); + raw->tmpR = (unsigned char *) malloc(raw->sizeX * 256); + raw->tmpG = (unsigned char *) malloc(raw->sizeX * 256); + raw->tmpB = (unsigned char *) malloc(raw->sizeX * 256); + raw->tmpA = (unsigned char *) malloc(raw->sizeX * 256); + if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL || + raw->tmpB == NULL || raw->tmpA == NULL) { + fprintf(stderr, "Out of memory!\n"); + tkQuit(); + } + + if ((raw->type & 0xFF00) == 0x0100) { + x = raw->sizeY * raw->sizeZ * sizeof (GLuint); + raw->rowStart = (GLuint *) malloc(x); + raw->rowSize = (GLint *) malloc(x); + if (raw->rowStart == NULL || raw->rowSize == NULL) { + fprintf(stderr, "Out of memory!\n"); + tkQuit(); + } + raw->rleEnd = 512 + (2 * x); + fseek(raw->file, 512, SEEK_SET); + fread(raw->rowStart, 1, x, raw->file); + fread(raw->rowSize, 1, x, raw->file); + if (swapFlag) { + ConvertLong(raw->rowStart, x / sizeof (GLuint)); + ConvertLong((GLuint *) raw->rowSize, x / sizeof (GLint)); + } + } + return raw; +} + +static void +RawImageClose(rawImageRec * raw) +{ + + fclose(raw->file); + free(raw->tmp); + free(raw->tmpR); + free(raw->tmpG); + free(raw->tmpB); + free(raw->tmpA); + free(raw); +} + +static void +RawImageGetRow(rawImageRec * raw, unsigned char *buf, int y, int z) +{ + unsigned char *iPtr, *oPtr, pixel; + int count; + + if ((raw->type & 0xFF00) == 0x0100) { + fseek(raw->file, raw->rowStart[y + z * raw->sizeY], SEEK_SET); + fread(raw->tmp, 1, (unsigned int) raw->rowSize[y + z * raw->sizeY], + raw->file); + + iPtr = raw->tmp; + oPtr = buf; + while (1) { + pixel = *iPtr++; + count = (int) (pixel & 0x7F); + if (!count) { + return; + } + if (pixel & 0x80) { + while (count--) { + *oPtr++ = *iPtr++; + } + } else { + pixel = *iPtr++; + while (count--) { + *oPtr++ = pixel; + } + } + } + } else { + fseek(raw->file, 512 + (y * raw->sizeX) + (z * raw->sizeX * raw->sizeY), + SEEK_SET); + fread(buf, 1, raw->sizeX, raw->file); + } +} + +static void +RawImageGetData(rawImageRec * raw, TK_RGBImageRec * final) +{ + unsigned char *ptr; + int i, j; + + final->data = + (unsigned char *) malloc((raw->sizeX + 1) * (raw->sizeY + 1) * 4); + if (final->data == NULL) { + fprintf(stderr, "Out of memory!\n"); + tkQuit(); + } + + ptr = final->data; + for (i = 0; i < (int) (raw->sizeY); i++) { + RawImageGetRow(raw, raw->tmpR, i, 0); + RawImageGetRow(raw, raw->tmpG, i, 1); + RawImageGetRow(raw, raw->tmpB, i, 2); + if (raw->sizeZ == 4) { + /* 4 components */ + RawImageGetRow(raw, raw->tmpA, i, 3); + for (j = 0; j < (int) (raw->sizeX); j++) { + *ptr++ = *(raw->tmpR + j); + *ptr++ = *(raw->tmpG + j); + *ptr++ = *(raw->tmpB + j); + *ptr++ = *(raw->tmpA + j); + } + } else { + /* 3 components */ + for (j = 0; j < (int) (raw->sizeX); j++) { + *ptr++ = *(raw->tmpR + j); + *ptr++ = *(raw->tmpG + j); + *ptr++ = *(raw->tmpB + j); + } + } + } +} + +TK_RGBImageRec * +tkRGBImageLoad(const char *fileName) +{ + rawImageRec *raw; + TK_RGBImageRec *final; + + raw = RawImageOpen(fileName); + final = (TK_RGBImageRec *) malloc(sizeof (TK_RGBImageRec)); + if (final == NULL) { + fprintf(stderr, "Out of memory!\n"); + tkQuit(); + } + final->sizeX = raw->sizeX; + final->sizeY = raw->sizeY; + final->sizeZ = raw->sizeZ; + RawImageGetData(raw, final); + RawImageClose(raw); + return final; +} + +/******************************************************************************/ diff --git a/ng/Togl2.1/image.h b/ng/Togl2.1/image.h new file mode 100644 index 00000000..30b537bc --- /dev/null +++ b/ng/Togl2.1/image.h @@ -0,0 +1,14 @@ +/* image.h */ + +#ifndef IMAGE_H +# define IMAGE_H + +typedef struct _TK_RGBImageRec +{ + int sizeX, sizeY, sizeZ; + unsigned char *data; +} TK_RGBImageRec; + +extern TK_RGBImageRec *tkRGBImageLoad(const char *fileName); + +#endif diff --git a/ng/Togl2.1/index.c b/ng/Togl2.1/index.c new file mode 100644 index 00000000..7bbffccc --- /dev/null +++ b/ng/Togl2.1/index.c @@ -0,0 +1,227 @@ +/* $Id: index.c,v 1.13 2007/08/03 16:48:50 gregcouch Exp $ */ + +/* + * Togl - a Tk OpenGL widget + * Copyright (C) 1996-1997 Brian Paul and Ben Bederson + * Copyright (C) 2006-2007 Greg Couch + * See the LICENSE file for copyright details. + */ + + +/* + * An example Togl program using color-index mode. + */ + +#define USE_TOGL_STUBS + +#include "togl.h" +#include +#include + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + + +/* Our color indexes: */ +static unsigned long black, red, green, blue; + +/* Rotation angle */ +static float Angle = 0; + + +/* + * Togl widget create callback. This is called by Tcl/Tk when the widget has + * been realized. Here's where one may do some one-time context setup or + * initializations. + */ +static int +create_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + /* allocate color indexes */ + black = Togl_AllocColor(togl, 0, 0, 0); + red = Togl_AllocColor(togl, 1, 0, 0); + green = Togl_AllocColor(togl, 0, 1, 0); + blue = Togl_AllocColor(togl, 0, 0, 1); + + /* If we were using a private read/write colormap we'd setup our color + * table with something like this: */ + /* + * black = 1; Togl_SetColor( togl, black, 0, 0, 0 ); red = 2; + * Togl_SetColor( togl, red, 1, 0, 0 ); green = 3; Togl_SetColor( + * togl, green, 0, 1, 0 ); blue = 4; Togl_SetColor( togl, blue, 0, + * 0, 1 ); */ + + glShadeModel(GL_FLAT); + glDisable(GL_DITHER); + + return TCL_OK; +} + + +/* + * Togl widget reshape callback. This is called by Tcl/Tk when the widget + * has been resized. Typically, we call glViewport and perhaps setup the + * projection matrix. + */ +static int +reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + int width; + int height; + float aspect; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + aspect = (float) width / (float) height; + glViewport(0, 0, width, height); + + /* Set up projection transform */ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-aspect, aspect, -1, 1, -1, 1); + + /* Change back to model view transform for rendering */ + glMatrixMode(GL_MODELVIEW); + + return TCL_OK; +} + + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +display_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + glClearIndex((float) black); + glClear(GL_COLOR_BUFFER_BIT); + + glPushMatrix(); + glTranslatef(0.3f, -0.3f, 0); + glRotatef(Angle, 0, 0, 1); + glIndexi(red); + glBegin(GL_TRIANGLES); + glVertex2f(-0.5f, -0.3f); + glVertex2f(0.5f, -0.3f); + glVertex2f(0, 0.6f); + glEnd(); + glPopMatrix(); + + glPushMatrix(); + glRotatef(Angle, 0, 0, 1); + glIndexi(green); + glBegin(GL_TRIANGLES); + glVertex2f(-0.5f, -0.3f); + glVertex2f(0.5f, -0.3f); + glVertex2f(0, 0.6f); + glEnd(); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-0.3f, 0.3f, 0); + glRotatef(Angle, 0, 0, 1); + glIndexi(blue); + glBegin(GL_TRIANGLES); + glVertex2f(-0.5f, -0.3f); + glVertex2f(0.5f, -0.3f); + glVertex2f(0, 0.6f); + glEnd(); + glPopMatrix(); + + glFlush(); + Togl_SwapBuffers(togl); + + return TCL_OK; +} + + +static int +timer_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + Angle += 5.0; + Togl_PostRedisplay(togl); + + return TCL_OK; +} + + +EXTERN int +Index_Init(Tcl_Interp *interp) +{ + /* + * Initialize Tcl and the Togl widget module. + */ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL + || Togl_InitStubs(interp, "2.0", 0) == NULL) { + return TCL_ERROR; + } + + /* + * Specify the C callback functions for widget creation, display, + * and reshape. + */ + Tcl_CreateObjCommand(interp, "::index::create_cb", create_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "::index::display_cb", display_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "::index::reshape_cb", reshape_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "::index::timer_cb", timer_cb, NULL, NULL); + + /* + * Make a new Togl widget command so the Tcl code can set a C variable. + */ + /* NONE */ + + /* + * Call Tcl_CreateCommand for application-specific commands, if + * they weren't already created by the init procedures called above. + */ + return TCL_OK; +} diff --git a/ng/Togl2.1/index.tcl b/ng/Togl2.1/index.tcl new file mode 100644 index 00000000..ab2d49a8 --- /dev/null +++ b/ng/Togl2.1/index.tcl @@ -0,0 +1,50 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# $Id: index.tcl,v 1.8 2007/08/03 16:48:50 gregcouch Exp $ + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996 Brian Paul and Ben Bederson +# Copyright (C) 2006-2007 Greg Couch +# See the LICENSE file for copyright details. + + +# A Tk/OpenGL widget demo using color-index mode. + +package provide index 1.0 + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/index[info sharedlibextension] + +# create ::index namespace +namespace eval ::index { +} + +proc ::index::setup {} { + wm title . "Color index demo" + + togl .win -width 200 -height 200 -rgba false -double true -privatecmap false -time 10 -timer ::index::timer_cb -create ::index::create_cb -reshape ::index::reshape_cb -display ::index::display_cb + button .photo -text "Take Photo" -command ::index::take_photo + button .btn -text Quit -command exit + + pack .win -expand true -fill both + pack .photo -expand true -fill both + pack .btn -expand true -fill both +} + +proc ::index::take_photo {} { + image create photo img + .win takephoto img + img write image.ppm -format ppm +} + + +# Execution starts here! +if { [info script] == $argv0 } { + ::index::setup +} diff --git a/ng/Togl2.1/multisample.tcl b/ng/Togl2.1/multisample.tcl new file mode 100644 index 00000000..bdbcd100 --- /dev/null +++ b/ng/Togl2.1/multisample.tcl @@ -0,0 +1,96 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# $Id: multisample.tcl,v 1.3 2009/03/12 23:59:35 gregcouch Exp $ + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996 Brian Paul and Ben Bederson +# Copyright (C) 2006-2007 Greg Couch +# See the LICENSE file for copyright details. + + +# An Tk/OpenGL widget demo with two windows, one aliased and the +# other multisampled. Reuse C code from double buffering demo. + +package provide multisample 1.0 + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/double[info sharedlibextension] + +# create ::multisample namespace +namespace eval ::multisample { +} + +proc multisample::setup {} { + wm title . "Multisample vs Aliased" + + # create first Togl widget + togl .o1 -width 200 -height 200 -rgba true -double true -depth true -create double::create_cb -display double::display_cb -reshape double::reshape_cb -multisample false -ident Aliased + + # create second Togl widget, share display lists with first widget + togl .o2 -width 200 -height 200 -rgba true -double true -depth true -create double::create_cb -display double::display_cb -reshape double::reshape_cb -multisample true -ident Multisampled -sharelist Aliased + + scale .sx -label {X Axis} -from 0 -to 360 -command {::multisample::setAngle x} -orient horizontal + scale .sy -label {Y Axis} -from 0 -to 360 -command {::multisample::setAngle y} -orient horizontal + button .btn -text Quit -command exit + + bind .o1 { + ::multisample::motion_event [lindex [%W config -width] 4] \ + [lindex [%W config -height] 4] \ + %x %y + } + + bind .o2 { + ::multisample::motion_event [lindex [%W config -width] 4] \ + [lindex [%W config -height] 4] \ + %x %y + } + + grid rowconfigure . 0 -weight 1 + grid columnconfigure . 0 -weight 1 -uniform same + grid columnconfigure . 1 -weight 1 -uniform same + grid .o1 -row 0 -column 0 -sticky nesw -padx 3 -pady 3 + grid .o2 -row 0 -column 1 -sticky nesw -padx 3 -pady 3 + #grid .l1 -row 1 -column 0 -sticky ew -padx 3 -pady 3 + #grid .l2 -row 1 -column 1 -sticky ew -padx 3 -pady 3 + grid .sx -row 2 -column 0 -columnspan 2 -sticky ew + grid .sy -row 3 -column 0 -columnspan 2 -sticky ew + grid .btn -row 4 -column 0 -columnspan 2 -sticky ew +} + + + +# This is called when mouse button 1 is pressed and moved in either of +# the OpenGL windows. +proc multisample::motion_event { width height x y } { + .sx set [double::setXrot [expr 360.0 * $y / $height]] + .sy set [double::setYrot [expr 360.0 * ($width - $x) / $width]] + + .o1 postredisplay + .o2 postredisplay +} + +# This is called when a slider is changed. +proc multisample::setAngle {axis value} { + global xAngle yAngle zAngle + + switch -exact $axis { + x {double::setXrot $value + double::setXrot $value} + y {double::setYrot $value + double::setYrot $value} + } + + .o1 postredisplay + .o2 postredisplay +} + +# Execution starts here! +if { [info script] == $argv0 } { + ::multisample::setup +} diff --git a/ng/Togl2.1/overlay.c b/ng/Togl2.1/overlay.c new file mode 100644 index 00000000..630179ca --- /dev/null +++ b/ng/Togl2.1/overlay.c @@ -0,0 +1,214 @@ +/* $Id: overlay.c,v 1.10 2007/08/03 16:48:50 gregcouch Exp $ */ + +/* + * Togl - a Tk OpenGL widget + * Copyright (C) 1996-1997 Brian Paul and Ben Bederson + * Copyright (C) 2006-2007 Greg Couch + * See the LICENSE file for copyright details. + */ + + +/* + * An example Togl program using an overlay. + */ + +#define USE_TOGL_STUBS + +#include "togl.h" +#include +#include + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + + +/* Overlay color indexes: */ +static unsigned long Red, Green; + + +/* + * Togl widget create callback. This is called by Tcl/Tk when the widget has + * been realized. Here's where one may do some one-time context setup or + * initializations. + */ +static int +create_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + /* allocate overlay color indexes */ + Red = Togl_AllocColorOverlay(togl, 1, 0, 0); + Green = Togl_AllocColorOverlay(togl, 0, 1, 0); + + /* in this demo we always show the overlay */ + if (Togl_ExistsOverlay(togl)) { + Togl_ShowOverlay(togl); + printf("Red and green lines are in the overlay\n"); + } else { + printf("Sorry, this display doesn't support overlays\n"); + } + return TCL_OK; +} + + +/* + * Togl widget reshape callback. This is called by Tcl/Tk when the widget + * has been resized. Typically, we call glViewport and perhaps setup the + * projection matrix. + */ +static int +reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + int width; + int height; + float aspect; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + aspect = (float) width / (float) height; + + /* Set up viewing for normal plane's context */ + glViewport(0, 0, width, height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-aspect, aspect, -1, 1, -1, 1); + glMatrixMode(GL_MODELVIEW); + + /* Set up viewing for overlay plane's context */ + if (Togl_ExistsOverlay(togl)) { + Togl_UseLayer(togl, TOGL_OVERLAY); + glViewport(0, 0, width, height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-1, 1, -1, 1, -1, 1); + glMatrixMode(GL_MODELVIEW); + Togl_UseLayer(togl, TOGL_NORMAL); + } + return TCL_OK; +} + + +/* + * Togl widget overlay display callback. This is called by Tcl/Tk when the + * overlay has to be redrawn. + */ +static int +overlay_display_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + glClear(GL_COLOR_BUFFER_BIT); + + glIndexi(Red); + glBegin(GL_LINES); + glVertex2f(-1, -1); + glVertex2f(1, 1); + glVertex2f(-1, 1); + glVertex2f(1, -1); + glEnd(); + + glIndexi(Green); + glBegin(GL_LINE_LOOP); + glVertex2f(-0.5f, -0.5f); + glVertex2f(0.5f, -0.5f); + glVertex2f(0.5f, 0.5f); + glVertex2f(-0.5f, 0.5f); + glEnd(); + glFlush(); + return TCL_OK; +} + + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +display_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + glClear(GL_COLOR_BUFFER_BIT); + + glLoadIdentity(); + + glBegin(GL_TRIANGLES); + + glColor3f(1, 0, 1); + glVertex2f(-0.5f, -0.3f); + glVertex2f(0.5f, -0.3f); + glVertex2f(0, 0.6f); + + glColor3f(1, 1, 0); + glVertex2f(-0.5f + 0.2f, -0.3f - 0.2f); + glVertex2f(0.5f + 0.2f, -0.3f - 0.2f); + glVertex2f(0 + 0.2f, 0.6f - 0.2f); + + glColor3f(0, 1, 1); + glVertex2f(-0.5f + 0.4f, -0.3f - 0.4f); + glVertex2f(0.5f + 0.4f, -0.3f - 0.4f); + glVertex2f(0 + 0.4f, 0.6f - 0.4f); + + glEnd(); + + glFlush(); + return TCL_OK; +} + + +/* + * Called by Tcl to let me initialize the modules (Togl) I will need. + */ +EXTERN int +Overlay_Init(Tcl_Interp *interp) +{ + /* + * Initialize Tcl and the Togl widget module. + */ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL + || Togl_InitStubs(interp, "2.0", 0) == NULL) { + return TCL_ERROR; + } + + /* + * Specify the C callback functions for widget creation, display, + * and reshape. + */ + Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); + + Tcl_CreateObjCommand(interp, "overlay_display_cb", overlay_display_cb, NULL, + NULL); + + /* + * Make a new Togl widget command so the Tcl code can set a C variable. + */ + /* NONE */ + + /* + * Call Tcl_CreateCommand for application-specific commands, if + * they weren't already created by the init procedures called above. + */ + return TCL_OK; +} diff --git a/ng/Togl2.1/overlay.tcl b/ng/Togl2.1/overlay.tcl new file mode 100644 index 00000000..9a1d83d6 --- /dev/null +++ b/ng/Togl2.1/overlay.tcl @@ -0,0 +1,37 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# $Id: overlay.tcl,v 1.7 2007/08/03 16:48:50 gregcouch Exp $ + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996 Brian Paul and Ben Bederson +# Copyright (C) 2006-2007 Greg Couch +# See the LICENSE file for copyright details. + + +# A Tk/OpenGL widget demo using an overlay. + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/overlay[info sharedlibextension] + +proc setup {} { + wm title . "Overlay demo" + + togl .win -width 200 -height 200 -rgba true -double false -overlay true -create create_cb -reshape reshape_cb -display display_cb -overlaydisplay overlay_display_cb + button .btn -text Quit -command exit + + pack .win -expand true -fill both + pack .btn -expand true -fill both +} + + +# Execution starts here! +# Execution starts here! +if { [info script] == $argv0 } { + setup +} diff --git a/ng/Togl2.1/pbuffer.c b/ng/Togl2.1/pbuffer.c new file mode 100644 index 00000000..a032d03c --- /dev/null +++ b/ng/Togl2.1/pbuffer.c @@ -0,0 +1,489 @@ +/* $Id: pbuffer.c,v 1.2 2009/02/05 06:57:10 gregcouch Exp $ */ + +/* + * Togl - a Tk OpenGL widget + * Copyright (C) 1996-1997 Brian Paul and Ben Bederson + * Copyright (C) 2006-2007 Greg Couch + * See the LICENSE file for copyright details. + */ + +#undef PBUFFER_DEBUG + +#define USE_TOGL_STUBS + +#include "togl.h" +#include +#include +#include +#if defined(TOGL_AGL) +# include +# include +#elif defined(TOGL_NSOPENGL) +# include +# include +#else +# include +#endif +#include /* OpenGL 1.4 GL_GENERATE_MIPMAP */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + +static double xAngle = 0, yAngle = 0, zAngle = 0; +static GLdouble CornerX, CornerY, CornerZ; /* where to print strings */ +static GLuint texture; +static Togl *output; + +/* + * Togl widget create callback. This is called by Tcl/Tk when the widget has + * been realized. Here's where one may do some one-time context setup or + * initializations. + */ +static int +create_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + double version; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + version = atof((const char *) glGetString(GL_VERSION)); + if (version < 1.4) { + Tcl_SetResult(interp, "need OpenGL 1.4 or later", TCL_STATIC); + return TCL_ERROR; + } + + return TCL_OK; +} + + +/* + * Togl widget reshape callback. This is called by Tcl/Tk when the widget + * has been resized. Typically, we call glViewport and perhaps setup the + * projection matrix. + */ +static int +reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + int width; + int height; + double aspect; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + aspect = (double) width / (double) height; + + glViewport(0, 0, width, height); + + /* Set up projection transform */ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-aspect, aspect, -1, 1, 1, 10); + + CornerX = -aspect; + CornerY = -1; + CornerZ = -1.1; + + /* Change back to model view transform for rendering */ + glMatrixMode(GL_MODELVIEW); + + return TCL_OK; +} + + +/* + * Togl widget reshape callback. This is called by Tcl/Tk when the widget + * has been resized. Typically, we call glViewport and perhaps setup the + * projection matrix. + */ +static int +reshape2_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + int width; + int height; + double aspect; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + aspect = (double) width / (double) height; + + glViewport(0, 0, width, height); + + /* Set up projection transform */ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-aspect, aspect, -1, 1, -1, 1); + + /* Change back to model view transform for rendering */ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + return TCL_OK; +} + + +static void +draw_object() +{ + static GLuint cubeList = 0; + + glLoadIdentity(); /* Reset modelview matrix to the identity + * matrix */ + glTranslatef(0, 0, -3); /* Move the camera back three units */ + glRotated(xAngle, 1, 0, 0); /* Rotate by X, Y, and Z angles */ + glRotated(yAngle, 0, 1, 0); + glRotated(zAngle, 0, 0, 1); + + glEnable(GL_DEPTH_TEST); + + if (!cubeList) { + cubeList = glGenLists(1); + glNewList(cubeList, GL_COMPILE); + + /* Front face */ + glBegin(GL_QUADS); + glColor3f(0, 0.7f, 0.1f); /* Green */ + glVertex3f(-1, 1, 1); + glVertex3f(1, 1, 1); + glVertex3f(1, -1, 1); + glVertex3f(-1, -1, 1); + /* Back face */ + glColor3f(0.9f, 1, 0); /* Yellow */ + glVertex3f(-1, 1, -1); + glVertex3f(1, 1, -1); + glVertex3f(1, -1, -1); + glVertex3f(-1, -1, -1); + /* Top side face */ + glColor3f(0.2f, 0.2f, 1); /* Blue */ + glVertex3f(-1, 1, 1); + glVertex3f(1, 1, 1); + glVertex3f(1, 1, -1); + glVertex3f(-1, 1, -1); + /* Bottom side face */ + glColor3f(0.7f, 0, 0.1f); /* Red */ + glVertex3f(-1, -1, 1); + glVertex3f(1, -1, 1); + glVertex3f(1, -1, -1); + glVertex3f(-1, -1, -1); + glEnd(); + + glEndList(); + + } + glCallList(cubeList); +} + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +display_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) + return TCL_ERROR; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + draw_object(); + +#ifdef PBUFFER_DEBUG + { + Tk_PhotoHandle photo; + + /* first tcl: image create photo test */ + photo = Tk_FindPhoto(interp, "test2"); + if (photo == NULL) { + fprintf(stderr, "missing tk photo object test2\n"); + } else { + Togl_TakePhoto(togl, photo); + Tcl_Eval(interp, "test2 write test2.ppm -format ppm"); + } + } +#endif + Togl_SwapBuffers(togl); + return TCL_OK; +} + + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +display2_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) + return TCL_ERROR; + + glClear(GL_COLOR_BUFFER_BIT); + + if (texture) { + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, texture); + glBegin(GL_QUADS); + glTexCoord2i(0, 0); + glVertex2i(-1, -1); + glTexCoord2i(1, 0); + glVertex2i(1, -1); + glTexCoord2i(1, 1); + glVertex2i(1, 1); + glTexCoord2i(0, 1); + glVertex2i(-1, 1); + glEnd(); + glBindTexture(GL_TEXTURE_2D, 0); + } + + Togl_SwapBuffers(togl); + return TCL_OK; +} + + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +pbuffer_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + int width; + int height; + GLenum error; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) + return TCL_ERROR; + + width = Togl_Width(togl); + height = Togl_Height(togl); + + if (texture == 0) { + glGenTextures(1, &texture); + glBindTexture(GL_TEXTURE_2D, texture); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); +#if !defined(TOGL_AGL) && !defined(TOGL_NSOPENGL) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_LINEAR_MIPMAP_LINEAR); +#else + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); +#endif + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, + GL_BYTE, NULL); + glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); + glBindTexture(GL_TEXTURE_2D, 0); + error = glGetError(); + if (error != GL_NO_ERROR) { + fprintf(stderr, "texture init: %s\n", gluErrorString(error)); + } +#if 0 && defined(TOGL_AGL) + AGLContext ctx = aglGetCurrentContext(); + AGLPbuffer pbuf; + GLint face, level, screen; + GLenum err; + + aglGetPBuffer(ctx, &pbuf, &face, &level, &screen); + err = aglGetError(); + if (err != AGL_NO_ERROR) + fprintf(stderr, "getPBuffer: %s\n", aglErrorString(err)); + aglTexImagePBuffer(ctx, pbuf, GL_FRONT); + err = aglGetError(); + if (err != AGL_NO_ERROR) + fprintf(stderr, "teximagepbuffer: %s\n", aglErrorString(err)); +#endif + } + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + draw_object(); + +#if 1 || !defined(TOGL_AGL) + glBindTexture(GL_TEXTURE_2D, texture); + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, width, height); + glBindTexture(GL_TEXTURE_2D, 0); + error = glGetError(); + if (error != GL_NO_ERROR) { + fprintf(stderr, "after tex copy: %s\n", gluErrorString(error)); + } +#endif +#ifdef PBUFFER_DEBUG + { + Tk_PhotoHandle photo; + + /* first tcl: image create photo test */ + photo = Tk_FindPhoto(interp, "test"); + Togl_TakePhoto(togl, photo); + Tcl_Eval(interp, "test write test.ppm -format ppm"); + } +#endif + Togl_SwapBuffers(togl); + if (output) + Togl_PostRedisplay(output); + + return TCL_OK; +} + + +static int +setXrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "angle"); + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[1], &xAngle) != TCL_OK) { + return TCL_ERROR; + } + + /* printf( "before %f ", xAngle ); */ + + xAngle = fmod(xAngle, 360.0); + if (xAngle < 0.0) + xAngle += 360.0; + + /* printf( "after %f \n", xAngle ); */ + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[1]); + return TCL_OK; +} + + +static int +setYrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "angle"); + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[1], &yAngle) != TCL_OK) { + return TCL_ERROR; + } + + yAngle = fmod(yAngle, 360.0); + if (yAngle < 0.0) + yAngle += 360.0; + + /* Let result equal value */ + Tcl_SetObjResult(interp, objv[1]); + return TCL_OK; +} + +static int +setOutput_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &output) != TCL_OK) + return TCL_ERROR; + + return TCL_OK; +} + +/* + * Called by Tcl to let me initialize the modules (Togl) I will need. + */ +EXTERN int +Pbuffer_Init(Tcl_Interp *interp) +{ + /* + * Initialize Tcl and the Togl widget module. + */ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL +#ifdef PBUFFER_DEBUG + || Tk_InitStubs(interp, "8.1", 0) == NULL +#endif + || Togl_InitStubs(interp, "2.0", 0) == NULL) { + return TCL_ERROR; + } + + /* + * Specify the C callback functions for widget creation, display, + * and reshape. + */ + Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "display2_cb", display2_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "pbuffer_cb", pbuffer_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "reshape2_cb", reshape2_cb, NULL, NULL); + + /* + * Make a new Togl widget command so the Tcl code can set a C variable. + */ + + Tcl_CreateObjCommand(interp, "setXrot", setXrot_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "setYrot", setYrot_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "setOutput", setOutput_cb, NULL, NULL); + + /* + * Call Tcl_CreateCommand for application-specific commands, if + * they weren't already created by the init procedures called above. + */ + + return TCL_OK; +} diff --git a/ng/Togl2.1/pbuffer.tcl b/ng/Togl2.1/pbuffer.tcl new file mode 100644 index 00000000..8ffbfa79 --- /dev/null +++ b/ng/Togl2.1/pbuffer.tcl @@ -0,0 +1,115 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# $Id: pbuffer.tcl,v 1.1 2009/01/29 22:45:46 gregcouch Exp $ + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996 Brian Paul and Ben Bederson +# Copyright (C) 2006-2007 Greg Couch +# See the LICENSE file for copyright details. + + +# An Tk/OpenGL widget demo with two double-buffered OpenGL windows. +# The first shows the aliased object, the second show the results of +# rendering the same object in a higher resolution Pbuffer and using +# texture mapping to antialias it. + +package provide pbuffer 1.0 + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/pbuffer[info sharedlibextension] + +# create ::pbuffer namespace +namespace eval ::pbuffer { +} + +proc pbuffer::setup {} { + wm title . "Pbuffer test" + +#debug + image create photo test + image create photo test2 +#end debug + + # create first Togl widget + togl .o1 -width 300 -height 300 -rgba true -double true -depth true -ident main -create create_cb -reshape reshape_cb -display display_cb + label .l1 -text "RGB, Z, double" + + # create second Togl widget, share display lists with first widget, no depth + togl .o2 -width 300 -height 300 -rgba true -double true -sharelist main -reshape reshape2_cb -display display2_cb -ident second + setOutput .o2 + label .l2 -text "RGB from pbuffer texture" + + # create off-screen pbuffer, share display lists with other widgets + # must power of 2 squared in size + togl .pbuf -width 2048 -height 2048 -rgba true -depth true -sharelist main -pbuffer 1 -reshape reshape_cb -display pbuffer_cb -ident pbuffer + + scale .sx -label {X Axis} -from 0 -to 360 -command {::pbuffer::setAngle x} -orient horizontal + scale .sy -label {Y Axis} -from 0 -to 360 -command {::pbuffer::setAngle y} -orient horizontal + button .btn -text Quit -command exit + + bind .o1 { + ::pbuffer::motion_event [lindex [%W config -width] 4] \ + [lindex [%W config -height] 4] \ + %x %y + } + + bind .o2 { + ::pbuffer::motion_event [lindex [%W config -width] 4] \ + [lindex [%W config -height] 4] \ + %x %y + } + + grid rowconfigure . 0 -weight 1 + grid columnconfigure . 0 -weight 1 -uniform same + grid columnconfigure . 1 -weight 1 -uniform same + grid .o1 -row 0 -column 0 -sticky nesw -padx 3 -pady 3 + grid .o2 -row 0 -column 1 -sticky nesw -padx 3 -pady 3 + grid .l1 -row 1 -column 0 -sticky ew -padx 3 -pady 3 + grid .l2 -row 1 -column 1 -sticky ew -padx 3 -pady 3 + grid .sx -row 2 -column 0 -columnspan 2 -sticky ew + grid .sy -row 3 -column 0 -columnspan 2 -sticky ew + grid .btn -row 4 -column 0 -columnspan 2 -sticky ew +} + + +proc pbuffer::display { } { + pbuffer_cb .pbuf + .o2 postredisplay +} + + +# This is called when mouse button 1 is pressed and moved in either of +# the OpenGL windows. +proc pbuffer::motion_event { width height x y } { + .sx set [setXrot [expr 360.0 * $y / $height]] + .sy set [setYrot [expr 360.0 * ($width - $x) / $width]] + + .o1 postredisplay + .pbuf postredisplay +} + +# This is called when a slider is changed. +proc pbuffer::setAngle {axis value} { + global xAngle yAngle zAngle + + switch -exact $axis { + x {setXrot $value + setXrot $value} + y {setYrot $value + setYrot $value} + } + + .o1 postredisplay + .pbuf postredisplay +} + +# Execution starts here! +if { [info script] == $argv0 } { + ::pbuffer::setup +} diff --git a/ng/Togl2.1/pkgIndex.tcl.in b/ng/Togl2.1/pkgIndex.tcl.in new file mode 100644 index 00000000..af071e36 --- /dev/null +++ b/ng/Togl2.1/pkgIndex.tcl.in @@ -0,0 +1,5 @@ +# +# Tcl package index file +# +package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \ + [list load [file join $dir @PKG_LIB_FILE@]] diff --git a/ng/Togl2.1/stereo.c b/ng/Togl2.1/stereo.c new file mode 100644 index 00000000..99bd22f2 --- /dev/null +++ b/ng/Togl2.1/stereo.c @@ -0,0 +1,343 @@ +/* $Id: stereo.c,v 1.14 2009/02/07 07:04:50 gregcouch Exp $ */ + +/* + * Togl - a Tk OpenGL widget + * Copyright (C) 1996-1997 Brian Paul and Ben Bederson + * Copyright (C) 2006-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +#define USE_TOGL_STUBS + +#include "togl.h" +#include +#include + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + + +static Tcl_Obj *toglFont; +static double xAngle = 0, yAngle = 0, zAngle = 0; +static GLfloat CornerX, CornerY, CornerZ; /* where to print strings */ +static double coord_scale = 1; + + + +/* + * Togl widget create callback. This is called by Tcl/Tk when the widget has + * been realized. Here's where one may do some one-time context setup or + * initializations. + */ +static int +create_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + return TCL_OK; +} + + +/* + * Togl widget reshape callback. This is called by Tcl/Tk when the widget + * has been resized. Typically, we call glViewport and perhaps setup the + * projection matrix. + */ +static int +reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + int width; + int height; + float aspect; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + aspect = (float) width / (float) height; + + glViewport(0, 0, width, height); + + /* Set up projection transform */ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-aspect, aspect, -1, 1, 1, 10); + + CornerX = -aspect; + CornerY = -1; + CornerZ = -1.1f; + + /* Change back to model view transform for rendering */ + glMatrixMode(GL_MODELVIEW); + return TCL_OK; +} + + +static void +draw_eye(Togl *togl) +{ + static GLuint cubeList = 0; + + Togl_Clear(togl, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + Togl_Frustum(togl, -1, 1, -1, 1, 1, 10); + glMatrixMode(GL_MODELVIEW); + + if (!cubeList) { + cubeList = glGenLists(1); + glNewList(cubeList, GL_COMPILE); + + /* Front face */ + glBegin(GL_QUADS); + glColor3f(0.4f, 0.8f, 0.4f); /* Green-ish */ + glVertex3f(-1, 1, 1); + glVertex3f(1, 1, 1); + glVertex3f(1, -1, 1); + glVertex3f(-1, -1, 1); + /* Back face */ + glColor3f(0.8f, 0.8f, 0.4f); /* Yellow-ish */ + glVertex3f(-1, 1, -1); + glVertex3f(1, 1, -1); + glVertex3f(1, -1, -1); + glVertex3f(-1, -1, -1); + /* Top side face */ + glColor3f(0.4f, 0.4f, 0.8f); /* Blue-ish */ + glVertex3f(-1, 1, 1); + glVertex3f(1, 1, 1); + glVertex3f(1, 1, -1); + glVertex3f(-1, 1, -1); + /* Bottom side face */ + glColor3f(0.8f, 0.4f, 0.4f); /* Red-ish */ + glVertex3f(-1, -1, 1); + glVertex3f(1, -1, 1); + glVertex3f(1, -1, -1); + glVertex3f(-1, -1, -1); + glEnd(); + + glEndList(); + } + glCallList(cubeList); +} + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +display_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + /* setup modelview matrix */ + glLoadIdentity(); /* Reset modelview matrix to the identity + * matrix */ + glTranslatef(0, 0, -3.0); /* Move the camera back three units */ + glScaled(coord_scale, coord_scale, coord_scale); /* Zoom in and out */ + glRotated(xAngle, 1, 0, 0); /* Rotate by X, Y, and Z angles */ + glRotated(yAngle, 0, 1, 0); + glRotated(zAngle, 0, 0, 1); + + glEnable(GL_DEPTH_TEST); + + if (Togl_NumEyes(togl) == 1) { + /* single eye */ + Togl_DrawBuffer(togl, GL_BACK); + draw_eye(togl); + } else { + /* stereo left eye */ + Togl_DrawBuffer(togl, GL_BACK_LEFT); + draw_eye(togl); + + /* stereo right eye */ + Togl_DrawBuffer(togl, GL_BACK_RIGHT); + draw_eye(togl); + } + + glDisable(GL_DEPTH_TEST); + glLoadIdentity(); + glColor3f(1, 1, 1); + glRasterPos3f(CornerX, CornerY, CornerZ); + Togl_SwapBuffers(togl); + return TCL_OK; +} + + +static int +setXrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[2], &xAngle) != TCL_OK) { + return TCL_ERROR; + } + + /* printf( "before %f ", xAngle ); */ + + if (xAngle < 0) { + xAngle += 360; + } else if (xAngle > 360) { + xAngle -= 360; + } + + /* printf( "after %f \n", xAngle ); */ + + Togl_PostRedisplay(togl); + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + return TCL_OK; +} + + +static int +setYrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[2], &yAngle) != TCL_OK) { + return TCL_ERROR; + } + + if (yAngle < 0) { + yAngle += 360; + } else if (yAngle > 360) { + yAngle -= 360; + } + + Togl_PostRedisplay(togl); + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + return TCL_OK; +} + + +int +getXrot_cb(ClientData clientData, Tcl_Interp *interp, + int argc, CONST84 char *argv[]) +{ + Tcl_SetObjResult(interp, Tcl_NewDoubleObj(xAngle)); + return TCL_OK; +} + + +int +getYrot_cb(ClientData clientData, Tcl_Interp *interp, + int argc, CONST84 char *argv[]) +{ + Tcl_SetObjResult(interp, Tcl_NewDoubleObj(yAngle)); + return TCL_OK; +} + + +static int +coord_scale_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName value"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[2], &coord_scale) != TCL_OK) { + return TCL_ERROR; + } + + Togl_PostRedisplay(togl); + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + return TCL_OK; +} + + +EXTERN int +Stereo_Init(Tcl_Interp *interp) +{ + /* + * Initialize Tcl and the Togl widget module. + */ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL + || Togl_InitStubs(interp, "2.0", 0) == NULL) { + return TCL_ERROR; + } + + /* + * Specify the C callback functions for widget creation, display, + * and reshape. + */ + Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); + + Tcl_CreateObjCommand(interp, "setXrot", setXrot_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "setYrot", setYrot_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "coord_scale", coord_scale_cb, NULL, NULL); + + /* + * Call Tcl_CreateCommand for application-specific commands, if + * they weren't already created by the init procedures called above. + */ + + Tcl_CreateCommand(interp, "getXrot", getXrot_cb, NULL, NULL); + Tcl_CreateCommand(interp, "getYrot", getYrot_cb, NULL, NULL); + + return TCL_OK; +} diff --git a/ng/Togl2.1/stereo.tcl b/ng/Togl2.1/stereo.tcl new file mode 100644 index 00000000..905df5a2 --- /dev/null +++ b/ng/Togl2.1/stereo.tcl @@ -0,0 +1,106 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# $Id: stereo.tcl,v 1.13 2009/03/31 23:21:13 gregcouch Exp $ + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996 Brian Paul and Ben Bederson +# Copyright (C) 2006-2009 Greg Couch +# See the LICENSE file for copyright details. + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/stereo[info sharedlibextension] + +# create ::stereo namespace +namespace eval ::stereo { +} + +variable stereo::mode none +proc stereo::setup {} { + grid rowconfigure . 0 -weight 1 -minsize 200p + grid columnconfigure . 1 -weight 1 -minsize 200p + labelframe .c -text "Stereo mode:" + grid .c -padx 2 -pady 2 -ipadx 2 -ipady 1 + foreach {b} {none native sgioldstyle anaglyph cross-eye wall-eye DTI "row interleaved" "left eye" "right eye" } { + set name [string map {- _ " " _} $b] + radiobutton .c.b$name -text "$b" -command "::stereo::makeGraphics {$b}" -variable stereo::mode -value "$b" + pack .c.b$name -padx 2 -pady 1 -anchor w + } + scale .sx -label {X Axis} -from 0 -to 360 -command {::stereo::setAngle x} -orient horizontal + grid .sx -columnspan 2 -sticky ew + scale .sy -label {Y Axis} -from 0 -to 360 -command {::stereo::setAngle y} -orient horizontal + grid .sy -columnspan 2 -sticky ew + if {[string first IRIX $::tcl_platform(os)] != -1} { + label .irix -justify left -wraplength 250p -text "Use /usr/gfx/setmon or /usr/bin/X11/xsetmon to change video mode for native stereo (eg., 1024x768_120s) or sgioldstyle stereo (eg., str_bot) and back." + grid .irix -sticky new -columnspan 2 + } + button .quit -text Close -command exit + grid .quit -sticky se -columnspan 2 -padx 2 -pady 2 + frame .f -relief groove -borderwidth 2 -bg black + grid .f -row 0 -column 1 -sticky news + bind . {exit} + label .f.error -wraplength 100p -bg black -fg white + ::stereo::makeGraphics $stereo::mode +} + +set stereo::count 0 +set stereo::gwidget "" +proc stereo::makeGraphics {mode} { + incr stereo::count + set name .f.gr$stereo::count + set width 200 + set height 200 + if { [catch { togl $name -width $width -height $height -rgba true -stereo "$mode" -double true -depth true -sharelist main -create create_cb -display display_cb -reshape reshape_cb -eyeseparation 0.05 -convergence 2.0 -stencil true } error] } { + pack forget $stereo::gwidget + .f.error configure -text "$error\n\nMake another choice from the stereo modes on the left." + pack .f.error -expand 1 -fill both + } else { + pack forget .f.error + $name configure -ident main + if { "$stereo::gwidget" != "" } { + destroy $stereo::gwidget + } + set stereo::gwidget $name + pack $name -expand 1 -fill both + bind $name { + ::stereo::motion_event %W \ + [lindex [%W config -width] 4] \ + [lindex [%W config -height] 4] %x %y + } + } +} + +# This is called when mouse button 1 is pressed and moved +proc stereo::motion_event { widget width height x y } { + setXrot $widget [expr 360.0 * $y / $height] + setYrot $widget [expr 360.0 * ($width - $x) / $width] + +# .sx set [expr 360.0 * $y / $height] +# .sy set [expr 360.0 * ($width - $x) / $width] + + .sx set [getXrot] + .sy set [getYrot] +} + +# This is called when a slider is changed. +proc stereo::setAngle {axis value} { + # catch because .f.gr might be a label instead of a Togl widget + catch { + switch -exact $axis { + x {setXrot $stereo::gwidget $value} + y {setYrot $stereo::gwidget $value} + } + } +} + +if { [info script] == $argv0 } { + if { $argc == 1 } { + set stereo::mode [lindex $argv 0] + } + ::stereo::setup +} diff --git a/ng/Togl2.1/tclconfig/install-sh b/ng/Togl2.1/tclconfig/install-sh new file mode 100755 index 00000000..0ff4b6a0 --- /dev/null +++ b/ng/Togl2.1/tclconfig/install-sh @@ -0,0 +1,119 @@ +#!/bin/sh + +# +# install - install a program, script, or datafile +# This comes from X11R5; it is not part of GNU. +# +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" + +instcmd="$mvprog" +chmodcmd="" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +fi + +if [ x"$dst" = x ] +then + echo "install: no destination specified" + exit 1 +fi + + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + +if [ -d $dst ] +then + dst="$dst"/`basename $src` +fi + +# Make a temp file name in the proper directory. + +dstdir=`dirname $dst` +dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + +$doit $instcmd $src $dsttmp + +# and set any options; do chmod last to preserve setuid bits + +if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi +if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi +if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi +if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi + +# Now rename the file to the real destination. + +$doit $rmcmd $dst +$doit $mvcmd $dsttmp $dst + + +exit 0 diff --git a/ng/Togl2.1/tclconfig/tcl.m4 b/ng/Togl2.1/tclconfig/tcl.m4 new file mode 100644 index 00000000..ab07457b --- /dev/null +++ b/ng/Togl2.1/tclconfig/tcl.m4 @@ -0,0 +1,4105 @@ +# tcl.m4 -- +# +# This file provides a set of autoconf macros to help TEA-enable +# a Tcl extension. +# +# Copyright (c) 1999-2000 Ajuba Solutions. +# Copyright (c) 2002-2005 ActiveState Corporation. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: tcl.m4,v 1.12 2009/01/08 04:40:39 gregcouch Exp $ + +AC_PREREQ(2.57) + +dnl TEA extensions pass us the version of TEA they think they +dnl are compatible with (must be set in TEA_INIT below) +dnl TEA_VERSION="3.7" + +# Possible values for key variables defined: +# +# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem') +# TEA_PLATFORM - windows unix +# + +#------------------------------------------------------------------------ +# TEA_PATH_TCLCONFIG -- +# +# Locate the tclConfig.sh file and perform a sanity check on +# the Tcl compile flags +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-tcl=... +# +# Defines the following vars: +# TCL_BIN_DIR Full path to the directory containing +# the tclConfig.sh file +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PATH_TCLCONFIG], [ + dnl TEA specific: Make sure we are initialized + AC_REQUIRE([TEA_INIT]) + # + # Ok, lets find the tcl configuration + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-tcl + # + + if test x"${no_tcl}" = x ; then + # we reset no_tcl in case something fails here + no_tcl=true + AC_ARG_WITH(tcl, + AC_HELP_STRING([--with-tcl], + [directory containing tcl configuration (tclConfig.sh)]), + with_tclconfig=${withval}) + AC_MSG_CHECKING([for Tcl configuration]) + AC_CACHE_VAL(ac_cv_c_tclconfig,[ + + # First check to see if --with-tcl was specified. + if test x"${with_tclconfig}" != x ; then + case ${with_tclconfig} in + */tclConfig.sh ) + if test -f ${with_tclconfig}; then + AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself]) + with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` + fi ;; + esac + if test -f "${with_tclconfig}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` + else + AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) + fi + fi + + # then check for a private Tcl installation + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ../tcl \ + `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ + ../../tcl \ + `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ + ../../../tcl \ + `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + + # on Darwin, check in Framework installation locations + if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ + `ls -d /Library/Frameworks 2>/dev/null` \ + `ls -d /Network/Library/Frameworks 2>/dev/null` \ + `ls -d /System/Library/Frameworks 2>/dev/null` \ + ; do + if test -f "$i/Tcl.framework/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` + break + fi + done + fi + + # TEA specific: on Windows, check in common installation locations + if test "${TEA_PLATFORM}" = "windows" \ + -a x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d C:/Tcl/lib 2>/dev/null` \ + `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ + ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few common install locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few other private locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + ]) + + if test x"${ac_cv_c_tclconfig}" = x ; then + TCL_BIN_DIR="# no Tcl configs found" + AC_MSG_ERROR([Can't find Tcl configuration definitions]) + else + no_tcl= + TCL_BIN_DIR=${ac_cv_c_tclconfig} + AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh]) + fi + fi +]) + +#------------------------------------------------------------------------ +# TEA_PATH_TKCONFIG -- +# +# Locate the tkConfig.sh file +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-tk=... +# +# Defines the following vars: +# TK_BIN_DIR Full path to the directory containing +# the tkConfig.sh file +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PATH_TKCONFIG], [ + # + # Ok, lets find the tk configuration + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-tk + # + + if test x"${no_tk}" = x ; then + # we reset no_tk in case something fails here + no_tk=true + AC_ARG_WITH(tk, + AC_HELP_STRING([--with-tk], + [directory containing tk configuration (tkConfig.sh)]), + with_tkconfig=${withval}) + AC_MSG_CHECKING([for Tk configuration]) + AC_CACHE_VAL(ac_cv_c_tkconfig,[ + + # First check to see if --with-tkconfig was specified. + if test x"${with_tkconfig}" != x ; then + case ${with_tkconfig} in + */tkConfig.sh ) + if test -f ${with_tkconfig}; then + AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself]) + with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'` + fi ;; + esac + if test -f "${with_tkconfig}/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` + else + AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) + fi + fi + + # then check for a private Tk library + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ../tk \ + `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ + ../../tk \ + `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ + ../../../tk \ + `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + + # on Darwin, check in Framework installation locations + if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ + `ls -d /Library/Frameworks 2>/dev/null` \ + `ls -d /Network/Library/Frameworks 2>/dev/null` \ + `ls -d /System/Library/Frameworks 2>/dev/null` \ + ; do + if test -f "$i/Tk.framework/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` + break + fi + done + fi + + # check in a few common install locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + + # TEA specific: on Windows, check in common installation locations + if test "${TEA_PLATFORM}" = "windows" \ + -a x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d C:/Tcl/lib 2>/dev/null` \ + `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ + ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few other private locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + ]) + + if test x"${ac_cv_c_tkconfig}" = x ; then + TK_BIN_DIR="# no Tk configs found" + AC_MSG_ERROR([Can't find Tk configuration definitions]) + else + no_tk= + TK_BIN_DIR=${ac_cv_c_tkconfig} + AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) + fi + fi +]) + +#------------------------------------------------------------------------ +# TEA_LOAD_TCLCONFIG -- +# +# Load the tclConfig.sh file +# +# Arguments: +# +# Requires the following vars to be set: +# TCL_BIN_DIR +# +# Results: +# +# Subst the following vars: +# TCL_BIN_DIR +# TCL_SRC_DIR +# TCL_LIB_FILE +# +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_LOAD_TCLCONFIG], [ + AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) + + if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then + AC_MSG_RESULT([loading]) + . "${TCL_BIN_DIR}/tclConfig.sh" + else + AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) + fi + + # eval is required to do the TCL_DBGX substitution + eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" + eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" + + # If the TCL_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable TCL_LIB_SPEC will be set to the value + # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC + # instead of TCL_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + if test -f "${TCL_BIN_DIR}/Makefile" ; then + TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} + TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} + TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} + elif test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use the libraries + # from the framework at the given location so that linking works + # against Tcl.framework installed in an arbitary location. + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then + for i in "`cd ${TCL_BIN_DIR}; pwd`" \ + "`cd ${TCL_BIN_DIR}/../..; pwd`"; do + if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then + TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" + break + fi + done + fi + if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then + TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" + TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" + fi + ;; + esac + fi + + # eval is required to do the TCL_DBGX substitution + eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" + eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" + eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" + eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" + + AC_SUBST(TCL_VERSION) + AC_SUBST(TCL_BIN_DIR) + AC_SUBST(TCL_SRC_DIR) + + AC_SUBST(TCL_LIB_FILE) + AC_SUBST(TCL_LIB_FLAG) + AC_SUBST(TCL_LIB_SPEC) + + AC_SUBST(TCL_STUB_LIB_FILE) + AC_SUBST(TCL_STUB_LIB_FLAG) + AC_SUBST(TCL_STUB_LIB_SPEC) + + # TEA specific: + AC_SUBST(TCL_LIBS) + AC_SUBST(TCL_DEFS) + AC_SUBST(TCL_EXTRA_CFLAGS) + AC_SUBST(TCL_LD_FLAGS) + AC_SUBST(TCL_SHLIB_LD_LIBS) +]) + +#------------------------------------------------------------------------ +# TEA_LOAD_TKCONFIG -- +# +# Load the tkConfig.sh file +# +# Arguments: +# +# Requires the following vars to be set: +# TK_BIN_DIR +# +# Results: +# +# Sets the following vars that should be in tkConfig.sh: +# TK_BIN_DIR +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_LOAD_TKCONFIG], [ + AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) + + if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then + AC_MSG_RESULT([loading]) + . "${TK_BIN_DIR}/tkConfig.sh" + else + AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) + fi + + # eval is required to do the TK_DBGX substitution + eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" + eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" + + # If the TK_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable TK_LIB_SPEC will be set to the value + # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC + # instead of TK_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + if test -f "${TK_BIN_DIR}/Makefile" ; then + TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} + TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} + TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} + elif test "`uname -s`" = "Darwin"; then + # If Tk was built as a framework, attempt to use the libraries + # from the framework at the given location so that linking works + # against Tk.framework installed in an arbitary location. + case ${TK_DEFS} in + *TK_FRAMEWORK*) + if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then + for i in "`cd ${TK_BIN_DIR}; pwd`" \ + "`cd ${TK_BIN_DIR}/../..; pwd`"; do + if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then + TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" + break + fi + done + fi + if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then + TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" + TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" + fi + ;; + esac + fi + + # eval is required to do the TK_DBGX substitution + eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" + eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" + eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" + eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" + + # TEA specific: Ensure windowingsystem is defined + if test "${TEA_PLATFORM}" = "unix" ; then + case ${TK_DEFS} in + *MAC_OSX_TK*) + AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?]) + TEA_WINDOWINGSYSTEM="aqua" + ;; + *) + TEA_WINDOWINGSYSTEM="x11" + ;; + esac + elif test "${TEA_PLATFORM}" = "windows" ; then + TEA_WINDOWINGSYSTEM="win32" + fi + + AC_SUBST(TK_VERSION) + AC_SUBST(TK_BIN_DIR) + AC_SUBST(TK_SRC_DIR) + + AC_SUBST(TK_LIB_FILE) + AC_SUBST(TK_LIB_FLAG) + AC_SUBST(TK_LIB_SPEC) + + AC_SUBST(TK_STUB_LIB_FILE) + AC_SUBST(TK_STUB_LIB_FLAG) + AC_SUBST(TK_STUB_LIB_SPEC) + + # TEA specific: + AC_SUBST(TK_LIBS) + AC_SUBST(TK_XINCLUDES) +]) + +#------------------------------------------------------------------------ +# TEA_PROG_TCLSH +# Determine the fully qualified path name of the tclsh executable +# in the Tcl build directory or the tclsh installed in a bin +# directory. This macro will correctly determine the name +# of the tclsh executable even if tclsh has not yet been +# built in the build directory. The tclsh found is always +# associated with a tclConfig.sh file. This tclsh should be used +# only for running extension test cases. It should never be +# or generation of files (like pkgIndex.tcl) at build time. +# +# Arguments +# none +# +# Results +# Subst's the following values: +# TCLSH_PROG +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PROG_TCLSH], [ + AC_MSG_CHECKING([for tclsh]) + if test -f "${TCL_BIN_DIR}/Makefile" ; then + # tclConfig.sh is in Tcl build directory + if test "${TEA_PLATFORM}" = "windows"; then + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" + else + TCLSH_PROG="${TCL_BIN_DIR}/tclsh" + fi + else + # tclConfig.sh is in install location + if test "${TEA_PLATFORM}" = "windows"; then + TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" + else + TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" + fi + list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ + `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ + `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" + for i in $list ; do + if test -f "$i/${TCLSH_PROG}" ; then + REAL_TCL_BIN_DIR="`cd "$i"; pwd`/" + break + fi + done + TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" + fi + AC_MSG_RESULT([${TCLSH_PROG}]) + AC_SUBST(TCLSH_PROG) +]) + +#------------------------------------------------------------------------ +# TEA_PROG_WISH +# Determine the fully qualified path name of the wish executable +# in the Tk build directory or the wish installed in a bin +# directory. This macro will correctly determine the name +# of the wish executable even if wish has not yet been +# built in the build directory. The wish found is always +# associated with a tkConfig.sh file. This wish should be used +# only for running extension test cases. It should never be +# or generation of files (like pkgIndex.tcl) at build time. +# +# Arguments +# none +# +# Results +# Subst's the following values: +# WISH_PROG +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PROG_WISH], [ + AC_MSG_CHECKING([for wish]) + if test -f "${TK_BIN_DIR}/Makefile" ; then + # tkConfig.sh is in Tk build directory + if test "${TEA_PLATFORM}" = "windows"; then + WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" + else + WISH_PROG="${TK_BIN_DIR}/wish" + fi + else + # tkConfig.sh is in install location + if test "${TEA_PLATFORM}" = "windows"; then + WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" + else + WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}" + fi + list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \ + `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \ + `ls -d ${TK_PREFIX}/bin 2>/dev/null`" + for i in $list ; do + if test -f "$i/${WISH_PROG}" ; then + REAL_TK_BIN_DIR="`cd "$i"; pwd`/" + break + fi + done + WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}" + fi + AC_MSG_RESULT([${WISH_PROG}]) + AC_SUBST(WISH_PROG) +]) + +#------------------------------------------------------------------------ +# TEA_ENABLE_SHARED -- +# +# Allows the building of shared libraries +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-shared=yes|no +# +# Defines the following vars: +# STATIC_BUILD Used for building import/export libraries +# on Windows. +# +# Sets the following vars: +# SHARED_BUILD Value of 1 or 0 +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_ENABLE_SHARED], [ + AC_MSG_CHECKING([how to build libraries]) + AC_ARG_ENABLE(shared, + AC_HELP_STRING([--enable-shared], + [build and link with shared libraries (default: on)]), + [tcl_ok=$enableval], [tcl_ok=yes]) + + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" ; then + AC_MSG_RESULT([shared]) + SHARED_BUILD=1 + else + AC_MSG_RESULT([static]) + SHARED_BUILD=0 + AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?]) + fi + AC_SUBST(SHARED_BUILD) +]) + +#------------------------------------------------------------------------ +# TEA_ENABLE_THREADS -- +# +# Specify if thread support should be enabled. If "yes" is specified +# as an arg (optional), threads are enabled by default, "no" means +# threads are disabled. "yes" is the default. +# +# TCL_THREADS is checked so that if you are compiling an extension +# against a threaded core, your extension must be compiled threaded +# as well. +# +# Note that it is legal to have a thread enabled extension run in a +# threaded or non-threaded Tcl core, but a non-threaded extension may +# only run in a non-threaded Tcl core. +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-threads +# +# Sets the following vars: +# THREADS_LIBS Thread library(s) +# +# Defines the following vars: +# TCL_THREADS +# _REENTRANT +# _THREAD_SAFE +# +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_ENABLE_THREADS], [ + AC_ARG_ENABLE(threads, + AC_HELP_STRING([--enable-threads], + [build with threads]), + [tcl_ok=$enableval], [tcl_ok=yes]) + + if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then + TCL_THREADS=1 + + if test "${TEA_PLATFORM}" != "windows" ; then + # We are always OK on Windows, so check what this platform wants: + + # USE_THREAD_ALLOC tells us to try the special thread-based + # allocator that significantly reduces lock contention + AC_DEFINE(USE_THREAD_ALLOC, 1, + [Do we want to use the threaded memory allocator?]) + AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) + if test "`uname -s`" = "SunOS" ; then + AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, + [Do we really want to follow the standard? Yes we do!]) + fi + AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) + AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) + if test "$tcl_ok" = "no"; then + # Check a little harder for __pthread_mutex_init in the same + # library, as some systems hide it there until pthread.h is + # defined. We could alternatively do an AC_TRY_COMPILE with + # pthread.h, but that will work with libpthread really doesn't + # exist, like AIX 4.2. [Bug: 4359] + AC_CHECK_LIB(pthread, __pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) + fi + + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthread" + else + AC_CHECK_LIB(pthreads, pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthreads" + else + AC_CHECK_LIB(c, pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) + if test "$tcl_ok" = "no"; then + AC_CHECK_LIB(c_r, pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -pthread" + else + TCL_THREADS=0 + AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled]) + fi + fi + fi + fi + fi + else + TCL_THREADS=0 + fi + # Do checking message here to not mess up interleaved configure output + AC_MSG_CHECKING([for building with threads]) + if test "${TCL_THREADS}" = 1; then + AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) + AC_MSG_RESULT([yes (default)]) + else + AC_MSG_RESULT([no]) + fi + # TCL_THREADS sanity checking. See if our request for building with + # threads is the same as the way Tcl was built. If not, warn the user. + case ${TCL_DEFS} in + *THREADS=1*) + if test "${TCL_THREADS}" = "0"; then + AC_MSG_WARN([ + Building ${PACKAGE_NAME} without threads enabled, but building against Tcl + that IS thread-enabled. It is recommended to use --enable-threads.]) + fi + ;; + *) + if test "${TCL_THREADS}" = "1"; then + AC_MSG_WARN([ + --enable-threads requested, but building against a Tcl that is NOT + thread-enabled. This is an OK configuration that will also run in + a thread-enabled core.]) + fi + ;; + esac + AC_SUBST(TCL_THREADS) +]) + +#------------------------------------------------------------------------ +# TEA_ENABLE_SYMBOLS -- +# +# Specify if debugging symbols should be used. +# Memory (TCL_MEM_DEBUG) debugging can also be enabled. +# +# Arguments: +# none +# +# TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives +# the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted. +# Requires the following vars to be set in the Makefile: +# CFLAGS_DEFAULT +# LDFLAGS_DEFAULT +# +# Results: +# +# Adds the following arguments to configure: +# --enable-symbols +# +# Defines the following vars: +# CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true +# Sets to $(CFLAGS_OPTIMIZE) if false +# LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true +# Sets to $(LDFLAGS_OPTIMIZE) if false +# DBGX Formerly used as debug library extension; +# always blank now. +# +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_ENABLE_SYMBOLS], [ + dnl TEA specific: Make sure we are initialized + AC_REQUIRE([TEA_CONFIG_CFLAGS]) + AC_MSG_CHECKING([for build with symbols]) + AC_ARG_ENABLE(symbols, + AC_HELP_STRING([--enable-symbols], + [build with debugging symbols (default: off)]), + [tcl_ok=$enableval], [tcl_ok=no]) + DBGX="" + if test "$tcl_ok" = "no"; then + CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" + LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" + AC_MSG_RESULT([no]) + else + CFLAGS_DEFAULT="${CFLAGS_DEBUG}" + LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" + if test "$tcl_ok" = "yes"; then + AC_MSG_RESULT([yes (standard debugging)]) + fi + fi + # TEA specific: + if test "${TEA_PLATFORM}" != "windows" ; then + LDFLAGS_DEFAULT="${LDFLAGS}" + fi + AC_SUBST(CFLAGS_DEFAULT) + AC_SUBST(LDFLAGS_DEFAULT) + AC_SUBST(TCL_DBGX) + + if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then + AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) + fi + + if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then + if test "$tcl_ok" = "all"; then + AC_MSG_RESULT([enabled symbols mem debugging]) + else + AC_MSG_RESULT([enabled $tcl_ok debugging]) + fi + fi +]) + +#------------------------------------------------------------------------ +# TEA_ENABLE_LANGINFO -- +# +# Allows use of modern nl_langinfo check for better l10n. +# This is only relevant for Unix. +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-langinfo=yes|no (default is yes) +# +# Defines the following vars: +# HAVE_LANGINFO Triggers use of nl_langinfo if defined. +# +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_ENABLE_LANGINFO], [ + AC_ARG_ENABLE(langinfo, + AC_HELP_STRING([--enable-langinfo], + [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]), + [langinfo_ok=$enableval], [langinfo_ok=yes]) + + HAVE_LANGINFO=0 + if test "$langinfo_ok" = "yes"; then + AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no]) + fi + AC_MSG_CHECKING([whether to use nl_langinfo]) + if test "$langinfo_ok" = "yes"; then + AC_CACHE_VAL(tcl_cv_langinfo_h, [ + AC_TRY_COMPILE([#include ], [nl_langinfo(CODESET);], + [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])]) + AC_MSG_RESULT([$tcl_cv_langinfo_h]) + if test $tcl_cv_langinfo_h = yes; then + AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) + fi + else + AC_MSG_RESULT([$langinfo_ok]) + fi +]) + +#-------------------------------------------------------------------- +# TEA_CONFIG_SYSTEM +# +# Determine what the system is (some things cannot be easily checked +# on a feature-driven basis, alas). This can usually be done via the +# "uname" command, but there are a few systems, like Next, where +# this doesn't work. +# +# Arguments: +# none +# +# Results: +# Defines the following var: +# +# system - System/platform/version identification code. +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_CONFIG_SYSTEM], [ + AC_CACHE_CHECK([system version], tcl_cv_sys_version, [ + # TEA specific: + if test "${TEA_PLATFORM}" = "windows" ; then + tcl_cv_sys_version=windows + elif test -f /usr/lib/NextStep/software_version; then + tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` + else + tcl_cv_sys_version=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then + AC_MSG_WARN([can't find uname command]) + tcl_cv_sys_version=unknown + else + # Special check for weird MP-RAS system (uname returns weird + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then + tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + tcl_cv_sys_version=AIX-`uname -v`.`uname -r` + fi + fi + fi + ]) + system=$tcl_cv_sys_version +]) + +#-------------------------------------------------------------------- +# TEA_CONFIG_CFLAGS +# +# Try to determine the proper flags to pass to the compiler +# for building shared libraries and other such nonsense. +# +# Arguments: +# none +# +# Results: +# +# Defines and substitutes the following vars: +# +# DL_OBJS - Name of the object file that implements dynamic +# loading for Tcl on this system. +# DL_LIBS - Library file(s) to include in tclsh and other base +# applications in order for the "load" command to work. +# LDFLAGS - Flags to pass to the compiler when linking object +# files into an executable application binary such +# as tclsh. +# LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", +# that tell the run-time dynamic linker where to look +# for shared libraries such as libtcl.so. Depends on +# the variable LIB_RUNTIME_DIR in the Makefile. Could +# be the same as CC_SEARCH_FLAGS if ${CC} is used to link. +# CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib", +# that tell the run-time dynamic linker where to look +# for shared libraries such as libtcl.so. Depends on +# the variable LIB_RUNTIME_DIR in the Makefile. +# SHLIB_CFLAGS - Flags to pass to cc when compiling the components +# of a shared library (may request position-independent +# code, among other things). +# SHLIB_LD - Base command to use for combining object files +# into a shared library. +# SHLIB_LD_LIBS - Dependent libraries for the linker to scan when +# creating shared libraries. This symbol typically +# goes at the end of the "ld" commands that build +# shared libraries. The value of the symbol is +# "${LIBS}" if all of the dependent libraries should +# be specified when creating a shared library. If +# dependent libraries should not be specified (as on +# SunOS 4.x, where they cause the link to fail, or in +# general if Tcl and Tk aren't themselves shared +# libraries), then this symbol has an empty string +# as its value. +# SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable +# extensions. An empty string means we don't know how +# to use shared libraries on this platform. +# LIB_SUFFIX - Specifies everything that comes after the "libfoo" +# in a static or shared library name, using the $VERSION variable +# to put the version in the right place. This is used +# by platforms that need non-standard library names. +# Examples: ${VERSION}.so.1.1 on NetBSD, since it needs +# to have a version after the .so, and ${VERSION}.a +# on AIX, since a shared library needs to have +# a .a extension whereas shared objects for loadable +# extensions have a .so extension. Defaults to +# ${VERSION}${SHLIB_SUFFIX}. +# TCL_NEEDS_EXP_FILE - +# 1 means that an export file is needed to link to a +# shared library. +# TCL_EXP_FILE - The name of the installed export / import file which +# should be used to link to the Tcl shared library. +# Empty if Tcl is unshared. +# TCL_BUILD_EXP_FILE - +# The name of the built export / import file which +# should be used to link to the Tcl shared library. +# Empty if Tcl is unshared. +# CFLAGS_DEBUG - +# Flags used when running the compiler in debug mode +# CFLAGS_OPTIMIZE - +# Flags used when running the compiler in optimize mode +# CFLAGS - Additional CFLAGS added as necessary (usually 64-bit) +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_CONFIG_CFLAGS], [ + dnl TEA specific: Make sure we are initialized + AC_REQUIRE([TEA_INIT]) + + # Step 0.a: Enable 64 bit support? + + AC_MSG_CHECKING([if 64bit support is requested]) + AC_ARG_ENABLE(64bit, + AC_HELP_STRING([--enable-64bit], + [enable 64bit support (default: off)]), + [do64bit=$enableval], [do64bit=no]) + AC_MSG_RESULT([$do64bit]) + + # Step 0.b: Enable Solaris 64 bit VIS support? + + AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) + AC_ARG_ENABLE(64bit-vis, + AC_HELP_STRING([--enable-64bit-vis], + [enable 64bit Sparc VIS support (default: off)]), + [do64bitVIS=$enableval], [do64bitVIS=no]) + AC_MSG_RESULT([$do64bitVIS]) + # Force 64bit on with VIS + AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes]) + + # Step 0.c: Check if visibility support is available. Do this here so + # that platform specific alternatives can be used below if this fails. + + AC_CACHE_CHECK([if compiler supports visibility "hidden"], + tcl_cv_cc_visibility_hidden, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + AC_TRY_LINK([ + extern __attribute__((__visibility__("hidden"))) void f(void); + void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes, + tcl_cv_cc_visibility_hidden=no) + CFLAGS=$hold_cflags]) + AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ + AC_DEFINE(MODULE_SCOPE, + [extern __attribute__((__visibility__("hidden")))], + [Compiler support for module scope symbols]) + ]) + + # Step 0.d: Disable -rpath support? + + AC_MSG_CHECKING([if rpath support is requested]) + AC_ARG_ENABLE(rpath, + AC_HELP_STRING([--disable-rpath], + [disable rpath support (default: on)]), + [doRpath=$enableval], [doRpath=yes]) + AC_MSG_RESULT([$doRpath]) + + # TEA specific: Cross-compiling options for Windows/CE builds? + + AS_IF([test "${TEA_PLATFORM}" = windows], [ + AC_MSG_CHECKING([if Windows/CE build is requested]) + AC_ARG_ENABLE(wince, + AC_HELP_STRING([--enable-wince], + [enable Win/CE support (where applicable)]), + [doWince=$enableval], [doWince=no]) + AC_MSG_RESULT([$doWince]) + ]) + + # Step 1: set the variable "system" to hold the name and version number + # for the system. + + TEA_CONFIG_SYSTEM + + # Step 2: check for existence of -ldl library. This is needed because + # Linux can use either -ldl or -ldld for dynamic loading. + + AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) + + # Require ranlib early so we can override it in special cases below. + + AC_REQUIRE([AC_PROG_RANLIB]) + + # Step 3: set configuration options based on system name and version. + # This is similar to Tcl's unix/tcl.m4 except that we've added a + # "windows" case. + + do64bit_ok=no + LDFLAGS_ORIG="$LDFLAGS" + # When ld needs options to work in 64-bit mode, put them in + # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] + # is disabled by the user. [Bug 1016796] + LDFLAGS_ARCH="" + TCL_EXPORT_FILE_SUFFIX="" + UNSHARED_LIB_SUFFIX="" + # TEA specific: use PACKAGE_VERSION instead of VERSION + TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' + ECHO_VERSION='`echo ${PACKAGE_VERSION}`' + TCL_LIB_VERSIONS_OK=ok + CFLAGS_DEBUG=-g + CFLAGS_OPTIMIZE=-O + AS_IF([test "$GCC" = yes], [ + # TEA specific: + CFLAGS_OPTIMIZE=-O2 + CFLAGS_WARNING="-Wall -Wno-implicit-int" + ], [CFLAGS_WARNING=""]) + TCL_NEEDS_EXP_FILE=0 + TCL_BUILD_EXP_FILE="" + TCL_EXP_FILE="" +dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. +dnl AC_CHECK_TOOL(AR, ar) + AC_CHECK_PROG(AR, ar, ar) + STLIB_LD='${AR} cr' + LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" + case $system in + # TEA specific: + windows) + # This is a 2-stage check to make sure we have the 64-bit SDK + # We have to know where the SDK is installed. + # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs + # MACHINE is IX86 for LINK, but this is used by the manifest, + # which requires x86|amd64|ia64. + MACHINE="X86" + if test "$do64bit" != "no" ; then + if test "x${MSSDK}x" = "xx" ; then + MSSDK="C:/Progra~1/Microsoft Platform SDK" + fi + MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` + PATH64="" + case "$do64bit" in + amd64|x64|yes) + MACHINE="AMD64" ; # default to AMD64 64-bit build + PATH64="${MSSDK}/Bin/Win64/x86/AMD64" + ;; + ia64) + MACHINE="IA64" + PATH64="${MSSDK}/Bin/Win64" + ;; + esac + if test ! -d "${PATH64}" ; then + AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode]) + AC_MSG_WARN([Ensure latest Platform SDK is installed]) + do64bit="no" + else + AC_MSG_RESULT([ Using 64-bit $MACHINE mode]) + do64bit_ok="yes" + fi + fi + + if test "$doWince" != "no" ; then + if test "$do64bit" != "no" ; then + AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible]) + fi + if test "$GCC" = "yes" ; then + AC_MSG_ERROR([Windows/CE and GCC builds incompatible]) + fi + TEA_PATH_CELIB + # Set defaults for common evc4/PPC2003 setup + # Currently Tcl requires 300+, possibly 420+ for sockets + CEVERSION=420; # could be 211 300 301 400 420 ... + TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... + ARCH=ARM; # could be ARM MIPS X86EM ... + PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" + if test "$doWince" != "yes"; then + # If !yes then the user specified something + # Reset ARCH to allow user to skip specifying it + ARCH= + eval `echo $doWince | awk -F, '{ \ + if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \ + if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ + if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \ + if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \ + if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \ + }'` + if test "x${ARCH}" = "x" ; then + ARCH=$TARGETCPU; + fi + fi + OSVERSION=WCE$CEVERSION; + if test "x${WCEROOT}" = "x" ; then + WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" + if test ! -d "${WCEROOT}" ; then + WCEROOT="C:/Program Files/Microsoft eMbedded Tools" + fi + fi + if test "x${SDKROOT}" = "x" ; then + SDKROOT="C:/Program Files/Windows CE Tools" + if test ! -d "${SDKROOT}" ; then + SDKROOT="C:/Windows CE Tools" + fi + fi + WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` + SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` + if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ + -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then + AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]]) + doWince="no" + else + # We could PATH_NOSPACE these, but that's not important, + # as long as we quote them when used. + CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" + if test -d "${CEINCLUDE}/${TARGETCPU}" ; then + CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" + fi + CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" + fi + fi + + if test "$GCC" != "yes" ; then + if test "${SHARED_BUILD}" = "0" ; then + runtime=-MT + else + runtime=-MD + fi + + if test "$do64bit" != "no" ; then + # All this magic is necessary for the Win64 SDK RC1 - hobbs + CC="\"${PATH64}/cl.exe\"" + CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" + RC="\"${MSSDK}/bin/rc.exe\"" + lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + LINKBIN="\"${PATH64}/link.exe\"" + CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" + # Avoid 'unresolved external symbol __security_cookie' + # errors, c.f. http://support.microsoft.com/?id=894573 + TEA_ADD_LIBS([bufferoverflowU.lib]) + elif test "$doWince" != "no" ; then + CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" + if test "${TARGETCPU}" = "X86"; then + CC="\"${CEBINROOT}/cl.exe\"" + else + CC="\"${CEBINROOT}/cl${ARCH}.exe\"" + fi + CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" + RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" + arch=`echo ${ARCH} | awk '{print tolower([$]0)}'` + defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" + if test "${SHARED_BUILD}" = "1" ; then + # Static CE builds require static celib as well + defs="${defs} _DLL" + fi + for i in $defs ; do + AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i) + done + AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version]) + AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version]) + CFLAGS_DEBUG="-nologo -Zi -Od" + CFLAGS_OPTIMIZE="-nologo -Ox" + lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` + lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" + LINKBIN="\"${CEBINROOT}/link.exe\"" + AC_SUBST(CELIB_DIR) + else + RC="rc" + lflags="-nologo" + LINKBIN="link" + CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" + CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" + fi + fi + + if test "$GCC" = "yes"; then + # mingw gcc mode + RC="windres" + CFLAGS_DEBUG="-g" + CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" + SHLIB_LD="$CC -shared" + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" + LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" + else + SHLIB_LD="${LINKBIN} -dll ${lflags}" + # link -lib only works when -lib is the first arg + STLIB_LD="${LINKBIN} -lib ${lflags}" + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' + PATHTYPE=-w + # For information on what debugtype is most useful, see: + # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp + # and also + # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx + # This essentially turns it all on. + LDFLAGS_DEBUG="-debug -debugtype:cv" + LDFLAGS_OPTIMIZE="-release" + if test "$doWince" != "no" ; then + LDFLAGS_CONSOLE="-link ${lflags}" + LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} + else + LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" + LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" + fi + fi + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dll" + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' + + TCL_LIB_VERSIONS_OK=nodots + # Bogus to avoid getting this turned off + DL_OBJS="tclLoadNone.obj" + ;; + AIX-*) + AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ + # AIX requires the _r compiler when gcc isn't being used + case "${CC}" in + *_r) + # ok ... + ;; + *) + CC=${CC}_r + ;; + esac + AC_MSG_RESULT([Using $CC for compiling with threads]) + ]) + LIBS="$LIBS -lc" + SHLIB_CFLAGS="" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + DL_OBJS="tclLoadDl.o" + LD_LIBRARY_PATH_VAR="LIBPATH" + + # Check to enable 64-bit flags for compiler/linker on AIX 4+ + AS_IF([test "$do64bit" = yes -a "`uname -v`" -gt 3], [ + AS_IF([test "$GCC" = yes], [ + AC_MSG_WARN([64bit mode not supported with GCC on $system]) + ], [ + do64bit_ok=yes + CFLAGS="$CFLAGS -q64" + LDFLAGS_ARCH="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LD_FLAGS="-b64" + ]) + ]) + + AS_IF([test "`uname -m`" = ia64], [ + # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + # AIX-5 has dl* in libc.so + DL_LIBS="" + AS_IF([test "$GCC" = yes], [ + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + ], [ + CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' + ]) + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + ], [ + AS_IF([test "$GCC" = yes], [SHLIB_LD='${CC} -shared'], [ + SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" + ]) + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + TCL_NEEDS_EXP_FILE=1 + # TEA specific: use PACKAGE_VERSION instead of VERSION + TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' + ]) + + # AIX v<=4.1 has some different flags than 4.2+ + AS_IF([test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4], [ + AC_LIBOBJ([tclLoadAix]) + DL_LIBS="-lld" + ]) + + # On AIX <=v4 systems, libbsd.a has to be linked in to support + # non-blocking file IO. This library has to be linked in after + # the MATH_LIBS or it breaks the pow() function. The way to + # insure proper sequencing, is to add it to the tail of MATH_LIBS. + # This library also supplies gettimeofday. + # + # AIX does not have a timezone field in struct tm. When the AIX + # bsd library is used, the timezone global and the gettimeofday + # methods are to be avoided for timezone deduction instead, we + # deduce the timezone by comparing the localtime result on a + # known GMT value. + + AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) + AS_IF([test $libbsd = yes], [ + MATH_LIBS="$MATH_LIBS -lbsd" + AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?]) + ]) + ;; + BeOS*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -nostart' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + + #----------------------------------------------------------- + # Check for inet_ntoa in -lbind, for BeOS (which also needs + # -lsocket, even if the network functions are in -lnet which + # is always linked to, for compatibility. + #----------------------------------------------------------- + AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"]) + ;; + BSD/OS-2.1*|BSD/OS-3*) + SHLIB_CFLAGS="" + SHLIB_LD="shlicc -r" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + BSD/OS-4.*) + SHLIB_CFLAGS="-export-dynamic -fPIC" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -export-dynamic" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + dgux*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + HP-UX-*.11.*) + # Use updated header definitions where possible + AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) + # TEA specific: Needed by Tcl, but not most extensions + #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) + #LIBS="$LIBS -lxnet" # Use the XOPEN network library + + AS_IF([test "`uname -m`" = ia64], [ + SHLIB_SUFFIX=".so" + # Use newer C++ library for C++ extensions + #if test "$GCC" != "yes" ; then + # CPPFLAGS="-AA" + #fi + ], [ + SHLIB_SUFFIX=".sl" + ]) + AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) + AS_IF([test "$tcl_ok" = yes], [ + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" + SHLIB_LD_LIBS='${LIBS}' + DL_OBJS="tclLoadShl.o" + DL_LIBS="-ldld" + LDFLAGS="$LDFLAGS -Wl,-E" + CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_LIBRARY_PATH_VAR="SHLIB_PATH" + ]) + AS_IF([test "$GCC" = yes], [ + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + ]) + + # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc + #CFLAGS="$CFLAGS +DAportable" + + # Check to enable 64-bit flags for compiler/linker + AS_IF([test "$do64bit" = "yes"], [ + AS_IF([test "$GCC" = yes], [ + case `${CC} -dumpmachine` in + hppa64*) + # 64-bit gcc in use. Fix flags for GNU ld. + do64bit_ok=yes + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + ;; + *) + AC_MSG_WARN([64bit mode not supported with GCC on $system]) + ;; + esac + ], [ + do64bit_ok=yes + CFLAGS="$CFLAGS +DD64" + LDFLAGS_ARCH="+DD64" + ]) + ]) ;; + HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) + SHLIB_SUFFIX=".sl" + AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) + AS_IF([test "$tcl_ok" = yes], [ + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" + SHLIB_LD_LIBS="" + DL_OBJS="tclLoadShl.o" + DL_LIBS="-ldld" + LDFLAGS="$LDFLAGS -Wl,-E" + CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_LIBRARY_PATH_VAR="SHLIB_PATH" + ]) ;; + IRIX-5.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) + ;; + IRIX-6.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -n32 -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) + AS_IF([test "$GCC" = yes], [ + CFLAGS="$CFLAGS -mabi=n32" + LDFLAGS="$LDFLAGS -mabi=n32" + ], [ + case $system in + IRIX-6.3) + # Use to build 6.2 compatible binaries on 6.3. + CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" + ;; + *) + CFLAGS="$CFLAGS -n32" + ;; + esac + LDFLAGS="$LDFLAGS -n32" + ]) + ;; + IRIX64-6.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -n32 -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) + + # Check to enable 64-bit flags for compiler/linker + + AS_IF([test "$do64bit" = yes], [ + AS_IF([test "$GCC" = yes], [ + AC_MSG_WARN([64bit mode not supported by gcc]) + ], [ + do64bit_ok=yes + SHLIB_LD="ld -64 -shared -rdata_shared" + CFLAGS="$CFLAGS -64" + LDFLAGS_ARCH="-64" + ]) + ]) + ;; + Linux*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + # TEA specific: + CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" + # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings + # when you inline the string and math operations. Turn this off to + # get rid of the warnings. + #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) + AS_IF([test $do64bit = yes], [ + AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [ + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -m64" + AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no) + CFLAGS=$hold_cflags]) + AS_IF([test $tcl_cv_cc_m64 = yes], [ + CFLAGS="$CFLAGS -m64" + do64bit_ok=yes + ]) + ]) + + # The combo of gcc + glibc has a bug related to inlining of + # functions like strtod(). The -fno-builtin flag should address + # this problem but it does not work. The -fno-inline flag is kind + # of overkill but it works. Disable inlining only when one of the + # files in compat/*.c is being linked in. + + AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"]) + + ;; + GNU*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + SHLIB_LD='${CC} -shared' + DL_OBJS="" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) + ;; + Lynx*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + CFLAGS_OPTIMIZE=-02 + SHLIB_LD='${CC} -shared' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-mshared -ldl" + LD_FLAGS="-Wl,--export-dynamic" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) + ;; + MP-RAS-02*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + MP-RAS-*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,-Bexport" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + NetBSD-1.*|FreeBSD-[[1-2]].*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) + AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ + AC_EGREP_CPP(yes, [ +#ifdef __ELF__ + yes +#endif + ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) + AS_IF([test $tcl_cv_ld_elf = yes], [ + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + ], [ + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + ]) + + # Ancient FreeBSD doesn't handle version numbers with dots. + + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + OpenBSD-*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ + AC_EGREP_CPP(yes, [ +#ifdef __ELF__ + yes +#endif + ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) + AS_IF([test $tcl_cv_ld_elf = yes], [ + LDFLAGS=-Wl,-export-dynamic + ], [LDFLAGS=""]) + + # OpenBSD doesn't do version numbers with dots. + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + NetBSD-*|FreeBSD-*) + # FreeBSD 3.* and greater have ELF. + # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="$LDFLAGS -export-dynamic" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + AS_IF([test "${TCL_THREADS}" = "1"], [ + # The -pthread needs to go in the CFLAGS, not LIBS + LIBS=`echo $LIBS | sed s/-pthread//` + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + ]) + case $system in + FreeBSD-3.*) + # FreeBSD-3 doesn't handle version numbers with dots. + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + TCL_LIB_VERSIONS_OK=nodots + ;; + esac + ;; + Darwin-*) + CFLAGS_OPTIMIZE="-Os" + SHLIB_CFLAGS="-fno-common" + # To avoid discrepancies between what headers configure sees during + # preprocessing tests and compiling tests, move any -isysroot and + # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: + CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ + if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`" + CFLAGS="`echo " ${CFLAGS}" | \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ + if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`" + AS_IF([test $do64bit = yes], [ + case `arch` in + ppc) + AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag], + tcl_cv_cc_arch_ppc64, [ + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes, + tcl_cv_cc_arch_ppc64=no) + CFLAGS=$hold_cflags]) + AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [ + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + do64bit_ok=yes + ]);; + i386) + AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag], + tcl_cv_cc_arch_x86_64, [ + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch x86_64" + AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes, + tcl_cv_cc_arch_x86_64=no) + CFLAGS=$hold_cflags]) + AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [ + CFLAGS="$CFLAGS -arch x86_64" + do64bit_ok=yes + ]);; + *) + AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);; + esac + ], [ + # Check for combined 32-bit and 64-bit fat build + AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ + && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [ + fat_32_64=yes]) + ]) + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS + SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' + AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" + AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) + LDFLAGS=$hold_ldflags]) + AS_IF([test $tcl_cv_ld_single_module = yes], [ + SHLIB_LD="${SHLIB_LD} -Wl,-single_module" + ]) + # TEA specific: link shlib with current and compatiblity version flags + vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` + SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dylib" + DL_OBJS="tclLoadDyld.o" + DL_LIBS="" + # Don't use -prebind when building for Mac OS X 10.4 or later only: + AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ + "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [ + LDFLAGS="$LDFLAGS -prebind"]) + LDFLAGS="$LDFLAGS -headerpad_max_install_names" + AC_CACHE_CHECK([if ld accepts -search_paths_first flag], + tcl_cv_ld_search_paths_first, [ + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, + tcl_cv_ld_search_paths_first=no) + LDFLAGS=$hold_ldflags]) + AS_IF([test $tcl_cv_ld_search_paths_first = yes], [ + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + ]) + AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ + AC_DEFINE(MODULE_SCOPE, [__private_extern__], + [Compiler support for module scope symbols]) + ]) + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" + # TEA specific: for combined 32 & 64 bit fat builds of Tk + # extensions, verify that 64-bit build is possible. + AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [ + AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [ + AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [ + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' + done + CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" + LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" + AC_TRY_LINK([#include ], [XrmInitialize();], + tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no) + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="$hold_'$v'"' + done]) + ]) + # remove 64-bit arch flags from CFLAGS et al. if configuration + # does not support 64-bit. + AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua -o "$tcl_cv_lib_x11_64" = no], [ + AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags]) + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' + done]) + ]) + ;; + NEXTSTEP-*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -nostdlib -r' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadNext.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OS/390-*) + CFLAGS_OPTIMIZE="" # Optimizer is buggy + AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h + [Should OS/390 do the right thing with sockets?]) + ;; + OSF1-1.0|OSF1-1.1|OSF1-1.2) + # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 + SHLIB_CFLAGS="" + # Hack: make package name same as library name + SHLIB_LD='ld -R -export $@:' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadOSF.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-1.*) + # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 + SHLIB_CFLAGS="-fPIC" + AS_IF([test "$SHARED_BUILD" = 1], [SHLIB_LD="ld -shared"], [ + SHLIB_LD="ld -non_shared" + ]) + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-V*) + # Digital OSF/1 + SHLIB_CFLAGS="" + AS_IF([test "$SHARED_BUILD" = 1], [ + SHLIB_LD='${CC} -shared' + ], [ + SHLIB_LD='${CC} -non_shared' + ]) + SHLIB_LD_LIBS="${LIBS}" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) + AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [ + CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"]) + # see pthread_intro(3) for pthread support on osf1, k.furukawa + AS_IF([test "${TCL_THREADS}" = 1], [ + CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" + CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" + LIBS=`echo $LIBS | sed s/-lpthreads//` + AS_IF([test "$GCC" = yes], [ + LIBS="$LIBS -lpthread -lmach -lexc" + ], [ + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + ]) + ]) + ;; + QNX-6*) + # QNX RTP + # This may work for all QNX, but it was only reported for v6. + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + # dlopen is in -lc on QNX + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SCO_SV-3.2*) + # Note, dlopen is available only on SCO 3.2.5 and greater. However, + # this test works, since "uname -s" was non-standard in 3.2.4 and + # below. + AS_IF([test "$GCC" = yes], [ + SHLIB_CFLAGS="-fPIC -melf" + LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" + ], [ + SHLIB_CFLAGS="-Kpic -belf" + LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" + ]) + SHLIB_LD="ld -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SINIX*5.4*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SunOS-4*) + SHLIB_CFLAGS="-PIC" + SHLIB_LD="ld" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + + # SunOS can't handle version numbers with dots in them in library + # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it + # requires an extra version number at the end of .so file names. + # So, the library has to have a name like libtcl75.so.1.0 + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + SunOS-5.[[0-6]]) + # Careful to not let 5.10+ fall into this case + + # Note: If _REENTRANT isn't defined, then Solaris + # won't define thread-safe library routines. + + AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) + AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, + [Do we really want to follow the standard? Yes we do!]) + + SHLIB_CFLAGS="-KPIC" + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + AS_IF([test "$GCC" = yes], [ + SHLIB_LD='${CC} -shared' + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + ], [ + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + ]) + ;; + SunOS-5*) + # Note: If _REENTRANT isn't defined, then Solaris + # won't define thread-safe library routines. + + AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) + AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, + [Do we really want to follow the standard? Yes we do!]) + + SHLIB_CFLAGS="-KPIC" + + # Check to enable 64-bit flags for compiler/linker + AS_IF([test "$do64bit" = yes], [ + arch=`isainfo` + AS_IF([test "$arch" = "sparcv9 sparc"], [ + AS_IF([test "$GCC" = yes], [ + AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [ + AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) + ], [ + do64bit_ok=yes + CFLAGS="$CFLAGS -m64 -mcpu=v9" + LDFLAGS="$LDFLAGS -m64 -mcpu=v9" + SHLIB_CFLAGS="-fPIC" + ]) + ], [ + do64bit_ok=yes + AS_IF([test "$do64bitVIS" = yes], [ + CFLAGS="$CFLAGS -xarch=v9a" + LDFLAGS_ARCH="-xarch=v9a" + ], [ + CFLAGS="$CFLAGS -xarch=v9" + LDFLAGS_ARCH="-xarch=v9" + ]) + # Solaris 64 uses this as well + #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" + ]) + ], [AS_IF([test "$arch" = "amd64 i386"], [ + AS_IF([test "$GCC" = yes], [ + case $system in + SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) + do64bit_ok=yes + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + AC_MSG_WARN([64bit mode not supported with GCC on $system]);; + esac + ], [ + do64bit_ok=yes + case $system in + SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + CFLAGS="$CFLAGS -xarch=amd64" + LDFLAGS="$LDFLAGS -xarch=amd64";; + esac + ]) + ], [AC_MSG_WARN([64bit mode not supported for $arch])])]) + ]) + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + AS_IF([test "$GCC" = yes], [ + SHLIB_LD='${CC} -shared' + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + AS_IF([test "$do64bit_ok" = yes], [ + AS_IF([test "$arch" = "sparcv9 sparc"], [ + # We need to specify -static-libgcc or we need to + # add the path to the sparv9 libgcc. + # JH: static-libgcc is necessary for core Tcl, but may + # not be necessary for extensions. + SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" + # for finding sparcv9 libgcc, get the regular libgcc + # path, remove so name and append 'sparcv9' + #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." + #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + ], [AS_IF([test "$arch" = "amd64 i386"], [ + # JH: static-libgcc is necessary for core Tcl, but may + # not be necessary for extensions. + SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" + ])]) + ]) + ], [ + case $system in + SunOS-5.[[1-9]][[0-9]]*) + SHLIB_LD='${CC} -G -z text ${LDFLAGS}';; + *) + SHLIB_LD='/usr/ccs/bin/ld -G -z text';; + esac + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + ]) + ;; + UNIX_SV* | UnixWare-5*) + SHLIB_CFLAGS="-KPIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers + # that don't grok the -Bexport option. Test that it does. + AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [ + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-Bexport" + AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no) + LDFLAGS=$hold_ldflags]) + AS_IF([test $tcl_cv_ld_Bexport = yes], [ + LDFLAGS="$LDFLAGS -Wl,-Bexport" + ]) + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + esac + + AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [ + AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) + ]) + +dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so +dnl # until the end of configure, as configure's compile and link tests use +dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's +dnl # preprocessing tests use only CPPFLAGS. + AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""]) + + # Step 4: disable dynamic loading if requested via a command-line switch. + + AC_ARG_ENABLE(load, + AC_HELP_STRING([--enable-load], + [allow dynamic loading and "load" command (default: on)]), + [tcl_ok=$enableval], [tcl_ok=yes]) + AS_IF([test "$tcl_ok" = no], [DL_OBJS=""]) + + AS_IF([test "x$DL_OBJS" != x], [BUILD_DLTEST="\$(DLTEST_TARGETS)"], [ + AC_MSG_WARN([Can't figure out how to do dynamic loading or shared libraries on this system.]) + SHLIB_CFLAGS="" + SHLIB_LD="" + SHLIB_SUFFIX="" + DL_OBJS="tclLoadNone.o" + DL_LIBS="" + LDFLAGS="$LDFLAGS_ORIG" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + BUILD_DLTEST="" + ]) + LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" + + # If we're running gcc, then change the C flags for compiling shared + # libraries to the right flags for gcc, instead of those for the + # standard manufacturer compiler. + + AS_IF([test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes], [ + case $system in + AIX-*) ;; + BSD/OS*) ;; + IRIX*) ;; + NetBSD-*|FreeBSD-*) ;; + Darwin-*) ;; + SCO_SV-3.2*) ;; + *) SHLIB_CFLAGS="-fPIC" ;; + esac]) + + AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [ + # TEA specific: use PACKAGE_VERSION instead of VERSION + SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}']) + AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ + # TEA specific: use PACKAGE_VERSION instead of VERSION + UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a']) + + AC_SUBST(DL_LIBS) + + AC_SUBST(CFLAGS_DEBUG) + AC_SUBST(CFLAGS_OPTIMIZE) + AC_SUBST(CFLAGS_WARNING) + + AC_SUBST(STLIB_LD) + AC_SUBST(SHLIB_LD) + + AC_SUBST(SHLIB_LD_LIBS) + AC_SUBST(SHLIB_CFLAGS) + + AC_SUBST(LD_LIBRARY_PATH_VAR) + + # These must be called after we do the basic CFLAGS checks and + # verify any possible 64-bit or similar switches are necessary + TEA_TCL_EARLY_FLAGS + TEA_TCL_64BIT_FLAGS +]) + +#-------------------------------------------------------------------- +# TEA_SERIAL_PORT +# +# Determine which interface to use to talk to the serial port. +# Note that #include lines must begin in leftmost column for +# some compilers to recognize them as preprocessor directives, +# and some build environments have stdin not pointing at a +# pseudo-terminal (usually /dev/null instead.) +# +# Arguments: +# none +# +# Results: +# +# Defines only one of the following vars: +# HAVE_SYS_MODEM_H +# USE_TERMIOS +# USE_TERMIO +# USE_SGTTY +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_SERIAL_PORT], [ + AC_CHECK_HEADERS(sys/modem.h) + AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [ + AC_TRY_RUN([ +#include + +int main() { + struct termios t; + if (tcgetattr(0, &t) == 0) { + cfsetospeed(&t, 0); + t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; +}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) + if test $tcl_cv_api_serial = no ; then + AC_TRY_RUN([ +#include + +int main() { + struct termio t; + if (ioctl(0, TCGETA, &t) == 0) { + t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; +}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) + fi + if test $tcl_cv_api_serial = no ; then + AC_TRY_RUN([ +#include + +int main() { + struct sgttyb t; + if (ioctl(0, TIOCGETP, &t) == 0) { + t.sg_ospeed = 0; + t.sg_flags |= ODDP | EVENP | RAW; + return 0; + } + return 1; +}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no) + fi + if test $tcl_cv_api_serial = no ; then + AC_TRY_RUN([ +#include +#include + +int main() { + struct termios t; + if (tcgetattr(0, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + cfsetospeed(&t, 0); + t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; +}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) + fi + if test $tcl_cv_api_serial = no; then + AC_TRY_RUN([ +#include +#include + +int main() { + struct termio t; + if (ioctl(0, TCGETA, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; + }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) + fi + if test $tcl_cv_api_serial = no; then + AC_TRY_RUN([ +#include +#include + +int main() { + struct sgttyb t; + if (ioctl(0, TIOCGETP, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + t.sg_ospeed = 0; + t.sg_flags |= ODDP | EVENP | RAW; + return 0; + } + return 1; +}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) + fi]) + case $tcl_cv_api_serial in + termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);; + termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);; + sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);; + esac +]) + +#-------------------------------------------------------------------- +# TEA_MISSING_POSIX_HEADERS +# +# Supply substitutes for missing POSIX header files. Special +# notes: +# - stdlib.h doesn't define strtol, strtoul, or +# strtod insome versions of SunOS +# - some versions of string.h don't declare procedures such +# as strstr +# +# Arguments: +# none +# +# Results: +# +# Defines some of the following vars: +# NO_DIRENT_H +# NO_ERRNO_H +# NO_VALUES_H +# HAVE_LIMITS_H or NO_LIMITS_H +# NO_STDLIB_H +# NO_STRING_H +# NO_SYS_WAIT_H +# NO_DLFCN_H +# HAVE_SYS_PARAM_H +# +# HAVE_STRING_H ? +# +# tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and +# CHECK on limits.h +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [ + AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [ + AC_TRY_LINK([#include +#include ], [ +#ifndef _POSIX_SOURCE +# ifdef __Lynx__ + /* + * Generate compilation error to make the test fail: Lynx headers + * are only valid if really in the POSIX environment. + */ + + missing_procedure(); +# endif +#endif +DIR *d; +struct dirent *entryPtr; +char *p; +d = opendir("foobar"); +entryPtr = readdir(d); +p = entryPtr->d_name; +closedir(d); +], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)]) + + if test $tcl_cv_dirent_h = no; then + AC_DEFINE(NO_DIRENT_H, 1, [Do we have ?]) + fi + + # TEA specific: + AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(limits.h, + [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have ?])], + [AC_DEFINE(NO_LIMITS_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) + AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) + AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) + AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) + if test $tcl_ok = 0; then + AC_DEFINE(NO_STDLIB_H, 1, [Do we have ?]) + fi + AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) + AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) + AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) + + # See also memmove check below for a place where NO_STRING_H can be + # set and why. + + if test $tcl_ok = 0; then + AC_DEFINE(NO_STRING_H, 1, [Do we have ?]) + fi + + AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have ?])]) + + # OS/390 lacks sys/param.h (and doesn't need it, by chance). + AC_HAVE_HEADERS(sys/param.h) +]) + +#-------------------------------------------------------------------- +# TEA_PATH_X +# +# Locate the X11 header files and the X11 library archive. Try +# the ac_path_x macro first, but if it doesn't find the X stuff +# (e.g. because there's no xmkmf program) then check through +# a list of possible directories. Under some conditions the +# autoconf macro will return an include directory that contains +# no include files, so double-check its result just to be safe. +# +# This should be called after TEA_CONFIG_CFLAGS as setting the +# LIBS line can confuse some configure macro magic. +# +# Arguments: +# none +# +# Results: +# +# Sets the following vars: +# XINCLUDES +# XLIBSW +# PKG_LIBS (appends to) +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_PATH_X], [ + if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then + TEA_PATH_UNIX_X + fi +]) + +AC_DEFUN([TEA_PATH_UNIX_X], [ + AC_PATH_X + not_really_there="" + if test "$no_x" = ""; then + if test "$x_includes" = ""; then + AC_TRY_CPP([#include ], , not_really_there="yes") + else + if test ! -r $x_includes/X11/Intrinsic.h; then + not_really_there="yes" + fi + fi + fi + if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then + AC_MSG_CHECKING([for X11 header files]) + found_xincludes="no" + AC_TRY_CPP([#include ], found_xincludes="yes", found_xincludes="no") + if test "$found_xincludes" = "no"; then + dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" + for i in $dirs ; do + if test -r $i/X11/Intrinsic.h; then + AC_MSG_RESULT([$i]) + XINCLUDES=" -I$i" + found_xincludes="yes" + break + fi + done + fi + else + if test "$x_includes" != ""; then + XINCLUDES="-I$x_includes" + found_xincludes="yes" + fi + fi + if test found_xincludes = "no"; then + AC_MSG_RESULT([couldn't find any!]) + fi + + if test "$no_x" = yes; then + AC_MSG_CHECKING([for X11 libraries]) + XLIBSW=nope + dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" + for i in $dirs ; do + if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then + AC_MSG_RESULT([$i]) + XLIBSW="-L$i -lX11" + x_libraries="$i" + break + fi + done + else + if test "$x_libraries" = ""; then + XLIBSW=-lX11 + else + XLIBSW="-L$x_libraries -lX11" + fi + fi + if test "$XLIBSW" = nope ; then + AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) + fi + if test "$XLIBSW" = nope ; then + AC_MSG_RESULT([could not find any! Using -lX11.]) + XLIBSW=-lX11 + fi + # TEA specific: + if test x"${XLIBSW}" != x ; then + PKG_LIBS="${PKG_LIBS} ${XLIBSW}" + fi +]) + +#-------------------------------------------------------------------- +# TEA_BLOCKING_STYLE +# +# The statements below check for systems where POSIX-style +# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. +# On these systems (mostly older ones), use the old BSD-style +# FIONBIO approach instead. +# +# Arguments: +# none +# +# Results: +# +# Defines some of the following vars: +# HAVE_SYS_IOCTL_H +# HAVE_SYS_FILIO_H +# USE_FIONBIO +# O_NONBLOCK +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_BLOCKING_STYLE], [ + AC_CHECK_HEADERS(sys/ioctl.h) + AC_CHECK_HEADERS(sys/filio.h) + TEA_CONFIG_SYSTEM + AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) + case $system in + # There used to be code here to use FIONBIO under AIX. However, it + # was reported that FIONBIO doesn't work under AIX 3.2.5. Since + # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO + # code (JO, 5/31/97). + + OSF*) + AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) + AC_MSG_RESULT([FIONBIO]) + ;; + SunOS-4*) + AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) + AC_MSG_RESULT([FIONBIO]) + ;; + *) + AC_MSG_RESULT([O_NONBLOCK]) + ;; + esac +]) + +#-------------------------------------------------------------------- +# TEA_TIME_HANLDER +# +# Checks how the system deals with time.h, what time structures +# are used on the system, and what fields the structures have. +# +# Arguments: +# none +# +# Results: +# +# Defines some of the following vars: +# USE_DELTA_FOR_TZ +# HAVE_TM_GMTOFF +# HAVE_TM_TZADJ +# HAVE_TIMEZONE_VAR +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_TIME_HANDLER], [ + AC_CHECK_HEADERS(sys/time.h) + AC_HEADER_TIME + AC_STRUCT_TIMEZONE + + AC_CHECK_FUNCS(gmtime_r localtime_r) + + AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [ + AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], + tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)]) + if test $tcl_cv_member_tm_tzadj = yes ; then + AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?]) + fi + + AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [ + AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], + tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)]) + if test $tcl_cv_member_tm_gmtoff = yes ; then + AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?]) + fi + + # + # Its important to include time.h in this check, as some systems + # (like convex) have timezone functions, etc. + # + AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [ + AC_TRY_COMPILE([#include ], + [extern long timezone; + timezone += 1; + exit (0);], + tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)]) + if test $tcl_cv_timezone_long = yes ; then + AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) + else + # + # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. + # + AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [ + AC_TRY_COMPILE([#include ], + [extern time_t timezone; + timezone += 1; + exit (0);], + tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)]) + if test $tcl_cv_timezone_time = yes ; then + AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) + fi + fi +]) + +#-------------------------------------------------------------------- +# TEA_BUGGY_STRTOD +# +# Under Solaris 2.4, strtod returns the wrong value for the +# terminating character under some conditions. Check for this +# and if the problem exists use a substitute procedure +# "fixstrtod" (provided by Tcl) that corrects the error. +# Also, on Compaq's Tru64 Unix 5.0, +# strtod(" ") returns 0.0 instead of a failure to convert. +# +# Arguments: +# none +# +# Results: +# +# Might defines some of the following vars: +# strtod (=fixstrtod) +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_BUGGY_STRTOD], [ + AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) + if test "$tcl_strtod" = 1; then + AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ + AC_TRY_RUN([ + extern double strtod(); + int main() { + char *infString="Inf", *nanString="NaN", *spaceString=" "; + char *term; + double value; + value = strtod(infString, &term); + if ((term != infString) && (term[-1] == 0)) { + exit(1); + } + value = strtod(nanString, &term); + if ((term != nanString) && (term[-1] == 0)) { + exit(1); + } + value = strtod(spaceString, &term); + if (term == (spaceString+1)) { + exit(1); + } + exit(0); + }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, + tcl_cv_strtod_buggy=buggy)]) + if test "$tcl_cv_strtod_buggy" = buggy; then + AC_LIBOBJ([fixstrtod]) + USE_COMPAT=1 + AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?]) + fi + fi +]) + +#-------------------------------------------------------------------- +# TEA_TCL_LINK_LIBS +# +# Search for the libraries needed to link the Tcl shell. +# Things like the math library (-lm) and socket stuff (-lsocket vs. +# -lnsl) are dealt with here. +# +# Arguments: +# Requires the following vars to be set in the Makefile: +# DL_LIBS +# LIBS +# MATH_LIBS +# +# Results: +# +# Subst's the following var: +# TCL_LIBS +# MATH_LIBS +# +# Might append to the following vars: +# LIBS +# +# Might define the following vars: +# HAVE_NET_ERRNO_H +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_TCL_LINK_LIBS], [ + #-------------------------------------------------------------------- + # On a few very rare systems, all of the libm.a stuff is + # already in libc.a. Set compiler flags accordingly. + # Also, Linux requires the "ieee" library for math to work + # right (and it must appear before "-lm"). + #-------------------------------------------------------------------- + + AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") + AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) + + #-------------------------------------------------------------------- + # Interactive UNIX requires -linet instead of -lsocket, plus it + # needs net/errno.h to define the socket-related error codes. + #-------------------------------------------------------------------- + + AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) + AC_CHECK_HEADER(net/errno.h, [ + AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have ?])]) + + #-------------------------------------------------------------------- + # Check for the existence of the -lsocket and -lnsl libraries. + # The order here is important, so that they end up in the right + # order in the command line generated by make. Here are some + # special considerations: + # 1. Use "connect" and "accept" to check for -lsocket, and + # "gethostbyname" to check for -lnsl. + # 2. Use each function name only once: can't redo a check because + # autoconf caches the results of the last check and won't redo it. + # 3. Use -lnsl and -lsocket only if they supply procedures that + # aren't already present in the normal libraries. This is because + # IRIX 5.2 has libraries, but they aren't needed and they're + # bogus: they goof up name resolution if used. + # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. + # To get around this problem, check for both libraries together + # if -lsocket doesn't work by itself. + #-------------------------------------------------------------------- + + tcl_checkBoth=0 + AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) + if test "$tcl_checkSocket" = 1; then + AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt, + LIBS="$LIBS -lsocket", tcl_checkBoth=1)]) + fi + if test "$tcl_checkBoth" = 1; then + tk_oldLibs=$LIBS + LIBS="$LIBS -lsocket -lnsl" + AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) + fi + AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, + [LIBS="$LIBS -lnsl"])]) + + # TEA specific: Don't perform the eval of the libraries here because + # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS + + TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' + AC_SUBST(TCL_LIBS) + AC_SUBST(MATH_LIBS) +]) + +#-------------------------------------------------------------------- +# TEA_TCL_EARLY_FLAGS +# +# Check for what flags are needed to be passed so the correct OS +# features are available. +# +# Arguments: +# None +# +# Results: +# +# Might define the following vars: +# _ISOC99_SOURCE +# _LARGEFILE64_SOURCE +# _LARGEFILE_SOURCE64 +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_TCL_EARLY_FLAG],[ + AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), + AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, + AC_TRY_COMPILE([[#define ]$1[ 1 +]$2], $3, + [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, + [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) + if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then + AC_DEFINE($1, 1, [Add the ]$1[ flag when building]) + tcl_flags="$tcl_flags $1" + fi +]) + +AC_DEFUN([TEA_TCL_EARLY_FLAGS],[ + AC_MSG_CHECKING([for required early compiler flags]) + tcl_flags="" + TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include ], + [char *p = (char *)strtoll; char *q = (char *)strtoull;]) + TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include ], + [struct stat64 buf; int i = stat64("/", &buf);]) + TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include ], + [char *p = (char *)open64;]) + if test "x${tcl_flags}" = "x" ; then + AC_MSG_RESULT([none]) + else + AC_MSG_RESULT([${tcl_flags}]) + fi +]) + +#-------------------------------------------------------------------- +# TEA_TCL_64BIT_FLAGS +# +# Check for what is defined in the way of 64-bit features. +# +# Arguments: +# None +# +# Results: +# +# Might define the following vars: +# TCL_WIDE_INT_IS_LONG +# TCL_WIDE_INT_TYPE +# HAVE_STRUCT_DIRENT64 +# HAVE_STRUCT_STAT64 +# HAVE_TYPE_OFF64_T +# +#-------------------------------------------------------------------- + +AC_DEFUN([TEA_TCL_64BIT_FLAGS], [ + AC_MSG_CHECKING([for 64-bit integer type]) + AC_CACHE_VAL(tcl_cv_type_64bit,[ + tcl_cv_type_64bit=none + # See if the compiler knows natively about __int64 + AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], + tcl_type_64bit=__int64, tcl_type_64bit="long long") + # See if we should use long anyway Note that we substitute in the + # type that is our current guess for a 64-bit type inside this check + # program, so it should be modified only carefully... + AC_TRY_COMPILE(,[switch (0) { + case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; + }],tcl_cv_type_64bit=${tcl_type_64bit})]) + if test "${tcl_cv_type_64bit}" = none ; then + AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) + AC_MSG_RESULT([using long]) + elif test "${tcl_cv_type_64bit}" = "__int64" \ + -a "${TEA_PLATFORM}" = "windows" ; then + # TEA specific: We actually want to use the default tcl.h checks in + # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* + AC_MSG_RESULT([using Tcl header defaults]) + else + AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}, + [What type should be used to define wide integers?]) + AC_MSG_RESULT([${tcl_cv_type_64bit}]) + + # Now check for auxiliary declarations + AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ + AC_TRY_COMPILE([#include +#include ],[struct dirent64 p;], + tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) + if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then + AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in ?]) + fi + + AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ + AC_TRY_COMPILE([#include ],[struct stat64 p; +], + tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) + if test "x${tcl_cv_struct_stat64}" = "xyes" ; then + AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in ?]) + fi + + AC_CHECK_FUNCS(open64 lseek64) + AC_MSG_CHECKING([for off64_t]) + AC_CACHE_VAL(tcl_cv_type_off64_t,[ + AC_TRY_COMPILE([#include ],[off64_t offset; +], + tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) + dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the + dnl functions lseek64 and open64 are defined. + if test "x${tcl_cv_type_off64_t}" = "xyes" && \ + test "x${ac_cv_func_lseek64}" = "xyes" && \ + test "x${ac_cv_func_open64}" = "xyes" ; then + AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in ?]) + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + fi +]) + +## +## Here ends the standard Tcl configuration bits and starts the +## TEA specific functions +## + +#------------------------------------------------------------------------ +# TEA_INIT -- +# +# Init various Tcl Extension Architecture (TEA) variables. +# This should be the first called TEA_* macro. +# +# Arguments: +# none +# +# Results: +# +# Defines and substs the following vars: +# CYGPATH +# EXEEXT +# Defines only: +# TEA_VERSION +# TEA_INITED +# TEA_PLATFORM (windows or unix) +# +# "cygpath" is used on windows to generate native path names for include +# files. These variables should only be used with the compiler and linker +# since they generate native path names. +# +# EXEEXT +# Select the executable extension based on the host type. This +# is a lightweight replacement for AC_EXEEXT that doesn't require +# a compiler. +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_INIT], [ + # TEA extensions pass this us the version of TEA they think they + # are compatible with. + TEA_VERSION="3.7" + + AC_MSG_CHECKING([for correct TEA configuration]) + if test x"${PACKAGE_NAME}" = x ; then + AC_MSG_ERROR([ +The PACKAGE_NAME variable must be defined by your TEA configure.in]) + fi + if test x"$1" = x ; then + AC_MSG_ERROR([ +TEA version not specified.]) + elif test "$1" != "${TEA_VERSION}" ; then + AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"]) + else + AC_MSG_RESULT([ok (TEA ${TEA_VERSION})]) + fi + case "`uname -s`" in + *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) + AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) + EXEEXT=".exe" + TEA_PLATFORM="windows" + ;; + *) + CYGPATH=echo + EXEEXT="" + TEA_PLATFORM="unix" + ;; + esac + + # Check if exec_prefix is set. If not use fall back to prefix. + # Note when adjusted, so that TEA_PREFIX can correct for this. + # This is needed for recursive configures, since autoconf propagates + # $prefix, but not $exec_prefix (doh!). + if test x$exec_prefix = xNONE ; then + exec_prefix_default=yes + exec_prefix=$prefix + fi + + AC_SUBST(EXEEXT) + AC_SUBST(CYGPATH) + + # This package name must be replaced statically for AC_SUBST to work + AC_SUBST(PKG_LIB_FILE) + # Substitute STUB_LIB_FILE in case package creates a stub library too. + AC_SUBST(PKG_STUB_LIB_FILE) + + # We AC_SUBST these here to ensure they are subst'ed, + # in case the user doesn't call TEA_ADD_... + AC_SUBST(PKG_STUB_SOURCES) + AC_SUBST(PKG_STUB_OBJECTS) + AC_SUBST(PKG_TCL_SOURCES) + AC_SUBST(PKG_HEADERS) + AC_SUBST(PKG_INCLUDES) + AC_SUBST(PKG_LIBS) + AC_SUBST(PKG_CFLAGS) +]) + +#------------------------------------------------------------------------ +# TEA_ADD_SOURCES -- +# +# Specify one or more source files. Users should check for +# the right platform before adding to their list. +# It is not important to specify the directory, as long as it is +# in the generic, win or unix subdirectory of $(srcdir). +# +# Arguments: +# one or more file names +# +# Results: +# +# Defines and substs the following vars: +# PKG_SOURCES +# PKG_OBJECTS +#------------------------------------------------------------------------ +AC_DEFUN([TEA_ADD_SOURCES], [ + vars="$@" + for i in $vars; do + case $i in + [\$]*) + # allow $-var names + PKG_SOURCES="$PKG_SOURCES $i" + PKG_OBJECTS="$PKG_OBJECTS $i" + ;; + *) + # check for existence - allows for generic/win/unix VPATH + # To add more dirs here (like 'src'), you have to update VPATH + # in Makefile.in as well + if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ + -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ + ; then + AC_MSG_ERROR([could not find source file '$i']) + fi + PKG_SOURCES="$PKG_SOURCES $i" + # this assumes it is in a VPATH dir + i=`basename $i` + # handle user calling this before or after TEA_SETUP_COMPILER + if test x"${OBJEXT}" != x ; then + j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" + else + j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" + fi + PKG_OBJECTS="$PKG_OBJECTS $j" + ;; + esac + done + AC_SUBST(PKG_SOURCES) + AC_SUBST(PKG_OBJECTS) +]) + +#------------------------------------------------------------------------ +# TEA_ADD_STUB_SOURCES -- +# +# Specify one or more source files. Users should check for +# the right platform before adding to their list. +# It is not important to specify the directory, as long as it is +# in the generic, win or unix subdirectory of $(srcdir). +# +# Arguments: +# one or more file names +# +# Results: +# +# Defines and substs the following vars: +# PKG_STUB_SOURCES +# PKG_STUB_OBJECTS +#------------------------------------------------------------------------ +AC_DEFUN([TEA_ADD_STUB_SOURCES], [ + vars="$@" + for i in $vars; do + # check for existence - allows for generic/win/unix VPATH + if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ + -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ + ; then + AC_MSG_ERROR([could not find stub source file '$i']) + fi + PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" + # this assumes it is in a VPATH dir + i=`basename $i` + # handle user calling this before or after TEA_SETUP_COMPILER + if test x"${OBJEXT}" != x ; then + j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" + else + j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" + fi + PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" + done + AC_SUBST(PKG_STUB_SOURCES) + AC_SUBST(PKG_STUB_OBJECTS) +]) + +#------------------------------------------------------------------------ +# TEA_ADD_TCL_SOURCES -- +# +# Specify one or more Tcl source files. These should be platform +# independent runtime files. +# +# Arguments: +# one or more file names +# +# Results: +# +# Defines and substs the following vars: +# PKG_TCL_SOURCES +#------------------------------------------------------------------------ +AC_DEFUN([TEA_ADD_TCL_SOURCES], [ + vars="$@" + for i in $vars; do + # check for existence, be strict because it is installed + if test ! -f "${srcdir}/$i" ; then + AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i']) + fi + PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" + done + AC_SUBST(PKG_TCL_SOURCES) +]) + +#------------------------------------------------------------------------ +# TEA_ADD_HEADERS -- +# +# Specify one or more source headers. Users should check for +# the right platform before adding to their list. +# +# Arguments: +# one or more file names +# +# Results: +# +# Defines and substs the following vars: +# PKG_HEADERS +#------------------------------------------------------------------------ +AC_DEFUN([TEA_ADD_HEADERS], [ + vars="$@" + for i in $vars; do + # check for existence, be strict because it is installed + if test ! -f "${srcdir}/$i" ; then + AC_MSG_ERROR([could not find header file '${srcdir}/$i']) + fi + PKG_HEADERS="$PKG_HEADERS $i" + done + AC_SUBST(PKG_HEADERS) +]) + +#------------------------------------------------------------------------ +# TEA_ADD_INCLUDES -- +# +# Specify one or more include dirs. Users should check for +# the right platform before adding to their list. +# +# Arguments: +# one or more file names +# +# Results: +# +# Defines and substs the following vars: +# PKG_INCLUDES +#------------------------------------------------------------------------ +AC_DEFUN([TEA_ADD_INCLUDES], [ + vars="$@" + for i in $vars; do + PKG_INCLUDES="$PKG_INCLUDES $i" + done + AC_SUBST(PKG_INCLUDES) +]) + +#------------------------------------------------------------------------ +# TEA_ADD_LIBS -- +# +# Specify one or more libraries. Users should check for +# the right platform before adding to their list. For Windows, +# libraries provided in "foo.lib" format will be converted to +# "-lfoo" when using GCC (mingw). +# +# Arguments: +# one or more file names +# +# Results: +# +# Defines and substs the following vars: +# PKG_LIBS +#------------------------------------------------------------------------ +AC_DEFUN([TEA_ADD_LIBS], [ + vars="$@" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + AC_SUBST(PKG_LIBS) +]) + +#------------------------------------------------------------------------ +# TEA_ADD_CFLAGS -- +# +# Specify one or more CFLAGS. Users should check for +# the right platform before adding to their list. +# +# Arguments: +# one or more file names +# +# Results: +# +# Defines and substs the following vars: +# PKG_CFLAGS +#------------------------------------------------------------------------ +AC_DEFUN([TEA_ADD_CFLAGS], [ + PKG_CFLAGS="$PKG_CFLAGS $@" + AC_SUBST(PKG_CFLAGS) +]) + +#------------------------------------------------------------------------ +# TEA_PREFIX -- +# +# Handle the --prefix=... option by defaulting to what Tcl gave +# +# Arguments: +# none +# +# Results: +# +# If --prefix or --exec-prefix was not specified, $prefix and +# $exec_prefix will be set to the values given to Tcl when it was +# configured. +#------------------------------------------------------------------------ +AC_DEFUN([TEA_PREFIX], [ + if test "${prefix}" = "NONE"; then + prefix_default=yes + if test x"${TCL_PREFIX}" != x; then + AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}]) + prefix=${TCL_PREFIX} + else + AC_MSG_NOTICE([--prefix defaulting to /usr/local]) + prefix=/usr/local + fi + fi + if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ + -o x"${exec_prefix_default}" = x"yes" ; then + if test x"${TCL_EXEC_PREFIX}" != x; then + AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}]) + exec_prefix=${TCL_EXEC_PREFIX} + else + AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}]) + exec_prefix=$prefix + fi + fi +]) + +#------------------------------------------------------------------------ +# TEA_SETUP_COMPILER_CC -- +# +# Do compiler checks the way we want. This is just a replacement +# for AC_PROG_CC in TEA configure.in files to make them cleaner. +# +# Arguments: +# none +# +# Results: +# +# Sets up CC var and other standard bits we need to make executables. +#------------------------------------------------------------------------ +AC_DEFUN([TEA_SETUP_COMPILER_CC], [ + # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) + # in this macro, they need to go into TEA_SETUP_COMPILER instead. + + # If the user did not set CFLAGS, set it now to keep + # the AC_PROG_CC macro from adding "-g -O2". + if test "${CFLAGS+set}" != "set" ; then + CFLAGS="" + fi + + AC_PROG_CC + AC_PROG_CPP + + AC_PROG_INSTALL + + #-------------------------------------------------------------------- + # Checks to see if the make program sets the $MAKE variable. + #-------------------------------------------------------------------- + + AC_PROG_MAKE_SET + + #-------------------------------------------------------------------- + # Find ranlib + #-------------------------------------------------------------------- + + AC_PROG_RANLIB + + #-------------------------------------------------------------------- + # Determines the correct binary file extension (.o, .obj, .exe etc.) + #-------------------------------------------------------------------- + + AC_OBJEXT + AC_EXEEXT +]) + +#------------------------------------------------------------------------ +# TEA_SETUP_COMPILER -- +# +# Do compiler checks that use the compiler. This must go after +# TEA_SETUP_COMPILER_CC, which does the actual compiler check. +# +# Arguments: +# none +# +# Results: +# +# Sets up CC var and other standard bits we need to make executables. +#------------------------------------------------------------------------ +AC_DEFUN([TEA_SETUP_COMPILER], [ + # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. + AC_REQUIRE([TEA_SETUP_COMPILER_CC]) + + #------------------------------------------------------------------------ + # If we're using GCC, see if the compiler understands -pipe. If so, use it. + # It makes compiling go faster. (This is only a performance feature.) + #------------------------------------------------------------------------ + + if test -z "$no_pipe" -a -n "$GCC"; then + AC_CACHE_CHECK([if the compiler understands -pipe], + tcl_cv_cc_pipe, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" + AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_pipe = yes; then + CFLAGS="$CFLAGS -pipe" + fi + fi + + #-------------------------------------------------------------------- + # Common compiler flag setup + #-------------------------------------------------------------------- + + AC_C_BIGENDIAN + if test "${TEA_PLATFORM}" = "unix" ; then + TEA_TCL_LINK_LIBS + TEA_MISSING_POSIX_HEADERS + # Let the user call this, because if it triggers, they will + # need a compat/strtod.c that is correct. Users can also + # use Tcl_GetDouble(FromObj) instead. + #TEA_BUGGY_STRTOD + fi +]) + +#------------------------------------------------------------------------ +# TEA_MAKE_LIB -- +# +# Generate a line that can be used to build a shared/unshared library +# in a platform independent manner. +# +# Arguments: +# none +# +# Requires: +# +# Results: +# +# Defines the following vars: +# CFLAGS - Done late here to note disturb other AC macros +# MAKE_LIB - Command to execute to build the Tcl library; +# differs depending on whether or not Tcl is being +# compiled as a shared library. +# MAKE_SHARED_LIB Makefile rule for building a shared library +# MAKE_STATIC_LIB Makefile rule for building a static library +# MAKE_STUB_LIB Makefile rule for building a stub library +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_MAKE_LIB], [ + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then + MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)" + MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)" + else + MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" + MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)" + fi + + if test "${SHARED_BUILD}" = "1" ; then + MAKE_LIB="${MAKE_SHARED_LIB} " + else + MAKE_LIB="${MAKE_STATIC_LIB} " + fi + + #-------------------------------------------------------------------- + # Shared libraries and static libraries have different names. + # Use the double eval to make sure any variables in the suffix is + # substituted. (@@@ Might not be necessary anymore) + #-------------------------------------------------------------------- + + if test "${TEA_PLATFORM}" = "windows" ; then + if test "${SHARED_BUILD}" = "1" ; then + # We force the unresolved linking of symbols that are really in + # the private libraries of Tcl and Tk. + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" + if test x"${TK_BIN_DIR}" != x ; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" + fi + eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + else + eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + fi + # Some packages build their own stubs libraries + eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + if test "$GCC" = "yes"; then + PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} + fi + # These aren't needed on Windows (either MSVC or gcc) + RANLIB=: + RANLIB_STUB=: + else + RANLIB_STUB="${RANLIB}" + if test "${SHARED_BUILD}" = "1" ; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" + if test x"${TK_BIN_DIR}" != x ; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" + fi + eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + RANLIB=: + else + eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + fi + # Some packages build their own stubs libraries + eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + fi + + # These are escaped so that only CFLAGS is picked up at configure time. + # The other values will be substituted at make time. + CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" + if test "${SHARED_BUILD}" = "1" ; then + CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" + fi + + AC_SUBST(MAKE_LIB) + AC_SUBST(MAKE_SHARED_LIB) + AC_SUBST(MAKE_STATIC_LIB) + AC_SUBST(MAKE_STUB_LIB) + AC_SUBST(RANLIB_STUB) +]) + +#------------------------------------------------------------------------ +# TEA_LIB_SPEC -- +# +# Compute the name of an existing object library located in libdir +# from the given base name and produce the appropriate linker flags. +# +# Arguments: +# basename The base name of the library without version +# numbers, extensions, or "lib" prefixes. +# extra_dir Extra directory in which to search for the +# library. This location is used first, then +# $prefix/$exec-prefix, then some defaults. +# +# Requires: +# TEA_INIT and TEA_PREFIX must be called first. +# +# Results: +# +# Defines the following vars: +# ${basename}_LIB_NAME The computed library name. +# ${basename}_LIB_SPEC The computed linker flags. +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_LIB_SPEC], [ + AC_MSG_CHECKING([for $1 library]) + + # Look in exec-prefix for the library (defined by TEA_PREFIX). + + tea_lib_name_dir="${exec_prefix}/lib" + + # Or in a user-specified location. + + if test x"$2" != x ; then + tea_extra_lib_dir=$2 + else + tea_extra_lib_dir=NONE + fi + + for i in \ + `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ + `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ + `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ + `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ + `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do + if test -f "$i" ; then + tea_lib_name_dir=`dirname $i` + $1_LIB_NAME=`basename $i` + $1_LIB_PATH_NAME=$i + break + fi + done + + if test "${TEA_PLATFORM}" = "windows"; then + $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\" + else + # Strip off the leading "lib" and trailing ".a" or ".so" + + tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'` + $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}" + fi + + if test "x${$1_LIB_NAME}" = x ; then + AC_MSG_ERROR([not found]) + else + AC_MSG_RESULT([${$1_LIB_SPEC}]) + fi +]) + +#------------------------------------------------------------------------ +# TEA_PRIVATE_TCL_HEADERS -- +# +# Locate the private Tcl include files +# +# Arguments: +# +# Requires: +# TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has +# already been called. +# +# Results: +# +# Substs the following vars: +# TCL_TOP_DIR_NATIVE +# TCL_INCLUDES +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [ + # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh} + AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS]) + AC_MSG_CHECKING([for Tcl private include files]) + + TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` + TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" + + # Check to see if tclPort.h isn't already with the public headers + # Don't look for tclInt.h because that resides with tcl.h in the core + # sources, but the Port headers are in a different directory + if test "${TEA_PLATFORM}" = "windows" -a \ + -f "${ac_cv_c_tclh}/tclWinPort.h"; then + result="private headers found with public headers" + elif test "${TEA_PLATFORM}" = "unix" -a \ + -f "${ac_cv_c_tclh}/tclUnixPort.h"; then + result="private headers found with public headers" + else + TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" + if test "${TEA_PLATFORM}" = "windows"; then + TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" + else + TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" + fi + # Overwrite the previous TCL_INCLUDES as this should capture both + # public and private headers in the same set. + # We want to ensure these are substituted so as not to require + # any *_NATIVE vars be defined in the Makefile + TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" + if test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use + # the framework's Headers and PrivateHeaders directories + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + if test -d "${TCL_BIN_DIR}/Headers" -a \ + -d "${TCL_BIN_DIR}/PrivateHeaders"; then + TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}" + else + TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" + fi + ;; + esac + result="Using ${TCL_INCLUDES}" + else + if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then + AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}]) + fi + result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" + fi + fi + + AC_SUBST(TCL_TOP_DIR_NATIVE) + + AC_SUBST(TCL_INCLUDES) + AC_MSG_RESULT([${result}]) +]) + +#------------------------------------------------------------------------ +# TEA_PUBLIC_TCL_HEADERS -- +# +# Locate the installed public Tcl header files +# +# Arguments: +# None. +# +# Requires: +# CYGPATH must be set +# +# Results: +# +# Adds a --with-tclinclude switch to configure. +# Result is cached. +# +# Substs the following vars: +# TCL_INCLUDES +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [ + AC_MSG_CHECKING([for Tcl public headers]) + + AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) + + AC_CACHE_VAL(ac_cv_c_tclh, [ + # Use the value from --with-tclinclude, if it was given + + if test x"${with_tclinclude}" != x ; then + if test -f "${with_tclinclude}/tcl.h" ; then + ac_cv_c_tclh=${with_tclinclude} + else + AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h]) + fi + else + if test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use + # the framework's Headers directory + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" + ;; + esac + fi + + # Look in the source dir only if Tcl is not installed, + # and in that situation, look there before installed locations. + if test -f "${TCL_BIN_DIR}/Makefile" ; then + list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" + fi + + # Check order: pkg --prefix location, Tcl's --prefix location, + # relative to directory of tclConfig.sh. + + eval "temp_includedir=${includedir}" + list="$list \ + `ls -d ${temp_includedir} 2>/dev/null` \ + `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ + `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" + if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then + list="$list /usr/local/include /usr/include" + if test x"${TCL_INCLUDE_SPEC}" != x ; then + d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` + list="$list `ls -d ${d} 2>/dev/null`" + fi + fi + for i in $list ; do + if test -f "$i/tcl.h" ; then + ac_cv_c_tclh=$i + break + fi + done + fi + ]) + + # Print a message based on how we determined the include path + + if test x"${ac_cv_c_tclh}" = x ; then + AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude]) + else + AC_MSG_RESULT([${ac_cv_c_tclh}]) + fi + + # Convert to a native path and substitute into the output files. + + INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` + + TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + AC_SUBST(TCL_INCLUDES) +]) + +#------------------------------------------------------------------------ +# TEA_PRIVATE_TK_HEADERS -- +# +# Locate the private Tk include files +# +# Arguments: +# +# Requires: +# TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has +# already been called. +# +# Results: +# +# Substs the following vars: +# TK_INCLUDES +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [ + # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh} + AC_REQUIRE([TEA_PUBLIC_TK_HEADERS]) + AC_MSG_CHECKING([for Tk private include files]) + + TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` + TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" + + # Check to see if tkPort.h isn't already with the public headers + # Don't look for tkInt.h because that resides with tk.h in the core + # sources, but the Port headers are in a different directory + if test "${TEA_PLATFORM}" = "windows" -a \ + -f "${ac_cv_c_tkh}/tkWinPort.h"; then + result="private headers found with public headers" + elif test "${TEA_PLATFORM}" = "unix" -a \ + -f "${ac_cv_c_tkh}/tkUnixPort.h"; then + result="private headers found with public headers" + else + TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" + TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" + if test "${TEA_PLATFORM}" = "windows"; then + TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" + else + TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" + fi + # Overwrite the previous TK_INCLUDES as this should capture both + # public and private headers in the same set. + # We want to ensure these are substituted so as not to require + # any *_NATIVE vars be defined in the Makefile + TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" + # Detect and add ttk subdir + if test -d "${TK_SRC_DIR}/generic/ttk"; then + TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\"" + fi + if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then + TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" + fi + if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then + TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\"" + fi + if test "`uname -s`" = "Darwin"; then + # If Tk was built as a framework, attempt to use + # the framework's Headers and PrivateHeaders directories + case ${TK_DEFS} in + *TK_FRAMEWORK*) + if test -d "${TK_BIN_DIR}/Headers" -a \ + -d "${TK_BIN_DIR}/PrivateHeaders"; then + TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}" + else + TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" + fi + ;; + esac + result="Using ${TK_INCLUDES}" + else + if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then + AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}]) + fi + result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" + fi + fi + + AC_SUBST(TK_TOP_DIR_NATIVE) + AC_SUBST(TK_XLIB_DIR_NATIVE) + + AC_SUBST(TK_INCLUDES) + AC_MSG_RESULT([${result}]) +]) + +#------------------------------------------------------------------------ +# TEA_PUBLIC_TK_HEADERS -- +# +# Locate the installed public Tk header files +# +# Arguments: +# None. +# +# Requires: +# CYGPATH must be set +# +# Results: +# +# Adds a --with-tkinclude switch to configure. +# Result is cached. +# +# Substs the following vars: +# TK_INCLUDES +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [ + AC_MSG_CHECKING([for Tk public headers]) + + AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files], with_tkinclude=${withval}) + + AC_CACHE_VAL(ac_cv_c_tkh, [ + # Use the value from --with-tkinclude, if it was given + + if test x"${with_tkinclude}" != x ; then + if test -f "${with_tkinclude}/tk.h" ; then + ac_cv_c_tkh=${with_tkinclude} + else + AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h]) + fi + else + if test "`uname -s`" = "Darwin"; then + # If Tk was built as a framework, attempt to use + # the framework's Headers directory. + case ${TK_DEFS} in + *TK_FRAMEWORK*) + list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" + ;; + esac + fi + + # Look in the source dir only if Tk is not installed, + # and in that situation, look there before installed locations. + if test -f "${TK_BIN_DIR}/Makefile" ; then + list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" + fi + + # Check order: pkg --prefix location, Tk's --prefix location, + # relative to directory of tkConfig.sh, Tcl's --prefix location, + # relative to directory of tclConfig.sh. + + eval "temp_includedir=${includedir}" + list="$list \ + `ls -d ${temp_includedir} 2>/dev/null` \ + `ls -d ${TK_PREFIX}/include 2>/dev/null` \ + `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ + `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ + `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" + if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then + list="$list /usr/local/include /usr/include" + fi + for i in $list ; do + if test -f "$i/tk.h" ; then + ac_cv_c_tkh=$i + break + fi + done + fi + ]) + + # Print a message based on how we determined the include path + + if test x"${ac_cv_c_tkh}" = x ; then + AC_MSG_ERROR([tk.h not found. Please specify its location with --with-tkinclude]) + else + AC_MSG_RESULT([${ac_cv_c_tkh}]) + fi + + # Convert to a native path and substitute into the output files. + + INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` + + TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + AC_SUBST(TK_INCLUDES) + + if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then + # On Windows and Aqua, we need the X compat headers + AC_MSG_CHECKING([for X11 header files]) + if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then + INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" + TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + AC_SUBST(TK_XINCLUDES) + fi + AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) + fi +]) + +#------------------------------------------------------------------------ +# TEA_PATH_CONFIG -- +# +# Locate the ${1}Config.sh file and perform a sanity check on +# the ${1} compile flags. These are used by packages like +# [incr Tk] that load *Config.sh files from more than Tcl and Tk. +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-$1=... +# +# Defines the following vars: +# $1_BIN_DIR Full path to the directory containing +# the $1Config.sh file +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PATH_CONFIG], [ + # + # Ok, lets find the $1 configuration + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-$1 + # + + if test x"${no_$1}" = x ; then + # we reset no_$1 in case something fails here + no_$1=true + AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval}) + AC_MSG_CHECKING([for $1 configuration]) + AC_CACHE_VAL(ac_cv_c_$1config,[ + + # First check to see if --with-$1 was specified. + if test x"${with_$1config}" != x ; then + case ${with_$1config} in + */$1Config.sh ) + if test -f ${with_$1config}; then + AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself]) + with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'` + fi;; + esac + if test -f "${with_$1config}/$1Config.sh" ; then + ac_cv_c_$1config=`(cd ${with_$1config}; pwd)` + else + AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh]) + fi + fi + + # then check for a private $1 installation + if test x"${ac_cv_c_$1config}" = x ; then + for i in \ + ../$1 \ + `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ + `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ + `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ + ../../$1 \ + `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ + `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ + `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ + ../../../$1 \ + `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ + `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ + `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ + ${srcdir}/../$1 \ + `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ + `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ + ; do + if test -f "$i/$1Config.sh" ; then + ac_cv_c_$1config=`(cd $i; pwd)` + break + fi + if test -f "$i/unix/$1Config.sh" ; then + ac_cv_c_$1config=`(cd $i/unix; pwd)` + break + fi + done + fi + + # check in a few common install locations + if test x"${ac_cv_c_$1config}" = x ; then + for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + ; do + if test -f "$i/$1Config.sh" ; then + ac_cv_c_$1config=`(cd $i; pwd)` + break + fi + done + fi + ]) + + if test x"${ac_cv_c_$1config}" = x ; then + $1_BIN_DIR="# no $1 configs found" + AC_MSG_WARN([Cannot find $1 configuration definitions]) + exit 0 + else + no_$1= + $1_BIN_DIR=${ac_cv_c_$1config} + AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh]) + fi + fi +]) + +#------------------------------------------------------------------------ +# TEA_LOAD_CONFIG -- +# +# Load the $1Config.sh file +# +# Arguments: +# +# Requires the following vars to be set: +# $1_BIN_DIR +# +# Results: +# +# Subst the following vars: +# $1_SRC_DIR +# $1_LIB_FILE +# $1_LIB_SPEC +# +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_LOAD_CONFIG], [ + AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh]) + + if test -f "${$1_BIN_DIR}/$1Config.sh" ; then + AC_MSG_RESULT([loading]) + . "${$1_BIN_DIR}/$1Config.sh" + else + AC_MSG_RESULT([file not found]) + fi + + # + # If the $1_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable $1_LIB_SPEC will be set to the value + # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC + # instead of $1_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + # + + if test -f "${$1_BIN_DIR}/Makefile" ; then + AC_MSG_WARN([Found Makefile - using build library specs for $1]) + $1_LIB_SPEC=${$1_BUILD_LIB_SPEC} + $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC} + $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH} + fi + + AC_SUBST($1_VERSION) + AC_SUBST($1_BIN_DIR) + AC_SUBST($1_SRC_DIR) + + AC_SUBST($1_LIB_FILE) + AC_SUBST($1_LIB_SPEC) + + AC_SUBST($1_STUB_LIB_FILE) + AC_SUBST($1_STUB_LIB_SPEC) + AC_SUBST($1_STUB_LIB_PATH) +]) + +#------------------------------------------------------------------------ +# TEA_PATH_CELIB -- +# +# Locate Keuchel's celib emulation layer for targeting Win/CE +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-celib=... +# +# Defines the following vars: +# CELIB_DIR Full path to the directory containing +# the include and platform lib files +#------------------------------------------------------------------------ + +AC_DEFUN([TEA_PATH_CELIB], [ + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-celib + + if test x"${no_celib}" = x ; then + # we reset no_celib in case something fails here + no_celib=true + AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval}) + AC_MSG_CHECKING([for Windows/CE celib directory]) + AC_CACHE_VAL(ac_cv_c_celibconfig,[ + # First check to see if --with-celibconfig was specified. + if test x"${with_celibconfig}" != x ; then + if test -d "${with_celibconfig}/inc" ; then + ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` + else + AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory]) + fi + fi + + # then check for a celib library + if test x"${ac_cv_c_celibconfig}" = x ; then + for i in \ + ../celib-palm-3.0 \ + ../celib \ + ../../celib-palm-3.0 \ + ../../celib \ + `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \ + ${srcdir}/../celib-palm-3.0 \ + ${srcdir}/../celib \ + `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \ + ; do + if test -d "$i/inc" ; then + ac_cv_c_celibconfig=`(cd $i; pwd)` + break + fi + done + fi + ]) + if test x"${ac_cv_c_celibconfig}" = x ; then + AC_MSG_ERROR([Cannot find celib support library directory]) + else + no_celib= + CELIB_DIR=${ac_cv_c_celibconfig} + CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` + AC_MSG_RESULT([found $CELIB_DIR]) + fi + fi +]) + + +# Local Variables: +# mode: autoconf +# End: diff --git a/ng/Togl2.1/texture.c b/ng/Togl2.1/texture.c new file mode 100644 index 00000000..295f3666 --- /dev/null +++ b/ng/Togl2.1/texture.c @@ -0,0 +1,663 @@ +/* $Id: texture.c,v 1.14 2007/08/03 16:48:50 gregcouch Exp $ */ + +/* + * Togl - a Tk OpenGL widget + * Copyright (C) 1996-1997 Brian Paul and Ben Bederson + * Copyright (C) 2006-2007 Greg Couch + * See the LICENSE file for copyright details. + */ + + +/* + * An example Togl program demonstrating texture mapping + */ + +#define USE_TOGL_STUBS + +#include "togl.h" +#include +#include +#if defined(TOGL_AGL) +# include +#else +# include +#endif +#include "image.h" + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + +#define CHECKER 0 +#define FACE 1 +#define TREE 2 + + +static GLenum minfilter = GL_NEAREST_MIPMAP_LINEAR; +static GLenum magfilter = GL_LINEAR; +static GLenum swrap = GL_REPEAT; +static GLenum twrap = GL_REPEAT; +static GLenum envmode = GL_MODULATE; +static GLubyte polycolor[4] = { 255, 255, 255, 255 }; +static int teximage = CHECKER; +static double coord_scale = 1; +static double xrot = 0; +static double yrot = 0; +static double texscale = 1; + +static GLint width, height; + +static GLboolean blend = GL_FALSE; + + +/* + * Load a texture image. n is one of CHECKER, FACE or TREE. + */ +static void +texture_image(int n) +{ + if (n == CHECKER) { +#define WIDTH 64 +#define HEIGHT 64 + GLubyte teximage[WIDTH * HEIGHT][4]; + int i, j; + + for (i = 0; i < HEIGHT; i++) { + for (j = 0; j < WIDTH; j++) { + GLubyte value; + + value = ((i / 4 + j / 4) % 2) ? 0xff : 0x00; + teximage[i * WIDTH + j][0] = value; + teximage[i * WIDTH + j][1] = value; + teximage[i * WIDTH + j][2] = value; + teximage[i * WIDTH + j][3] = value; + } + } + + glEnable(GL_TEXTURE_2D); + gluBuild2DMipmaps(GL_TEXTURE_2D, 4, WIDTH, HEIGHT, + GL_RGBA, GL_UNSIGNED_BYTE, teximage); + blend = GL_FALSE; + +#undef WIDTH +#undef HEIGHT + } else if (n == FACE) { + TK_RGBImageRec *img = tkRGBImageLoad("ben.rgb"); + + if (img) { + glEnable(GL_TEXTURE_2D); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + gluBuild2DMipmaps(GL_TEXTURE_2D, img->sizeZ, img->sizeX, img->sizeY, + img->sizeZ == 3 ? GL_RGB : GL_RGBA, + GL_UNSIGNED_BYTE, img->data); + + blend = GL_TRUE; + } + } else if (n == TREE) { + TK_RGBImageRec *img = tkRGBImageLoad("tree2.rgba"); + + if (img) { + glEnable(GL_TEXTURE_2D); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + gluBuild2DMipmaps(GL_TEXTURE_2D, img->sizeZ, img->sizeX, img->sizeY, + img->sizeZ == 3 ? GL_RGB : GL_RGBA, + GL_UNSIGNED_BYTE, img->data); + + blend = GL_TRUE; + } + } else { + abort(); + } +} + + +/* + * Togl widget create callback. This is called by Tcl/Tk when the widget has + * been realized. Here's where one may do some one-time context setup or + * initializations. + */ +static int +create_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + glEnable(GL_DEPTH_TEST); /* Enable depth buffering */ + + texture_image(CHECKER); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magfilter); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilter); + + return TCL_OK; +} + + +/* + * Togl widget reshape callback. This is called by Tcl/Tk when the widget + * has been resized. Typically, we call glViewport and perhaps setup the + * projection matrix. + */ +static int +reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + width = Togl_Width(togl); + height = Togl_Height(togl); + + glViewport(0, 0, width, height); + + return TCL_OK; +} + + +static void +check_error(char *where) +{ + GLenum error; + + while (1) { + error = glGetError(); + if (error == GL_NO_ERROR) { + break; + } + printf("OpenGL error near %s: %s\n", where, gluErrorString(error)); + } +} + + + +/* + * Togl widget display callback. This is called by Tcl/Tk when the widget's + * contents have to be redrawn. Typically, we clear the color and depth + * buffers, render our objects, then swap the front/back color buffers. + */ +static int +display_cb(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + float aspect = (float) width / (float) height; + Togl *togl; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + check_error("begin display\n"); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + /* Draw background image */ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glDisable(GL_TEXTURE_2D); + glDisable(GL_DEPTH_TEST); + glBegin(GL_POLYGON); + glColor3f(0, 0, 0.3f); + glVertex2f(-1, -1); + glColor3f(0, 0, 0.3f); + glVertex2f(1, -1); + glColor3f(0, 0, 0.9f); + glVertex2f(1, 1); + glColor3f(0, 0, 0.9f); + glVertex2f(-1, 1); + glEnd(); + + /* draw textured object */ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-aspect, aspect, -1, 1, 2, 10); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0, 0, -5); + glScaled(texscale, texscale, texscale); + glRotated(yrot, 0, 1, 0); + glRotated(xrot, 1, 0, 0); + + glEnable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glColor4ubv(polycolor); + + if (blend) { + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + } + + glBegin(GL_POLYGON); + glTexCoord2f(0, 0); + glVertex2f(-1, -1); + glTexCoord2d(coord_scale, 0); + glVertex2f(1, -1); + glTexCoord2d(coord_scale, coord_scale); + glVertex2f(1, 1); + glTexCoord2d(0, coord_scale); + glVertex2f(-1, 1); + glEnd(); + + glDisable(GL_BLEND); + + Togl_SwapBuffers(togl); + + return TCL_OK; +} + + +/* + * Called when a magnification filter radio button is pressed. + */ +static int +magfilter_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + static const char *names[] = { "GL_NEAREST", "GL_LINEAR", NULL }; + static const GLenum magfilters[] = { GL_NEAREST, GL_LINEAR }; + int result, index; + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName magnification-filter-type"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + result = Tcl_GetIndexFromObj(interp, objv[2], names, + "magnification filter type", 0, &index); + if (result == TCL_OK) { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, + magfilters[index]); + Togl_PostRedisplay(togl); + } + return result; +} + + +/* + * Called when a minification filter radio button is pressed. + */ +static int +minfilter_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + static const char *names[] = { + "GL_NEAREST", "GL_LINEAR", + "GL_NEAREST_MIPMAP_NEAREST", "GL_LINEAR_MIPMAP_NEAREST", + "GL_NEAREST_MIPMAP_LINEAR", "GL_LINEAR_MIPMAP_LINEAR", NULL + }; + static const GLenum minfilters[] = { + GL_NEAREST, GL_LINEAR, + GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, + GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_LINEAR + }; + int result, index; + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName minification-filter-type"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + result = Tcl_GetIndexFromObj(interp, objv[2], names, + "minification filter type", 0, &index); + if (result == TCL_OK) { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + minfilters[index]); + Togl_PostRedisplay(togl); + } + return result; +} + + +static int +xrot_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[2], &xrot) != TCL_OK) { + return TCL_ERROR; + } + + Togl_PostRedisplay(togl); + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + return TCL_OK; +} + + +static int +yrot_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[2], &yrot) != TCL_OK) { + return TCL_ERROR; + } + + Togl_PostRedisplay(togl); + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + return TCL_OK; +} + + +static int +texscale_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName value"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[2], &texscale) != TCL_OK) { + return TCL_ERROR; + } + + Togl_PostRedisplay(togl); + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + return TCL_OK; +} + + +/* + * Called when S texture coordinate wrapping is changed. + */ +static int +swrap_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + static const char *names[] = { "GL_CLAMP", "GL_REPEAT", NULL }; + static const GLenum swraps[] = { GL_CLAMP, GL_REPEAT }; + int result, index; + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName wrap-mode"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + result = Tcl_GetIndexFromObj(interp, objv[2], names, + "wrap mode", 0, &index); + if (result == TCL_OK) { + swrap = swraps[index]; + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, swrap); + Togl_PostRedisplay(togl); + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + } + return result; +} + + +/* + * Called when T texture coordinate wrapping is changed. + */ +static int +twrap_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + static const char *names[] = { "GL_CLAMP", "GL_REPEAT", NULL }; + static const GLenum twraps[] = { GL_CLAMP, GL_REPEAT }; + int result, index; + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName wrap-mode"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + result = Tcl_GetIndexFromObj(interp, objv[2], names, + "wrap mode", 0, &index); + if (result == TCL_OK) { + twrap = twraps[index]; + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, twrap); + Togl_PostRedisplay(togl); + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + } + return result; +} + + +/* + * Called when the texture environment mode is changed. + */ +static int +envmode_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + static const char *names[] = { + "GL_MODULATE", "GL_DECAL", "GL_BLEND", NULL + }; + static const GLenum envmodes[] = { GL_MODULATE, GL_DECAL, GL_BLEND }; + int result, index; + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName texture-env-mode"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + result = Tcl_GetIndexFromObj(interp, objv[2], names, + "texture env mode", 0, &index); + if (result == TCL_OK) { + envmode = envmodes[index]; + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, envmode); + Togl_PostRedisplay(togl); + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + } + return result; +} + + +/* + * Called when the polygon color is changed. + */ +static int +polycolor_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl; + int r, g, b; + + if (objc != 5) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName r g b"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetIntFromObj(interp, objv[2], &r) != TCL_OK + || Tcl_GetIntFromObj(interp, objv[3], &g) != TCL_OK + || Tcl_GetIntFromObj(interp, objv[4], &b) != TCL_OK) { + return TCL_ERROR; + } + polycolor[0] = r; + polycolor[1] = g; + polycolor[2] = b; + + Togl_PostRedisplay(togl); + + return TCL_OK; +} + + +/* + * Called when the texture image is to be changed + */ +static int +teximage_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + static const char *names[] = { + "CHECKER", "FACE", "TREE", NULL + }; + static const GLenum teximages[] = { + CHECKER, FACE, TREE + }; + int result, index; + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName texture-image-name"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + result = Tcl_GetIndexFromObj(interp, objv[2], names, + "texture image name", 0, &index); + if (result == TCL_OK) { + teximage = teximages[index]; + texture_image(teximage); + Togl_PostRedisplay(togl); + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + } + return result; +} + + +/* + * Called when the texture coordinate scale is changed. + */ +static int +coord_scale_cmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + double s; + Togl *togl; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName scale"); + return TCL_ERROR; + } + + if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { + return TCL_ERROR; + } + + if (Tcl_GetDoubleFromObj(interp, objv[2], &s) != TCL_OK) { + return TCL_ERROR; + } + if (s > 0 && s < 10) { + coord_scale = s; + Togl_PostRedisplay(togl); + } + + /* Let result string equal value */ + Tcl_SetObjResult(interp, objv[2]); + return TCL_OK; +} + + +EXTERN int +Texture_Init(Tcl_Interp *interp) +{ + /* + * Initialize Tcl and the Togl widget module. + */ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL + || Togl_InitStubs(interp, "2.0", 0) == NULL) { + return TCL_ERROR; + } + + /* + * Specify the C callback functions for widget creation, display, + * and reshape. + */ + Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); + Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); + + /* + * Make a new Togl widget command so the Tcl code can set a C variable. + */ + Tcl_CreateObjCommand(interp, "min_filter", minfilter_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "mag_filter", magfilter_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "xrot", xrot_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "yrot", yrot_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "texscale", texscale_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "swrap", swrap_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "twrap", twrap_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "envmode", envmode_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "polycolor", polycolor_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "teximage", teximage_cmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "coord_scale", coord_scale_cmd, NULL, NULL); + + /* + * Call Tcl_CreateCommand for application-specific commands, if + * they weren't already created by the init procedures called above. + */ + + return TCL_OK; +} diff --git a/ng/Togl2.1/texture.tcl b/ng/Togl2.1/texture.tcl new file mode 100644 index 00000000..85067ff2 --- /dev/null +++ b/ng/Togl2.1/texture.tcl @@ -0,0 +1,278 @@ +#!/bin/sh +# the next line restarts using tclsh \ +exec tclsh "$0" "$@" + +# $Id: texture.tcl,v 1.8 2007/08/03 16:48:50 gregcouch Exp $ + +# Togl - a Tk OpenGL widget +# Copyright (C) 1996 Brian Paul and Ben Bederson +# Copyright (C) 2006-2007 Greg Couch +# See the LICENSE file for copyright details. + + +# Togl texture map demo + +package provide texture 1.0 + +# add parent directory to path to find Togl's pkgIndex in current directory +if { [file exists pkgIndex.tcl] } { + set auto_path [linsert $auto_path 0 ..] +} +# following load also loads Tk and Togl packages +load [file dirname [info script]]/texture[info sharedlibextension] + +# create ::texture namespace +namespace eval ::texture { +} + +# Called magnification filter changes +proc ::texture::new_magfilter {} { + global magfilter + mag_filter .f1.view $magfilter +} + + +# Called minification filter changes +proc ::texture::new_minfilter {} { + global minfilter + min_filter .f1.view $minfilter +} + + +# Called when texture image radio button changes +proc ::texture::new_image {} { + global image + teximage .f1.view $image +} + + +# Called when texture S wrap button changes +proc ::texture::new_swrap {} { + global swrap + swrap .f1.view $swrap +} + + +# Called when texture T wrap button changes +proc ::texture::new_twrap {} { + global twrap + twrap .f1.view $twrap +} + + +# Called when texture environment radio button selected +proc ::texture::new_env {} { + global envmode + envmode .f1.view $envmode +} + + +# Called when polygon color sliders change +proc ::texture::new_color { foo } { + global poly_red poly_green poly_blue + polycolor .f1.view $poly_red $poly_green $poly_blue +} + + +proc ::texture::new_coord_scale { name element op } { + global coord_scale + coord_scale .f1.view $coord_scale +} + +proc ::texture::take_photo {} { + image create photo teximg + .f1.view takephoto teximg + teximg write image.ppm -format ppm +} + +# Make the widgets +proc ::texture::setup {} { + global magfilter + global minfilter + global image + global swrap + global twrap + global envmode + global poly_red + global poly_green + global poly_blue + global coord_scale + global startx starty # location of mouse when button pressed + global xangle yangle + global xangle0 yangle0 + global texscale texscale0 + + wm title . "Texture Map Options" + + ### Two frames: top half and bottom half + frame .f1 + frame .f2 + + ### The OpenGL window + togl .f1.view -width 250 -height 250 -rgba true -double true -depth true -create create_cb -reshape reshape_cb -display display_cb + + + ### Filter radio buttons + frame .f1.filter -relief ridge -borderwidth 3 + + frame .f1.filter.mag -relief ridge -borderwidth 2 + + label .f1.filter.mag.label -text "Magnification Filter" -anchor w + radiobutton .f1.filter.mag.nearest -text GL_NEAREST -anchor w -variable magfilter -value GL_NEAREST -command ::texture::new_magfilter + radiobutton .f1.filter.mag.linear -text GL_LINEAR -anchor w -variable magfilter -value GL_LINEAR -command ::texture::new_magfilter + + frame .f1.filter.min -relief ridge -borderwidth 2 + + label .f1.filter.min.label -text "Minification Filter" -anchor w + radiobutton .f1.filter.min.nearest -text GL_NEAREST -anchor w -variable minfilter -value GL_NEAREST -command ::texture::new_minfilter + radiobutton .f1.filter.min.linear -text GL_LINEAR -anchor w -variable minfilter -value GL_LINEAR -command ::texture::new_minfilter + radiobutton .f1.filter.min.nearest_mipmap_nearest -text GL_NEAREST_MIPMAP_NEAREST -anchor w -variable minfilter -value GL_NEAREST_MIPMAP_NEAREST -command ::texture::new_minfilter + radiobutton .f1.filter.min.linear_mipmap_nearest -text GL_LINEAR_MIPMAP_NEAREST -anchor w -variable minfilter -value GL_LINEAR_MIPMAP_NEAREST -command ::texture::new_minfilter + radiobutton .f1.filter.min.nearest_mipmap_linear -text GL_NEAREST_MIPMAP_LINEAR -anchor w -variable minfilter -value GL_NEAREST_MIPMAP_LINEAR -command ::texture::new_minfilter + radiobutton .f1.filter.min.linear_mipmap_linear -text GL_LINEAR_MIPMAP_LINEAR -anchor w -variable minfilter -value GL_LINEAR_MIPMAP_LINEAR -command ::texture::new_minfilter + + pack .f1.filter.mag -fill x + pack .f1.filter.mag.label -fill x + pack .f1.filter.mag.nearest -side top -fill x + pack .f1.filter.mag.linear -side top -fill x + + pack .f1.filter.min -fill both -expand true + pack .f1.filter.min.label -side top -fill x + pack .f1.filter.min.nearest -side top -fill x + pack .f1.filter.min.linear -side top -fill x + pack .f1.filter.min.nearest_mipmap_nearest -side top -fill x + pack .f1.filter.min.linear_mipmap_nearest -side top -fill x + pack .f1.filter.min.nearest_mipmap_linear -side top -fill x + pack .f1.filter.min.linear_mipmap_linear -side top -fill x + + + ### Texture coordinate scale and wrapping + frame .f2.coord -relief ridge -borderwidth 3 + frame .f2.coord.scale -relief ridge -borderwidth 2 + label .f2.coord.scale.label -text "Max Texture Coord" -anchor w + entry .f2.coord.scale.entry -textvariable coord_scale + trace variable coord_scale w ::texture::new_coord_scale + + frame .f2.coord.s -relief ridge -borderwidth 2 + label .f2.coord.s.label -text "GL_TEXTURE_WRAP_S" -anchor w + radiobutton .f2.coord.s.repeat -text "GL_REPEAT" -anchor w -variable swrap -value GL_REPEAT -command ::texture::new_swrap + radiobutton .f2.coord.s.clamp -text "GL_CLAMP" -anchor w -variable swrap -value GL_CLAMP -command ::texture::new_swrap + + frame .f2.coord.t -relief ridge -borderwidth 2 + label .f2.coord.t.label -text "GL_TEXTURE_WRAP_T" -anchor w + radiobutton .f2.coord.t.repeat -text "GL_REPEAT" -anchor w -variable twrap -value GL_REPEAT -command ::texture::new_twrap + radiobutton .f2.coord.t.clamp -text "GL_CLAMP" -anchor w -variable twrap -value GL_CLAMP -command ::texture::new_twrap + + pack .f2.coord.scale -fill both -expand true + pack .f2.coord.scale.label -side top -fill x + pack .f2.coord.scale.entry -side top -fill x + + pack .f2.coord.s -fill x + pack .f2.coord.s.label -side top -fill x + pack .f2.coord.s.repeat -side top -fill x + pack .f2.coord.s.clamp -side top -fill x + + pack .f2.coord.t -fill x + pack .f2.coord.t.label -side top -fill x + pack .f2.coord.t.repeat -side top -fill x + pack .f2.coord.t.clamp -side top -fill x + + + ### Texture image radio buttons (just happens to fit into the coord frame) + frame .f2.env -relief ridge -borderwidth 3 + frame .f2.env.image -relief ridge -borderwidth 2 + label .f2.env.image.label -text "Texture Image" -anchor w + radiobutton .f2.env.image.checker -text "Checker" -anchor w -variable image -value CHECKER -command ::texture::new_image + radiobutton .f2.env.image.tree -text "Tree" -anchor w -variable image -value TREE -command ::texture::new_image + radiobutton .f2.env.image.face -text "Face" -anchor w -variable image -value FACE -command ::texture::new_image + pack .f2.env.image -fill x + pack .f2.env.image.label -side top -fill x + pack .f2.env.image.checker -side top -fill x + pack .f2.env.image.tree -side top -fill x + pack .f2.env.image.face -side top -fill x + + + ### Texture Environment + label .f2.env.label -text "GL_TEXTURE_ENV_MODE" -anchor w + radiobutton .f2.env.modulate -text "GL_MODULATE" -anchor w -variable envmode -value GL_MODULATE -command ::texture::new_env + radiobutton .f2.env.decal -text "GL_DECAL" -anchor w -variable envmode -value GL_DECAL -command ::texture::new_env + radiobutton .f2.env.blend -text "GL_BLEND" -anchor w -variable envmode -value GL_BLEND -command ::texture::new_env + pack .f2.env.label -fill x + pack .f2.env.modulate -side top -fill x + pack .f2.env.decal -side top -fill x + pack .f2.env.blend -side top -fill x + + ### Polygon color + frame .f2.color -relief ridge -borderwidth 3 + label .f2.color.label -text "Polygon color" -anchor w + scale .f2.color.red -label Red -from 0 -to 255 -orient horizontal -variable poly_red -command ::texture::new_color + scale .f2.color.green -label Green -from 0 -to 255 -orient horizontal -variable poly_green -command ::texture::new_color + scale .f2.color.blue -label Blue -from 0 -to 255 -orient horizontal -variable poly_blue -command ::texture::new_color + pack .f2.color.label -fill x + pack .f2.color.red -side top -fill x + pack .f2.color.green -side top -fill x + pack .f2.color.blue -side top -fill x + + + ### Main widgets + pack .f1.view -side left -fill both -expand true + pack .f1.filter -side left -fill y + pack .f1 -side top -fill both -expand true + + pack .f2.coord .f2.env -side left -fill both + pack .f2.color -fill x + pack .f2 -side top -fill x + + button .photo -text "Take Photo" -command ::texture::take_photo + pack .photo -expand true -fill both + button .quit -text Quit -command exit + pack .quit -expand true -fill both + + bind .f1.view { + set startx %x + set starty %y + set xangle0 $xangle + set yangle0 $yangle + } + + bind .f1.view { + set xangle [expr $xangle0 + (%x - $startx) / 3.0 ] + set yangle [expr $yangle0 + (%y - $starty) / 3.0 ] + yrot .f1.view $xangle + xrot .f1.view $yangle + } + + bind .f1.view { + set startx %x + set starty %y + set texscale0 $texscale + } + + bind .f1.view { + set q [ expr ($starty - %y) / 400.0 ] + set texscale [expr $texscale0 * exp($q)] + texscale .f1.view $texscale + } + + # set default values: + set minfilter GL_NEAREST_MIPMAP_LINEAR + set magfilter GL_LINEAR + set swrap GL_REPEAT + set twrap GL_REPEAT + set envmode GL_MODULATE + set image CHECKER + set poly_red 255 + set poly_green 255 + set poly_blue 255 + set coord_scale 1.0 + + set xangle 0.0 + set yangle 0.0 + set texscale 1.0 +} + + +# Execution starts here! +if { [info script] == $argv0 } { + ::texture::setup +} diff --git a/ng/Togl2.1/togl.c b/ng/Togl2.1/togl.c new file mode 100644 index 00000000..d9fe9321 --- /dev/null +++ b/ng/Togl2.1/togl.c @@ -0,0 +1,5405 @@ +/* $Id: togl.c,v 1.142 2009/12/23 21:50:49 gregcouch Exp $ */ + +/* vi:set sw=4 expandtab: */ + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +/* + * Currently we support X11, Win32 and Mac OS X only + */ + +#define USE_TOGL_STUB_PROCS +#include "togl.h" +#include +#include +#include + +#ifndef TOGL_USE_FONTS +# define TOGL_USE_FONTS 1 +#endif +#if (TK_MAJOR_VERSION > 8 || TK_MINOR_VERSION > 4) && !defined(TOGL_WGL) +/* X11 and Aqua font technology changed in 8.5 */ +# undef TOGL_USE_FONTS +#endif +#ifndef TOGL_USE_OVERLAY +# if defined(TOGL_X11) || defined(TOGL_WGL) +# define TOGL_USE_OVERLAY 1 +# endif +#endif + +/* Use TCL_STUPID to cast (const char *) to (char *) where the Tcl function + * prototype argument should really be const */ +#define TCL_STUPID (char *) + +/* Use WIDGREC to cast widgRec or recordPtr arguments */ +#define WIDGREC (char *) + +/*** Windows headers ***/ +#if defined(TOGL_WGL) +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +# include +# ifndef PFD_SUPPORT_COMPOSITION +// for Vista -- not strictly needed because we don't use PFD_SUPPORT_GDI/BITMAP +# define PFD_SUPPORT_COMPOSITION 0x00008000 +# endif +# include +# include +# ifdef _MSC_VER +# include +# else +# ifdef UNICODE +# define StringCchPrintf snwprintf +# else +# define StringCchPrintf snprintf +# endif +# endif + +/*** X Window System headers ***/ +#elif defined(TOGL_X11) +# include +# include +# include /* for XA_RGB_DEFAULT_MAP atom */ +# if !defined(USE_SYSTEM_XMU) +# include "Xmu/StdCmap.h" +# else +# if defined(__vms) +# include /* for XmuLookupStandardColormap */ +# else +# include /* for XmuLookupStandardColormap */ +# endif +# endif +# define GLX_GLXEXT_LEGACY /* include glxext.h separately */ +# include + /* we want the prototype typedefs from glxext.h */ +# undef GLX_VERSION_1_3 +# undef GLX_VERSION_1_4 +# ifdef UNDEF_GET_PROC_ADDRESS +# undef GLX_ARB_get_proc_address +# endif +# include +# ifdef __sgi +# include +# endif +# ifdef HAVE_AUTOSTEREO +# include +# endif + +/*** Mac Carbon headers ***/ +#elif defined(TOGL_AGL) +# define Cursor QDCursor +# include +# undef Cursor +# include /* usa MacDrawable */ +# include +# define Togl_MacOSXGetDrawablePort(togl) TkMacOSXGetDrawablePort((Drawable) ((TkWindow *) togl->TkWin)->privatePtr) + +/*** Mac Cocoa headers ***/ +#elif defined(TOGL_NSOPENGL) +#undef panic +# include +# include /* Use NSOpenGLContext */ +# include /* Use NSView */ +# include /* Use NSWindow */ +# include /* Use NSView setWantsBestResolutionOpenGLSurface */ +# include /* Use NSEvent */ +# include /* Use NSTouch */ +# include /* Use NSRect */ +# include /* Use MacDrawable */ +# include +# define Togl_MacOSXGetDrawablePort(togl) TkMacOSXGetDrawablePort((Drawable) ((TkWindow *) togl->TkWin)->privatePtr) + +# include +# ifndef __MAC_10_7 +/* Define Mac retina display routines not available prior to Mac OS 10.7 */ +@interface NSView (NSOpenGLSurfaceResolution) +- (BOOL)wantsBestResolutionOpenGLSurface; +- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; +- (NSRect)convertRectToBacking:(NSRect)aRect; +#define NSEventPhaseNone 0 +@end +# endif + +#else /* make sure only one platform defined */ +# error Unsupported platform, or confused platform defines... +#endif + +#define NC3D "NVidia Consumer 3D Stereo" + +#ifndef STEREO_BUFFER_NONE +/* From , but we use this constants elsewhere */ +# define STEREO_BUFFER_NONE 0 +# define STEREO_BUFFER_LEFT 1 +# define STEREO_BUFFER_RIGHT 2 +#endif + +/*** Standard C headers ***/ +#include +#include +#include + +#ifdef TOGL_WGL +# include +#endif + +#if TK_MAJOR_VERSION < 8 +# error Sorry Togl requires Tcl/Tk ver 8.0 or higher. +#endif + +#ifdef USE_TCL_STUBS +# if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 1) +# error Sorry stub support requires Tcl/Tk ver 8.1 or higher. +# endif +#endif + +#if defined(TOGL_AGL) +# if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 4) +# error Sorry Mac Aqua version requires Tcl/Tk ver 8.4.0 or higher. +# endif +#endif /* TOGL_AGL */ + +#if defined(TOGL_NSOPENGL) +# if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 6) +# error Sorry Mac Cocoa version requires Tcl/Tk ver 8.6.0 or higher. +# endif +#endif /* TOGL_NSOPENGL */ + +#if defined(TOGL_WGL) && defined(_MSC_VER) +# define snprintf _snprintf +# pragma warning(disable:4995) +#endif + +/* workaround for bug #123153 in tcl ver8.4a2 (tcl.h) */ +#if defined(Tcl_InitHashTable) && defined(USE_TCL_STUBS) +# undef Tcl_InitHashTable +# define Tcl_InitHashTable (tclStubsPtr->tcl_InitHashTable) +#endif +#if TK_MAJOR_VERSION > 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4) +# define HAVE_TK_SETCLASSPROCS +/* pointer to Tk_SetClassProcs function in the stub table */ + +#if TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 6 +static void (*SetClassProcsPtr) + _ANSI_ARGS_((Tk_Window, Tk_ClassProcs *, ClientData)); +#else +static void (*SetClassProcsPtr) + _ANSI_ARGS_((Tk_Window, const Tk_ClassProcs *, ClientData)); +#endif +#endif + +/* + * Copy of TkClassProcs declarations from tkInt.h + * (this is needed for Tcl ver =< 8.4a3) + */ + +typedef Window (TkClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin, + Window parent, ClientData instanceData)); +typedef void (TkClassGeometryProc) _ANSI_ARGS_((ClientData instanceData)); +typedef void (TkClassModalProc) _ANSI_ARGS_((Tk_Window tkwin, + XEvent *eventPtr)); +typedef struct TkClassProcs +{ + TkClassCreateProc *createProc; + TkClassGeometryProc *geometryProc; + TkClassModalProc *modalProc; +} TkClassProcs; + + +/* Defaults */ +#define DEFAULT_WIDTH "400" +#define DEFAULT_HEIGHT "400" +#define DEFAULT_IDENT "" +#define DEFAULT_FONTNAME "Courier" +#define DEFAULT_TIME "1" + + +#ifdef TOGL_WGL +/* Maximum size of a logical palette corresponding to a colormap in color index + * mode. */ +# define MAX_CI_COLORMAP_SIZE 4096 +# define MAX_CI_COLORMAP_BITS 12 + +# if TOGL_USE_FONTS != 1 +/* + * copy of TkWinColormap from tkWinInt.h + */ + +typedef struct +{ + HPALETTE palette; /* Palette handle used when drawing. */ + UINT size; /* Number of entries in the palette. */ + int stale; /* 1 if palette needs to be realized, otherwise + * 0. If the palette is stale, then an idle + * handler is scheduled to realize the palette. + */ + Tcl_HashTable refCounts; /* Hash table of palette entry reference counts + * indexed by pixel value. */ +} TkWinColormap; +# else +# include +# endif + +static LRESULT(CALLBACK *tkWinChildProc) (HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam) = NULL; + +# ifndef TK_WIN_CHILD_CLASS_NAME +# define TK_WIN_CHILD_CLASS_NAME "TkChild" +# endif + +#endif /* TOGL_WGL */ + + +#define MAX(a,b) (((a)>(b))?(a):(b)) + +#define TCL_ERR(interp, string) \ + do { \ + Tcl_ResetResult(interp); \ + Tcl_AppendResult(interp, string, NULL); \ + return TCL_ERROR; \ + } while (0) + +#define ALL_EVENTS_MASK \ + (KeyPressMask \ + |KeyReleaseMask \ + |ButtonPressMask \ + |ButtonReleaseMask \ + |EnterWindowMask \ + |LeaveWindowMask \ + |PointerMotionMask \ + |ExposureMask \ + |VisibilityChangeMask \ + |FocusChangeMask \ + |PropertyChangeMask \ + |ColormapChangeMask) + +/* + * The following structure contains pointers to functions used for + * processing the custom "-stereo" option. Copied from tkPanedWindow.c. + */ +static int SetStereo(ClientData clientData, Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj **value, char *recordPtr, + int internalOffset, char *oldInternalPtr, int flags); +static Tcl_Obj *GetStereo(ClientData clientData, Tk_Window tkwin, + char *recordPtr, int internalOffset); +static void RestoreStereo(ClientData clientData, Tk_Window tkwin, + char *internalPtr, char *oldInternalPtr); + +static Tk_ObjCustomOption stereoOption = { + "stereo", /* name */ + SetStereo, /* setProc */ + GetStereo, /* getProc */ + RestoreStereo, /* restoreProc */ + NULL, /* freeProc */ + 0 +}; + +/* + * The following structure contains pointers to functions used for + * processing the custom "-pixelformat" option. Copied from tkPanedWindow.c. + */ +static int SetWideInt(ClientData clientData, Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj **value, char *recordPtr, + int internalOffset, char *oldInternalPtr, int flags); +static Tcl_Obj *GetWideInt(ClientData clientData, Tk_Window tkwin, + char *recordPtr, int internalOffset); +static void RestoreWideInt(ClientData clientData, Tk_Window tkwin, + char *internalPtr, char *oldInternalPtr); + +static Tk_ObjCustomOption wideIntOption = { + "wide int", /* name */ + SetWideInt, /* setProc */ + GetWideInt, /* getProc */ + RestoreWideInt, /* restoreProc */ + NULL, /* freeProc */ + 0 +}; + +/* + * Stuff we initialize on a per package (Togl_Init) basis. + * Since Tcl uses one interpreter per thread, any per-thread + * data goes here. + */ +struct Togl_PackageGlobals +{ + Tk_OptionTable optionTable; /* Used to parse options */ + Togl *toglHead; /* Head of linked list of all Togl widgets */ + int nextContextTag; /* Used to assign similar context tags */ +}; +typedef struct Togl_PackageGlobals Togl_PackageGlobals; + +extern ToglStubs toglStubs; /* should be only non-const global */ + +#if defined(TOGL_NSOPENGL) + +/* Handle window drags between retina and non-retina displays. */ +@interface ToglNSView : NSView { + struct Togl *togl; +} +- (void) setTogl: (struct Togl*)t; +- (void) viewDidChangeBackingProperties; +- (void) magnifyWithEvent: (NSEvent *)event; +- (void) rotateWithEvent: (NSEvent *)event; +- (void) scrollWheel: (NSEvent *)event; +- (void)touchesBeganWithEvent:(NSEvent *)event; +- (void)touchesMovedWithEvent:(NSEvent *)event; +- (void)touchesEndedWithEvent:(NSEvent *)event; +- (void)touchesCancelledWithEvent:(NSEvent *)event; +- (void)reportEventTouches:(NSEvent *)event; + +@end + +#endif + +struct Togl +{ + Togl *Next; /* next in linked list */ + +#if defined(TOGL_WGL) + HGLRC Ctx; /* OpenGL rendering context to be made current */ + HDC tglGLHdc; /* Device context of device that OpenGL calls + * will be drawn on */ + int CiColormapSize; /* (Maximum) size of colormap in color index + * mode */ +#elif defined(TOGL_X11) + GLXContext Ctx; /* Normal planes GLX context */ +#elif defined(TOGL_AGL) + AGLContext Ctx; +#elif defined(TOGL_NSOPENGL) + NSOpenGLContext *Ctx; + ToglNSView *nsview; +#endif + int contextTag; /* all contexts with same tag share display + * lists */ + + XVisualInfo *VisInfo; /* Visual info of the current */ + + Display *display; /* X's token for the window's display. */ + Tk_Window TkWin; /* Tk window structure */ + Tcl_Interp *Interp; /* Tcl interpreter */ + Tcl_Command widgetCmd; /* Token for togl's widget command */ + Togl_PackageGlobals *tpg; /* Used to access globals */ +#ifndef NO_TK_CURSOR + Tk_Cursor Cursor; /* The widget's cursor */ +#endif + int Width, Height; /* Dimensions of window */ + int PixelScale; /* Graphics pixels per Tk pixel. */ + /* 1 for normal display. */ + /* 2 for Mac retina display. */ + int SetGrid; /* positive is grid size for window manager */ + int TimerInterval; /* Time interval for timer in milliseconds */ + Tcl_TimerToken timerHandler; /* Token for togl's timer handler */ + Bool RgbaFlag; /* configuration flags (ala GLX parameters) */ + int RgbaRed; + int RgbaGreen; + int RgbaBlue; + Bool DoubleFlag; + Bool DepthFlag; + int DepthSize; + Bool AccumFlag; + int AccumRed; + int AccumGreen; + int AccumBlue; + int AccumAlpha; + Bool AlphaFlag; + int AlphaSize; + Bool StencilFlag; + int StencilSize; + Bool PrivateCmapFlag; + Bool OverlayFlag; + int Stereo; + double EyeSeparation; + double Convergence; + GLuint riStencilBit; /* row interleaved stencil bit */ + int AuxNumber; + Bool Indirect; +#if defined(TOGL_NSOPENGL) + NSOpenGLPixelFormat *PixelFormat; +#else + Tcl_WideInt PixelFormat; +#endif + int SwapInterval; + Bool MultisampleFlag; + Bool FullscreenFlag; + Bool PbufferFlag; + Bool LargestPbufferFlag; +#if defined(TOGL_X11) + GLXFBConfig fbcfg; /* cache FBConfig for pbuffer creation */ + GLXPbuffer pbuf; +#elif defined(TOGL_WGL) + HPBUFFERARB pbuf; + int pbufferLost; +#elif defined(TOGL_AGL) + AGLPbuffer pbuf; +#elif defined(TOGL_NSOPENGL) + NSOpenGLPixelBuffer *pbuf; +#endif + const char *ShareList; /* name (ident) of Togl to share dlists with */ + const char *ShareContext; /* name (ident) to share OpenGL context with */ + + const char *Ident; /* User's identification string */ + ClientData Client_Data; /* Pointer to user data */ + + Bool UpdatePending; /* Should normal planes be redrawn? */ + + Tcl_Obj *CreateProc; /* Callback when widget is realized */ + Tcl_Obj *DisplayProc; /* Callback when widget is redrawn */ + Tcl_Obj *ReshapeProc; /* Callback when window size changes */ + Tcl_Obj *DestroyProc; /* Callback when widget is destroyed */ + Tcl_Obj *TimerProc; /* Callback when widget is idle */ + Tcl_Obj *MagnifyProc; /* Callback for track pad pinch gesture */ + Tcl_Obj *RotateProc; /* Callback for track pad rotate gesture */ + Tcl_Obj *ScrollProc; /* Callback for track pad scroll gesture */ + Tcl_Obj *ScrollWheelProc; /* Callback for mouse scroll wheel, not trackpad */ + Tcl_Obj *TouchesProc; /* Callback for track pad touches */ + + /* Overlay stuff */ +#if defined(TOGL_X11) + GLXContext OverlayCtx; /* Overlay planes OpenGL context */ +#elif defined(TOGL_WGL) + HGLRC tglGLOverlayHglrc; +#endif + + Window OverlayWindow; /* The overlay window, or 0 */ + Tcl_Obj *OverlayDisplayProc; /* Overlay redraw proc */ + Bool OverlayUpdatePending; /* Should overlay be redrawn? */ + Colormap OverlayCmap; /* colormap for overlay is created */ + int OverlayTransparentPixel; /* transparent pixel */ + Bool OverlayIsMapped; + + GLfloat *RedMap; /* Index2RGB Maps for Color index modes */ + GLfloat *GreenMap; + GLfloat *BlueMap; + GLint MapSize; /* = Number of indices in our Togl */ + int currentStereoBuffer; +#ifdef HAVE_AUTOSTEREO + int as_initialized; /* for autostereo package */ + ASHandle ash; /* for autostereo package */ +#endif + int badWindow; /* true when Togl_MakeWindow fails or should + * create a dummy window */ +}; + +int Togl_CallCallback(Togl *togl, Tcl_Obj *cmd); +static int Togl_CallCallback_P(Togl *togl, Tcl_Obj *cmd, double *params, int nparams); + +#if defined(TOGL_NSOPENGL) + +static int viewPixelScale(NSView *nsview); +@implementation ToglNSView + +- (void) setTogl: (struct Togl*)t +{ + togl = t; +} + +- (void) viewDidChangeBackingProperties +{ + [super viewDidChangeBackingProperties]; + if (togl && togl->ReshapeProc) { + int pscale = viewPixelScale(self); + if (pscale != togl->PixelScale) { + togl->PixelScale = pscale; + if (togl->ReshapeProc) + (void) Togl_CallCallback(togl, togl->ReshapeProc); + Togl_PostRedisplay(togl); + } + } +} + +- (void) magnifyWithEvent: (NSEvent *)event +{ + if (togl && togl->MagnifyProc) { + double mag = [event magnification] + 1.0; + (void) Togl_CallCallback_P(togl, togl->MagnifyProc, &mag, 1); + } +} + +- (void) rotateWithEvent: (NSEvent *)event +{ + if (togl && togl->RotateProc) { + double deg = [event rotation]; + (void) Togl_CallCallback_P(togl, togl->RotateProc, °, 1); + } +} + +- (void) scrollWheel: (NSEvent *)event +{ + if (togl && (togl->ScrollProc || togl->ScrollWheelProc)) { + float dx = [event deltaX], dy = [event deltaY]; + if (dx != 0 || dy != 0) { + // float track_pad = ((([event phase] == NSEventPhaseNone) && + // ([event momentumPhase] == NSEventPhaseNone)) ? 0 : 1); + float track_pad = ([event subtype] == NSMouseEventSubtype ? 0 : 1); + double args[3] = {dx, dy, track_pad}; + if (togl->ScrollProc) + (void) Togl_CallCallback_P(togl, togl->ScrollProc, args, 3); + if (togl->ScrollWheelProc && !track_pad) + (void) Togl_CallCallback_P(togl, togl->ScrollWheelProc, args+1, 1); + } + } +} + +- (void)touchesBeganWithEvent:(NSEvent *)event +{ NSWindow *win = [self window]; + [win makeKeyWindow]; + [win makeMainWindow]; + [self reportEventTouches:event]; + } +- (void)touchesMovedWithEvent:(NSEvent *)event +{ [self reportEventTouches:event]; } +- (void)touchesEndedWithEvent:(NSEvent *)event +{ [self reportEventTouches:event]; } +- (void)touchesCancelledWithEvent:(NSEvent *)event; +{ [self reportEventTouches:event]; } +- (void)reportEventTouches: (NSEvent *)event +{ + if (togl && togl->TouchesProc) { + NSSet *touches = [event touchesMatchingPhase:NSTouchPhaseTouching inView:self]; + int n = touches.count, i; + double *id_xy = NULL; + if (n >= 0) { + id_xy = (double *)malloc(3*n*sizeof(double)); + NSArray *array = [touches allObjects]; + for (i = 0 ; i < n ; ++i) { + NSTouch *t = [array objectAtIndex:i]; + id_xy[3*i] = (long)t.identity; + id_xy[3*i+1] = t.normalizedPosition.x * t.deviceSize.width; + id_xy[3*i+2] = t.normalizedPosition.y * t.deviceSize.height; + } + (void) Togl_CallCallback_P(togl, togl->TouchesProc, id_xy, 3*n); + if (id_xy) + free(id_xy); + } + } +} + +@end + +#endif + +/* + * Prototypes for functions local to this file + */ +static int Togl_ObjCmd(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const *objv); +static void Togl_ObjCmdDelete(ClientData clientData); +static void Togl_EventProc(ClientData clientData, XEvent *eventPtr); +static void Togl_RedisplayProc(ClientData clientData, XEvent *eventPtr); +static Window Togl_MakeWindow(Tk_Window, Window, ClientData); +static void Togl_WorldChanged(ClientData); +static void Togl_SetViewPort(const struct Togl *); + +#ifdef MESA_COLOR_HACK +static int get_free_color_cells(Display *display, int screen, + Colormap colormap); +static void free_default_color_cells(Display *display, Colormap colormap); +#endif +static void ToglCmdDeletedProc(ClientData); + +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) +static void SetMacBufRect(Togl *togl); +#endif + +#if defined(TOGL_WGL) +# include "toglWGL.c" +#elif defined(TOGL_AGL) +# include "toglAGL.c" +#elif defined(TOGL_NSOPENGL) +# include "toglNSOpenGL.c" +#elif defined(TOGL_X11) +# include "toglGLX.c" +#endif + + +/* + * Setup Togl widget configuration options: + */ + +#define GEOMETRY_MASK 0x1 /* widget geometry */ +#define FORMAT_MASK 0x2 /* pixel format */ +#define CURSOR_MASK 0x4 +#define TIMER_MASK 0x8 +#define OVERLAY_MASK 0x10 +#define SWAP_MASK 0x20 +#define STEREO_MASK 0x40 +#define STEREO_FORMAT_MASK 0x80 + +static Tk_OptionSpec optionSpecs[] = { + {TK_OPTION_PIXELS, TCL_STUPID "-height", "height", "Height", + DEFAULT_HEIGHT, -1, Tk_Offset(Togl, Height), 0, NULL, + GEOMETRY_MASK}, + {TK_OPTION_PIXELS, TCL_STUPID "-width", "width", "Width", + DEFAULT_WIDTH, -1, Tk_Offset(Togl, Width), 0, NULL, + GEOMETRY_MASK}, + {TK_OPTION_INT, TCL_STUPID "-pixelscale", "pixelscale", "PixelScale", + "1", -1, Tk_Offset(Togl, PixelScale), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-rgba", "rgba", "Rgba", + "true", -1, Tk_Offset(Togl, RgbaFlag), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-redsize", "redsize", "RedSize", + "1", -1, Tk_Offset(Togl, RgbaRed), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-greensize", "greensize", "GreenSize", + "1", -1, Tk_Offset(Togl, RgbaGreen), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-bluesize", "bluesize", "BlueSize", + "1", -1, Tk_Offset(Togl, RgbaBlue), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-double", "double", "Double", + "false", -1, Tk_Offset(Togl, DoubleFlag), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-depth", "depth", "Depth", + "false", -1, Tk_Offset(Togl, DepthFlag), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-depthsize", "depthsize", "DepthSize", + "1", -1, Tk_Offset(Togl, DepthSize), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-accum", "accum", "Accum", + "false", -1, Tk_Offset(Togl, AccumFlag), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-accumredsize", "accumredsize", "AccumRedSize", + "1", -1, Tk_Offset(Togl, AccumRed), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-accumgreensize", "accumgreensize", + "AccumGreenSize", + "1", -1, Tk_Offset(Togl, AccumGreen), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-accumbluesize", "accumbluesize", + "AccumBlueSize", + "1", -1, Tk_Offset(Togl, AccumBlue), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-accumalphasize", "accumalphasize", + "AccumAlphaSize", + "1", -1, Tk_Offset(Togl, AccumAlpha), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-alpha", "alpha", "Alpha", + "false", -1, Tk_Offset(Togl, AlphaFlag), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-alphasize", "alphasize", "AlphaSize", + "1", -1, Tk_Offset(Togl, AlphaSize), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-stencil", "stencil", "Stencil", + "false", -1, Tk_Offset(Togl, StencilFlag), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-stencilsize", "stencilsize", "StencilSize", + "1", -1, Tk_Offset(Togl, StencilSize), 0, NULL, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-auxbuffers", "auxbuffers", "AuxBuffers", + "0", -1, Tk_Offset(Togl, AuxNumber), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-privatecmap", "privateCmap", "PrivateCmap", + "false", -1, Tk_Offset(Togl, PrivateCmapFlag), 0, NULL, + FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-overlay", "overlay", "Overlay", + "false", -1, Tk_Offset(Togl, OverlayFlag), 0, NULL, OVERLAY_MASK}, + {TK_OPTION_CUSTOM, TCL_STUPID "-stereo", "stereo", "Stereo", + "", -1, Tk_Offset(Togl, Stereo), 0, + (ClientData) &stereoOption, STEREO_FORMAT_MASK}, + {TK_OPTION_DOUBLE, TCL_STUPID "-eyeseparation", "eyeseparation", + "EyeSeparation", + "2.0", -1, Tk_Offset(Togl, EyeSeparation), 0, NULL, STEREO_MASK}, + {TK_OPTION_DOUBLE, TCL_STUPID "-convergence", "convergence", "Convergence", + "35.0", -1, Tk_Offset(Togl, Convergence), 0, NULL, STEREO_MASK}, +#ifndef NO_TK_CURSOR + {TK_OPTION_CURSOR, TCL_STUPID "-cursor", "cursor", "Cursor", + "", -1, Tk_Offset(Togl, Cursor), TK_OPTION_NULL_OK, NULL, + CURSOR_MASK}, +#endif + {TK_OPTION_INT, TCL_STUPID "-setgrid", "setGrid", "SetGrid", + "0", -1, Tk_Offset(Togl, SetGrid), 0, NULL, GEOMETRY_MASK}, + {TK_OPTION_INT, TCL_STUPID "-time", "time", "Time", + DEFAULT_TIME, -1, Tk_Offset(Togl, TimerInterval), 0, NULL, + TIMER_MASK}, + {TK_OPTION_STRING, TCL_STUPID "-sharelist", "sharelist", "ShareList", + NULL, -1, Tk_Offset(Togl, ShareList), 0, NULL, FORMAT_MASK}, + {TK_OPTION_STRING, TCL_STUPID "-sharecontext", "sharecontext", + "ShareContext", NULL, + -1, Tk_Offset(Togl, ShareContext), 0, NULL, FORMAT_MASK}, + {TK_OPTION_STRING, TCL_STUPID "-ident", "ident", "Ident", + DEFAULT_IDENT, -1, Tk_Offset(Togl, Ident), 0, NULL, 0}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-indirect", "indirect", "Indirect", + "false", -1, Tk_Offset(Togl, Indirect), 0, NULL, FORMAT_MASK}, + {TK_OPTION_CUSTOM, TCL_STUPID "-pixelformat", "pixelFormat", "PixelFormat", + "0", -1, Tk_Offset(Togl, PixelFormat), 0, + (ClientData) &wideIntOption, FORMAT_MASK}, + {TK_OPTION_INT, TCL_STUPID "-swapinterval", "swapInterval", "SwapInterval", + "1", -1, Tk_Offset(Togl, SwapInterval), 0, NULL, SWAP_MASK}, +#if 0 + {TK_OPTION_BOOLEAN, TCL_STUPID "-fullscreen", "fullscreen", "Fullscreen", + "false", -1, Tk_Offset(Togl, FullscreenFlag), 0, NULL, + GEOMETRY_MASK|FORMAT_MASK}, +#endif + {TK_OPTION_BOOLEAN, TCL_STUPID "-multisample", "multisample", "Multisample", + "false", -1, Tk_Offset(Togl, MultisampleFlag), 0, NULL, + FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-pbuffer", "pbuffer", "Pbuffer", + "false", -1, Tk_Offset(Togl, PbufferFlag), 0, NULL, FORMAT_MASK}, + {TK_OPTION_BOOLEAN, TCL_STUPID "-largestpbuffer", "largestpbuffer", + "LargestPbuffer", + "false", -1, Tk_Offset(Togl, LargestPbufferFlag), 0, NULL, 0}, + {TK_OPTION_STRING, TCL_STUPID "-createcommand", "createCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, CreateProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_SYNONYM, TCL_STUPID "-create", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-createcommand", 0}, + {TK_OPTION_STRING, TCL_STUPID "-displaycommand", "displayCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, DisplayProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_SYNONYM, TCL_STUPID "-display", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-displaycommand", 0}, + {TK_OPTION_STRING, TCL_STUPID "-reshapecommand", "reshapeCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, ReshapeProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_SYNONYM, TCL_STUPID "-reshape", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-reshapecommand", 0}, + {TK_OPTION_STRING, TCL_STUPID "-destroycommand", "destroyCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, DestroyProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_SYNONYM, TCL_STUPID "-destroy", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-destroycommand", 0}, + {TK_OPTION_STRING, TCL_STUPID "-timercommand", "timerCommand", + "CallabckCommand", NULL, + Tk_Offset(Togl, TimerProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_SYNONYM, TCL_STUPID "-timer", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-timercommand", 0}, + {TK_OPTION_STRING, TCL_STUPID "-overlaydisplaycommand", + "overlaydisplayCommand", "CallbackCommand", NULL, + Tk_Offset(Togl, OverlayDisplayProc), -1, + TK_OPTION_NULL_OK, NULL, OVERLAY_MASK}, + {TK_OPTION_SYNONYM, TCL_STUPID "-overlaydisplay", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-overlaydisplaycommand", 0}, + {TK_OPTION_STRING, TCL_STUPID "-magnifycommand", "magnifyCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, MagnifyProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_STRING, TCL_STUPID "-rotatecommand", "rotateCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, RotateProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_STRING, TCL_STUPID "-scrollcommand", "scrollCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, ScrollProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_STRING, TCL_STUPID "-scrollwheelcommand", "scrollWheelCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, ScrollWheelProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_STRING, TCL_STUPID "-touchescommand", "touchesCommand", + "CallbackCommand", NULL, + Tk_Offset(Togl, TouchesProc), -1, TK_OPTION_NULL_OK, NULL, 0}, + + /* Tcl3D backwards compatibility */ + {TK_OPTION_SYNONYM, TCL_STUPID "-createproc", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-createcommand", 0}, + {TK_OPTION_SYNONYM, TCL_STUPID "-displayproc", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-displaycommand", 0}, + {TK_OPTION_SYNONYM, TCL_STUPID "-reshapeproc", NULL, NULL, + NULL, -1, -1, 0, (ClientData) "-reshapecommand", 0}, + /* end Tcl3D compatibility */ + {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, -1, 0, NULL, 0} +}; + +/* + * Add given togl widget to linked list. + */ +static void +AddToList(Togl *t) +{ + t->Next = t->tpg->toglHead; + t->tpg->toglHead = t; +} + +/* + * Remove given togl widget from linked list. + */ +static void +RemoveFromList(Togl *t) +{ + Togl *prev; + Togl *cur; + + for (cur = t->tpg->toglHead, prev = NULL; cur; prev = cur, cur = cur->Next) { + if (t != cur) + continue; + if (prev) { + prev->Next = cur->Next; + } else { + t->tpg->toglHead = cur->Next; + } + break; + } + if (cur) + cur->Next = NULL; +} + +/* + * Return pointer to togl widget given a user identifier string. + */ +static Togl * +FindTogl(Togl *togl, const char *ident) +{ + Togl *t; + + if (ident[0] != '.') { + for (t = togl->tpg->toglHead; t; t = t->Next) { + if (strcmp(t->Ident, ident) == 0) + break; + } + } else { + for (t = togl->tpg->toglHead; t; t = t->Next) { + const char *pathname = Tk_PathName(t->TkWin); + + if (strcmp(pathname, ident) == 0) + break; + } + } + return t; +} + + +/* + * Return pointer to another togl widget with same OpenGL context. + */ +static Togl * +FindToglWithSameContext(const Togl *togl) +{ + Togl *t; + + for (t = togl->tpg->toglHead; t != NULL; t = t->Next) { + if (t == togl) + continue; + if (t->Ctx == togl->Ctx) { + return t; + } + } + return NULL; +} + +#if TOGL_USE_OVERLAY +/* + * Return pointer to another togl widget with same OpenGL overlay context. + */ +static Togl * +FindToglWithSameOverlayContext(const Togl *togl) +{ + Togl *t; + + for (t = togl->tpg->toglHead; t != NULL; t = t->Next) { + if (t == togl) + continue; +# if defined(TOGL_X11) + if (t->OverlayCtx == togl->OverlayCtx) +# elif defined(TOGL_WGL) + if (t->tglGLOverlayHglrc == togl->tglGLOverlayHglrc) +# endif + { + return t; + } + } + return NULL; +} +#endif + +#if defined(TOGL_X11) +/* + * Return an X colormap to use for OpenGL RGB-mode rendering. + * Input: dpy - the X display + * scrnum - the X screen number + * visinfo - the XVisualInfo as returned by glXChooseVisual() + * Return: an X Colormap or 0 if there's a _serious_ error. + */ +static Colormap +get_rgb_colormap(Display *dpy, + int scrnum, const XVisualInfo *visinfo, Tk_Window tkwin) +{ + Atom hp_cr_maps; + Status status; + int numCmaps; + int i; + XStandardColormap *standardCmaps; + Window root = XRootWindow(dpy, scrnum); + Bool using_mesa; + + /* + * First check if visinfo's visual matches the default/root visual. + */ + if (visinfo->visual == Tk_Visual(tkwin)) { + /* use the default/root colormap */ + Colormap cmap; + + cmap = Tk_Colormap(tkwin); +# ifdef MESA_COLOR_HACK + (void) get_free_color_cells(dpy, scrnum, cmap); +# endif + return cmap; + } + + /* + * Check if we're using Mesa. + */ + if (strstr(glXQueryServerString(dpy, scrnum, GLX_VERSION), "Mesa")) { + using_mesa = True; + } else { + using_mesa = False; + } + + /* + * Next, if we're using Mesa and displaying on an HP with the "Color + * Recovery" feature and the visual is 8-bit TrueColor, search for a + * special colormap initialized for dithering. Mesa will know how to + * dither using this colormap. + */ + if (using_mesa) { + hp_cr_maps = XInternAtom(dpy, "_HP_RGB_SMOOTH_MAP_LIST", True); + if (hp_cr_maps +# ifdef __cplusplus + && visinfo->visual->c_class == TrueColor +# else + && visinfo->visual->class == TrueColor +# endif + && visinfo->depth == 8) { + status = XGetRGBColormaps(dpy, root, &standardCmaps, + &numCmaps, hp_cr_maps); + if (status) { + for (i = 0; i < numCmaps; i++) { + if (standardCmaps[i].visualid == visinfo->visual->visualid) { + Colormap cmap = standardCmaps[i].colormap; + + (void) XFree(standardCmaps); + return cmap; + } + } + (void) XFree(standardCmaps); + } + } + } + + /* + * Next, try to find a standard X colormap. + */ +# if !HP && !SUN +# ifndef SOLARIS_BUG + status = XmuLookupStandardColormap(dpy, visinfo->screen, + visinfo->visualid, visinfo->depth, XA_RGB_DEFAULT_MAP, + /* replace */ False, /* retain */ True); + if (status == 1) { + status = XGetRGBColormaps(dpy, root, &standardCmaps, + &numCmaps, XA_RGB_DEFAULT_MAP); + if (status == 1) { + for (i = 0; i < numCmaps; i++) { + if (standardCmaps[i].visualid == visinfo->visualid) { + Colormap cmap = standardCmaps[i].colormap; + + (void) XFree(standardCmaps); + return cmap; + } + } + (void) XFree(standardCmaps); + } + } +# endif +# endif + + /* + * If we get here, give up and just allocate a new colormap. + */ + return XCreateColormap(dpy, root, visinfo->visual, AllocNone); +} +#elif defined(TOGL_WGL) + +/* Code to create RGB palette is taken from the GENGL sample program of Win32 + * SDK */ + +static const unsigned char threeto8[8] = { + 0, 0111 >> 1, 0222 >> 1, 0333 >> 1, 0444 >> 1, 0555 >> 1, 0666 >> 1, 0377 +}; + +static const unsigned char twoto8[4] = { + 0, 0x55, 0xaa, 0xff +}; + +static const unsigned char oneto8[2] = { + 0, 255 +}; + +static const int defaultOverride[13] = { + 0, 3, 24, 27, 64, 67, 88, 173, 181, 236, 247, 164, 91 +}; + +static const PALETTEENTRY defaultPalEntry[20] = { + {0, 0, 0, 0}, + {0x80, 0, 0, 0}, + {0, 0x80, 0, 0}, + {0x80, 0x80, 0, 0}, + {0, 0, 0x80, 0}, + {0x80, 0, 0x80, 0}, + {0, 0x80, 0x80, 0}, + {0xC0, 0xC0, 0xC0, 0}, + + {192, 220, 192, 0}, + {166, 202, 240, 0}, + {255, 251, 240, 0}, + {160, 160, 164, 0}, + + {0x80, 0x80, 0x80, 0}, + {0xFF, 0, 0, 0}, + {0, 0xFF, 0, 0}, + {0xFF, 0xFF, 0, 0}, + {0, 0, 0xFF, 0}, + {0xFF, 0, 0xFF, 0}, + {0, 0xFF, 0xFF, 0}, + {0xFF, 0xFF, 0xFF, 0} +}; + +static unsigned char +ComponentFromIndex(int i, UINT nbits, UINT shift) +{ + unsigned char val; + + val = (unsigned char) (i >> shift); + switch (nbits) { + + case 1: + val &= 0x1; + return oneto8[val]; + + case 2: + val &= 0x3; + return twoto8[val]; + + case 3: + val &= 0x7; + return threeto8[val]; + + default: + return 0; + } +} + +static Colormap +Win32CreateRgbColormap(PIXELFORMATDESCRIPTOR pfd) +{ + TkWinColormap *cmap = (TkWinColormap *) ckalloc(sizeof (TkWinColormap)); + LOGPALETTE *pPal; + int n, i; + + n = 1 << pfd.cColorBits; + pPal = (PLOGPALETTE) LocalAlloc(LMEM_FIXED, sizeof (LOGPALETTE) + + n * sizeof (PALETTEENTRY)); + pPal->palVersion = 0x300; + pPal->palNumEntries = n; + for (i = 0; i < n; i++) { + pPal->palPalEntry[i].peRed = + ComponentFromIndex(i, pfd.cRedBits, pfd.cRedShift); + pPal->palPalEntry[i].peGreen = + ComponentFromIndex(i, pfd.cGreenBits, pfd.cGreenShift); + pPal->palPalEntry[i].peBlue = + ComponentFromIndex(i, pfd.cBlueBits, pfd.cBlueShift); + pPal->palPalEntry[i].peFlags = 0; + } + + /* fix up the palette to include the default GDI palette */ + if ((pfd.cColorBits == 8) + && (pfd.cRedBits == 3) && (pfd.cRedShift == 0) + && (pfd.cGreenBits == 3) && (pfd.cGreenShift == 3) + && (pfd.cBlueBits == 2) && (pfd.cBlueShift == 6)) { + for (i = 1; i <= 12; i++) + pPal->palPalEntry[defaultOverride[i]] = defaultPalEntry[i]; + } + + cmap->palette = CreatePalette(pPal); + LocalFree(pPal); + cmap->size = n; + cmap->stale = 0; + + /* Since this is a private colormap of a fix size, we do not need a valid + * hash table, but a dummy one */ + + Tcl_InitHashTable(&cmap->refCounts, TCL_ONE_WORD_KEYS); + return (Colormap) cmap; +} + +static Colormap +Win32CreateCiColormap(Togl *togl) +{ + /* Create a colormap with size of togl->CiColormapSize and set all entries + * to black */ + + LOGPALETTE logPalette; + TkWinColormap *cmap = (TkWinColormap *) ckalloc(sizeof (TkWinColormap)); + + logPalette.palVersion = 0x300; + logPalette.palNumEntries = 1; + logPalette.palPalEntry[0].peRed = 0; + logPalette.palPalEntry[0].peGreen = 0; + logPalette.palPalEntry[0].peBlue = 0; + logPalette.palPalEntry[0].peFlags = 0; + + cmap->palette = CreatePalette(&logPalette); + cmap->size = togl->CiColormapSize; + ResizePalette(cmap->palette, cmap->size); /* sets new entries to black */ + cmap->stale = 0; + + /* Since this is a private colormap of a fix size, we do not need a valid + * hash table, but a dummy one */ + + Tcl_InitHashTable(&cmap->refCounts, TCL_ONE_WORD_KEYS); + return (Colormap) cmap; +} + +/* ErrorExit is from */ +static void +ErrorExit(LPTSTR lpszFunction) +{ + /* Retrieve the system error message for the last-error code */ + LPTSTR lpMsgBuf; + LPTSTR lpDisplayBuf; + DWORD err = GetLastError(); + + if (err == 0) { + /* The function said it failed, but GetLastError says it didn't, so + * pretend it didn't. */ + return; + } + + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER + | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &lpMsgBuf, 0, NULL); + + /* Display the error message and exit the process */ + + lpDisplayBuf = (LPTSTR) LocalAlloc(LMEM_ZEROINIT, + (lstrlen(lpMsgBuf) + lstrlen(lpszFunction) + 40) * sizeof (TCHAR)); + StringCchPrintf(lpDisplayBuf, LocalSize(lpDisplayBuf), + TEXT("%s failed with error %ld: %s"), lpszFunction, err, lpMsgBuf); + MessageBox(NULL, lpDisplayBuf, TEXT("Error"), MB_OK); + + LocalFree(lpMsgBuf); + LocalFree(lpDisplayBuf); + ExitProcess(err); +} +#endif + +/* + * Togl_Init + * + * Called upon system startup to create togl command. + */ +int +Togl_Init(Tcl_Interp *interp) +{ + int major, minor, patchLevel, releaseType; + +#ifdef USE_TCL_STUBS + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + return TCL_ERROR; + } +#endif +#ifdef USE_TK_STUBS + if (Tk_InitStubs(interp, TCL_STUPID "8.1", 0) == NULL) { + return TCL_ERROR; + } +#endif + + Tcl_GetVersion(&major, &minor, &patchLevel, &releaseType); +#ifdef HAVE_TK_SETCLASSPROCS + if (major > 8 + || (major == 8 + && (minor > 4 + || (minor == 4 && (releaseType > 0 + || patchLevel >= 2))))) { +# ifdef USE_TK_STUBS + SetClassProcsPtr = tkStubsPtr->tk_SetClassProcs; +# else + SetClassProcsPtr = Tk_SetClassProcs; +# endif + } else { + SetClassProcsPtr = NULL; + } +#else + if (major > 8 + || (major == 8 + && (minor > 4 + || (minor == 4 && (releaseType > 0 + || patchLevel >= 2))))) { + TCL_ERR(interp, + "Sorry, this instance of Togl was not compiled to work with Tcl/Tk 8.4a2 or higher."); + } +#endif + + if (Tcl_CreateObjCommand(interp, "togl", Togl_ObjCmd, NULL, + Togl_ObjCmdDelete) == NULL) { + return TCL_ERROR; + } + + if (Tcl_PkgProvideEx(interp, "Togl", TOGL_VERSION, &toglStubs) != TCL_OK) { + return TCL_ERROR; + } + + return TCL_OK; +} + + +/* + * Togl_CallCallback + * + * Call command with togl widget as only argument + */ + +int +Togl_CallCallback(Togl *togl, Tcl_Obj *cmd) +{ + int result; + Tcl_Obj *objv[3]; + + if (cmd == NULL || togl->widgetCmd == NULL) + return TCL_OK; + + objv[0] = cmd; + Tcl_IncrRefCount(objv[0]); + objv[1] = + Tcl_NewStringObj(Tcl_GetCommandName(togl->Interp, togl->widgetCmd), + -1); + Tcl_IncrRefCount(objv[1]); + objv[2] = NULL; + result = Tcl_EvalObjv(togl->Interp, 2, objv, TCL_EVAL_GLOBAL); + Tcl_DecrRefCount(objv[1]); + Tcl_DecrRefCount(objv[0]); + if (result != TCL_OK) + Tcl_BackgroundError(togl->Interp); + return result; +} + +static int +Togl_CallCallback_P(Togl *togl, Tcl_Obj *cmd, double *params, int nparams) +{ + int result, i; + Tcl_Obj **objv = (Tcl_Obj **)malloc((3+nparams)*sizeof(Tcl_Obj *)); + + if (cmd == NULL || togl->widgetCmd == NULL) + return TCL_OK; + + objv[0] = cmd; + Tcl_IncrRefCount(objv[0]); + objv[1] = Tcl_NewStringObj(Tcl_GetCommandName(togl->Interp, togl->widgetCmd), -1); + Tcl_IncrRefCount(objv[1]); + for (i = 0 ; i < nparams ; ++i) { + objv[2+i] = Tcl_NewDoubleObj(params[i]); + Tcl_IncrRefCount(objv[2+i]); + } + objv[2+nparams] = NULL; + result = Tcl_EvalObjv(togl->Interp, 2+nparams, objv, TCL_EVAL_GLOBAL); + for (i = 1+nparams ; i >= 0 ; --i) + Tcl_DecrRefCount(objv[i]); + free(objv); + if (result != TCL_OK) + Tcl_BackgroundError(togl->Interp); + return result; +} + + +/* + * Togl_Timer + * + * Gets called from Tk_CreateTimerHandler. + */ +static void +Togl_Timer(ClientData clientData) +{ + Togl *togl = (Togl *) clientData; + + if (togl->TimerProc) { + if (Togl_CallCallback(togl, togl->TimerProc) != TCL_OK) { + togl->timerHandler = NULL; + return; + } + /* + * Re-register this callback since Tcl/Tk timers are "one-shot". + * That is, after the timer callback is called it not normally + * called again. That's not the behavior we want for Togl. + */ + togl->timerHandler = + Tcl_CreateTimerHandler(togl->TimerInterval, Togl_Timer, + (ClientData) togl); + } +} + + +/* + * Togl_MakeCurrent + * + * Bind the OpenGL rendering context to the specified + * Togl widget. If given a NULL argument, then the + * OpenGL context is released without assigning a new one. + */ +void +Togl_MakeCurrent(const Togl *togl) +{ +#if defined(TOGL_WGL) + int res = TRUE; + + if (togl == NULL) { + HDC hdc = wglGetCurrentDC(); + + if (hdc != NULL) + res = wglMakeCurrent(hdc, NULL); + } else { + if (togl->pbufferLost) { + Bool keepContext = FindToglWithSameContext(togl) != NULL; + Togl *t = (Togl *) togl; /* conceptually const */ + + if (!keepContext) { + wglDeleteContext(t->Ctx); + } + togl_destroyPbuffer(t); + t->pbuf = togl_createPbuffer(t); + if (!keepContext) { + t->Ctx = wglCreateContext(t->tglGLHdc); + } + } + res = wglMakeCurrent(togl->tglGLHdc, togl->Ctx); + } + if (!res) { + ErrorExit(TEXT("wglMakeCurrent")); + } +#elif defined(TOGL_X11) + Display *display = togl ? togl->display : glXGetCurrentDisplay(); + + if (display) { + GLXDrawable drawable; + + if (!togl) + drawable = None; + else if (togl->PbufferFlag) + drawable = togl->pbuf; + else if (togl->TkWin) + drawable = Tk_WindowId(togl->TkWin); + else + drawable = None; + (void) glXMakeCurrent(display, drawable, drawable ? togl->Ctx : NULL); + } +#elif defined(TOGL_AGL) + if (togl == NULL || togl->Ctx == NULL) { + (void) aglSetCurrentContext(NULL); + } else { + (void) aglSetCurrentContext(togl->Ctx); + if (FindToglWithSameContext(togl) != NULL) { + if (!togl->PbufferFlag) { + AGLDrawable d = Togl_MacOSXGetDrawablePort(togl); + + aglSetDrawable(togl->Ctx, d); + } else { + GLint virtualScreen = aglGetVirtualScreen(togl->Ctx); + + aglSetPBuffer(togl->Ctx, togl->pbuf, 0, 0, virtualScreen); + } + } + } +#elif defined(TOGL_NSOPENGL) + if (togl != NULL && togl->Ctx != NULL) { + [togl->Ctx makeCurrentContext]; + if (FindToglWithSameContext(togl) != NULL) { + if (!togl->PbufferFlag) { + [togl->Ctx setView:togl->nsview]; + } else { + GLint virtualScreen = [togl->Ctx currentVirtualScreen]; + [togl->Ctx setPixelBuffer:togl->pbuf cubeMapFace:0 + mipMapLevel:0 currentVirtualScreen:virtualScreen]; + } + } + } +#endif +} + +/* + * Togl_TakePhoto + * + * Take a photo image of the current OpenGL window. May have problems + * if window is partially obscured, either by other windows or by the + * edges of the display. + */ +int +Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo) +{ + GLubyte *buffer; + Tk_PhotoImageBlock photoBlock; + int y, midy; + unsigned char *cp; + int width = togl->Width, height = togl->Height; + + /* + * TIP #116 altered Tk_PhotoPutBlock API to add interp arg that 8.4 + * doesn't have. + * We need to remove that for compiling with 8.4. + */ +#if (TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION < 5) +# define TK_PHOTOPUTBLOCK(interp, hdl, blk, x, y, w, h, cr) \ + Tk_PhotoPutBlock(hdl, blk, x, y, w, h, cr) +#else +# define TK_PHOTOPUTBLOCK Tk_PhotoPutBlock +#endif + buffer = (GLubyte *) ckalloc(width * height * 4); + photoBlock.pixelPtr = buffer; + photoBlock.width = width; + photoBlock.height = height; + photoBlock.pitch = width * 4; + photoBlock.pixelSize = 4; + photoBlock.offset[0] = 0; + photoBlock.offset[1] = 1; + photoBlock.offset[2] = 2; + photoBlock.offset[3] = 3; + + if (!togl->RgbaFlag) { +#if defined(TOGL_WGL) + /* Due to the lack of a unique inverse mapping from the frame buffer to + * the logical palette we need a translation map from the complete + * logical palette. */ + int n, i; + TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); + LPPALETTEENTRY entry = (LPPALETTEENTRY) malloc(togl->MapSize * + sizeof (PALETTEENTRY)); + + n = GetPaletteEntries(cmap->palette, 0, togl->MapSize, entry); + for (i = 0; i < n; i++) { + togl->RedMap[i] = (GLfloat) (entry[i].peRed / 255.0); + togl->GreenMap[i] = (GLfloat) (entry[i].peGreen / 255.0); + togl->BlueMap[i] = (GLfloat) (entry[i].peBlue / 255.0); + } + free(entry); +#endif /* TOGL_WGL */ + + glPixelMapfv(GL_PIXEL_MAP_I_TO_R, togl->MapSize, togl->RedMap); + glPixelMapfv(GL_PIXEL_MAP_I_TO_G, togl->MapSize, togl->GreenMap); + glPixelMapfv(GL_PIXEL_MAP_I_TO_B, togl->MapSize, togl->BlueMap); + } + + glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); + glPixelStorei(GL_PACK_ALIGNMENT, 4); /* guarantee performance */ + glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE); + glPixelStorei(GL_PACK_SKIP_PIXELS, 0); + +#if 1 + glPixelStorei(GL_PACK_ROW_LENGTH, 0); + glPixelStorei(GL_PACK_SKIP_ROWS, 0); + glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); + /* Some OpenGL drivers are buggy and return zero for Alpha instead of one + * for RGB pixel formats. If that is happening to you, upgrade your + * graphics driver. */ + + /* OpenGL's origin is bottom-left, Tk Photo image's is top-left, so mirror + * the rows around the middle row. */ + midy = height / 2; + cp = buffer; + for (y = 0; y < midy; ++y) { + int m_y = height - 1 - y; /* mirror y */ + unsigned char *m_cp = buffer + m_y * photoBlock.pitch; + int x; + + for (x = 0; x < photoBlock.pitch; ++x) { + unsigned char c = *cp; + + *cp++ = *m_cp; + *m_cp++ = c; + } + } +#else + /* OpenGL's origin is bottom-left, Tk Photo image's is top-left, so save + * rows in reverse order. */ + glPixelStorei(GL_PACK_ROW_LENGTH, width); + glPixelStorei(GL_PACK_SKIP_ROWS, -1); + glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, + buffer + width * (height - 1) * 4); +#endif + + TK_PHOTOPUTBLOCK(togl->Interp, photo, &photoBlock, 0, 0, width, height, + TK_PHOTO_COMPOSITE_SET); + + glPopClientAttrib(); /* restore PACK_ALIGNMENT */ + ckfree((char *) buffer); + return TCL_OK; +} + +Bool +Togl_SwapInterval(const Togl *togl, int interval) +{ +#ifdef TOGL_AGL + GLint swapInterval = interval; + + return aglSetInteger(togl->Ctx, AGL_SWAP_INTERVAL, &swapInterval); +#endif +#ifdef TOGL_NSOPENGL + GLint swapInterval = interval; + [togl->Ctx setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval]; + return True; +#endif +#ifdef TOGL_WGL + typedef BOOL (WINAPI *BOOLFuncInt) (int); + typedef const char *(WINAPI *StrFuncHDC) (HDC); + static BOOLFuncInt swapInterval = NULL; + static BOOL initialized = False; + + if (!initialized) { + const char *extensions; + StrFuncHDC getExtensionsString; + + getExtensionsString = (StrFuncHDC) + wglGetProcAddress("wglGetExtensionsStringARB"); + if (getExtensionsString == NULL) + getExtensionsString = (StrFuncHDC) + wglGetProcAddress("wglGetExtensionsStringEXT"); + if (getExtensionsString) { + extensions = getExtensionsString(togl->tglGLHdc); + if (strstr(extensions, "WGL_EXT_swap_control") != NULL) { + swapInterval = + (BOOLFuncInt) wglGetProcAddress("wglSwapIntervalEXT"); + } + } + initialized = True; + } + if (swapInterval) + return swapInterval(interval); + return False; +#endif +#ifdef TOGL_X11 + typedef int (*IntFuncInt) (int); + static IntFuncInt swapInterval = NULL; + static int initialized = False; + + if (!initialized) { + const char *extensions = glXQueryExtensionsString(togl->display, + Tk_ScreenNumber(togl->TkWin)); + + if (strstr(extensions, "GLX_SGI_swap_control") != NULL) { + swapInterval = (IntFuncInt) Togl_GetProcAddr("glXSwapIntervalSGI"); + } else if (strstr(extensions, "GLX_MESA_swap_control") != NULL) { + swapInterval = (IntFuncInt) Togl_GetProcAddr("glXSwapIntervalMESA"); + } + initialized = True; + } + if (swapInterval) + return swapInterval(interval) == 0; + return False; +#endif +} + +#if defined(TOGL_AGL) +/* tell OpenGL which part of the Mac window to render to */ +static void +SetMacBufRect(Togl *togl) +{ + GLint wrect[4]; + Rect r; + MacDrawable *d = ((TkWindow *) togl->TkWin)->privatePtr; + + /* set wrect[0,1] to lower left corner of widget */ + wrect[2] = Tk_Width(togl->TkWin); + wrect[3] = Tk_Height(togl->TkWin); + wrect[0] = d->xOff; + + GetPortBounds(Togl_MacOSXGetDrawablePort(togl), &r); + + wrect[1] = r.bottom - wrect[3] - d->yOff; + + if (togl->FullscreenFlag) { + aglEnable(togl->Ctx, AGL_FS_CAPTURE_SINGLE); + aglSetFullScreen(togl->Ctx, 0, 0, 0, 0); + } else { + aglUpdateContext(togl->Ctx); + } + aglSetInteger(togl->Ctx, AGL_BUFFER_RECT, wrect); + aglEnable(togl->Ctx, AGL_BUFFER_RECT); +} + +static void +ReconfigureCB(CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, + void *closure) +{ + /* Display reconfiguration callback. Documented as needed by Apple QA1209. + * Updated for 10.3 (and later) to use + * CGDisplayRegisterReconfigurationCallback. */ + Togl *togl = (Togl *) closure; + + if (0 != (flags & kCGDisplayBeginConfigurationFlag)) + return; /* wait until display is reconfigured */ + + SetMacBufRect(togl); + Togl_MakeCurrent(togl); + if (togl->Ctx) { + if (togl->ReshapeProc) { + Togl_CallCallback(togl, togl->ReshapeProc); + } else { + Togl_SetViewPort(togl); + } + } +} +#endif + +#if defined(TOGL_NSOPENGL) +/* +TODO: It appears that Tk only makes an NSView for toplevel windows. +Also it looks like NSOpenGL does not have the equivalent of AGL_BUFFER_RECT +that allows opengl drawing to just part of an NSView. So we might need to +create our own NSView for controlling the opengl bounds. +Look at TkMacOSXMakeRealWindowExist() in tkMacOSXWm.c. +*/ + +/* tell OpenGL which part of the Mac window to render to */ +static void +SetMacBufRect(Togl *togl) +{ + Rect r, rt; + NSRect rect; + TkWindow *w = (TkWindow *) togl->TkWin; + TkWindow *t = w->privatePtr->toplevel->winPtr; + + TkMacOSXWinBounds(w, &r); + TkMacOSXWinBounds(t, &rt); + + rect.origin.x = r.left - rt.left; + rect.origin.y = rt.bottom - r.bottom; + rect.size.width = r.right - r.left; + rect.size.height = r.bottom - r.top; + + [togl->nsview setFrame:rect]; + [togl->Ctx update]; + + /* TODO: Support full screen. */ +} + +static void +ReconfigureCB(CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, + void *closure) +{ + /* Display reconfiguration callback. Documented as needed by Apple QA1209. + * Updated for 10.3 (and later) to use + * CGDisplayRegisterReconfigurationCallback. */ + Togl *togl = (Togl *) closure; + + if (0 != (flags & kCGDisplayBeginConfigurationFlag)) + return; /* wait until display is reconfigured */ + + SetMacBufRect(togl); + Togl_MakeCurrent(togl); + if (togl->Ctx) { + if (togl->ReshapeProc) { + Togl_CallCallback(togl, togl->ReshapeProc); + } else { + Togl_SetViewPort(togl); + } + } +} +#endif + +/* + * Called when the widget's contents must be redrawn. Basically, we + * just call the user's render callback function. + * + * Note that the parameter type is ClientData so this function can be + * passed to Tk_DoWhenIdle(). + */ +static void +Togl_Render(ClientData clientData) +{ + Togl *togl = (Togl *) clientData; + + if (togl->DisplayProc) { + Togl_MakeCurrent(togl); + Togl_CallCallback(togl, togl->DisplayProc); + } + togl->UpdatePending = False; +} + + +static void +Togl_RenderOverlay(ClientData clientData) +{ + Togl *togl = (Togl *) clientData; + + if (togl->OverlayFlag && togl->OverlayDisplayProc) { +#if defined(TOGL_WGL) + int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLOverlayHglrc); + + if (!res) { + ErrorExit(TEXT("wglMakeCurrent overlay")); + } +#elif defined(TOGL_X11) + (void) glXMakeCurrent(Tk_Display(togl->TkWin), + togl->OverlayWindow, togl->OverlayCtx); +#endif /* TOGL_WGL */ + + Togl_CallCallback(togl, togl->OverlayDisplayProc); + } + togl->OverlayUpdatePending = False; +} + + +static int +Togl_EnterStereo(Togl *togl) +{ + if (togl->Stereo == TOGL_STEREO_ROW_INTERLEAVED) { + GLint stencil_bits; + Tk_Window top; + + Togl_MakeCurrent(togl); + glGetIntegerv(GL_STENCIL_BITS, &stencil_bits); + if (stencil_bits == 0) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "need stencil buffer for row interleaved stereo", + TCL_STATIC); + return False; + } + togl->riStencilBit = 1u << (stencil_bits - 1); + glEnable(GL_STENCIL_TEST); + + /* Need to redraw window when moved between odd and even scanlines, so + * bind to top level window so we're notified when that happens. */ + top = togl->TkWin; + while (!Tk_IsTopLevel(top)) { + top = Tk_Parent(top); + if (top == NULL) + break; + } + if (top) { + Tk_CreateEventHandler(top, StructureNotifyMask, Togl_RedisplayProc, + (ClientData) togl); + } + } + return True; +} + + +static void +Togl_LeaveStereo(Togl *togl, int oldStereo) +{ + switch (oldStereo) { + default: + break; +#ifdef HAVE_AUTOSTEREO + case TOGL_STEREO_NATIVE: + if (togl->ash != -1) { + ASClosedStereoWindow(togl->ash); + togl->ash = -1; + } + break; +#endif +#ifdef __sgi + case TOGL_STEREO_SGIOLDSTYLE: + togl->currentStereoBuffer = STEREO_BUFFER_NONE; + glXWaitGL(); /* sync with GL command stream before calling X + */ + XSGISetStereoBuffer(togl->display, Tk_WindowId(togl->TkWin), + togl->currentStereoBuffer); + glXWaitX(); /* sync with X command stream before calling GL + */ + break; +#endif + case TOGL_STEREO_ROW_INTERLEAVED: + if (togl->riStencilBit) { + Tk_Window top; + + glDisable(GL_STENCIL_TEST); + + /* need to remove previously added top level event handler */ + top = togl->TkWin; + while (!Tk_IsTopLevel(top)) { + top = Tk_Parent(top); + if (top == NULL) + break; + } + if (top) { + Tk_DeleteEventHandler(top, StructureNotifyMask, + Togl_RedisplayProc, (ClientData) togl); + } + } + break; + } +} + + +/* + * See domentation about what can't be changed + */ +static int +Togl_ObjConfigure(Tcl_Interp *interp, Togl *togl, + int objc, Tcl_Obj *const *objv) +{ + Tk_SavedOptions savedOptions; + int error, mask; + int undoMask = 0; + Tcl_Obj *errorResult = NULL; + int oldStereo = togl->Stereo; + int oldWidth = togl->Width; + int oldHeight = togl->Height; + + for (error = 0; error <= 1; ++error, mask = undoMask) { + if (error == 0) { + /* + * Tk_SetOptions parses the command arguments + * and looks for defaults in the resource database. + */ + if (Tk_SetOptions(interp, WIDGREC togl, togl->tpg->optionTable, + objc, objv, togl->TkWin, &savedOptions, &mask) + != TCL_OK) { + /* previous values are restored, so nothing to do */ + return TCL_ERROR; + } + } else { + /* + * Restore options from saved values + */ + errorResult = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(errorResult); + Tk_RestoreSavedOptions(&savedOptions); + } + + if (togl->Ident && togl->Ident[0] == '.') { + Tcl_AppendResult(interp, "Can not set ident to a window path name", + NULL); + continue; + } + + if (togl->FullscreenFlag) { + /* override width and height */ + togl->Width = WidthOfScreen(Tk_Screen(togl->TkWin)); + togl->Height = HeightOfScreen(Tk_Screen(togl->TkWin)); + undoMask |= GEOMETRY_MASK; + } + + if (mask & GEOMETRY_MASK) { + if (!togl->PbufferFlag) { + Togl_WorldChanged((ClientData) togl); + /* Reset width and height so ConfigureNotify + * event will call reshape callback */ + togl->Width = oldWidth; + togl->Height = oldHeight; + undoMask |= GEOMETRY_MASK; + } + } + + if (mask & OVERLAY_MASK) { +#if !TOGL_USE_OVERLAY + if (togl->OverlayFlag) { + Tcl_AppendResult(interp, "Sorry, overlay was disabled", NULL); + continue; + } +#else +# if defined(TOGL_X11) + if (togl->OverlayCtx) +# elif defined(TOGL_WGL) + if (togl->tglGLOverlayHglrc) +# endif + { + /* + * Trying to change existing pixel format/graphics context + */ + Tcl_AppendResult(interp, + "Unable to change overlay pixel format", NULL); + continue; + } +#endif + } + + if (mask & SWAP_MASK) { + if (togl->Ctx) { + /* + * Change existing swap interval + */ + Togl_MakeCurrent(togl); /* TODO: needed? */ + Togl_SwapInterval(togl, togl->SwapInterval); + undoMask |= SWAP_MASK; + } + } + + if (error == 0 && (mask & STEREO_FORMAT_MASK) != 0) { + if (oldStereo == TOGL_STEREO_NATIVE + || togl->Stereo == TOGL_STEREO_NATIVE) { + /* only native stereo affects the visual format */ + mask |= FORMAT_MASK; + } + if (togl->Stereo == TOGL_STEREO_SGIOLDSTYLE) { +#ifndef __sgi + Tcl_AppendResult(interp, + "sgioldstyle: only available on SGI computers", NULL); + continue; +#else + int event, error; + + /* Make sure Display supports SGIStereo */ + if (XSGIStereoQueryExtension(Tk_Display(togl->TkWin), &event, + &error) == False) { + Tcl_AppendResult(interp, + "sgioldstyle: SGIStereo X extension is missing", + NULL); + continue; + } + /* Make sure Window (Screen) supports SGIStereo */ + if (XSGIQueryStereoMode(Tk_Display(togl->TkWin), + Tk_WindowId(Tk_Parent(togl->TkWin))) == + X_STEREO_UNSUPPORTED) { + Tcl_AppendResult(interp, + "sgioldstyle: unsupported by screen", NULL); + continue; + } +#endif + } + } + + if (mask & FORMAT_MASK) { + if (togl->Ctx) { + /* + * Trying to change existing pixel format/graphics context + * TODO: (re)create graphics context + * + * save old graphics context + * try to create new one and share display lists + * if failure, then restore old one + */ + Tcl_AppendResult(interp, "Unable to change pixel format", NULL); + continue; + } + if (togl->ShareContext && togl->ShareList) { + Tcl_AppendResult(interp, + "only one of -sharelist and -sharecontext allowed", + NULL); + continue; + } + if (togl->PbufferFlag && togl->Stereo) { + Tcl_AppendResult(interp, "pbuffer not supported with stereo", + NULL); + continue; + } + if (togl->PbufferFlag && togl->OverlayFlag) { + Tcl_AppendResult(interp, "pbuffer not supported with overlay", + NULL); + continue; + } + if (togl->FullscreenFlag) { +#if defined(TOGL_NSOPENGL) + Tcl_AppendResult(interp, + "Fullscreen not supported with Cocoa Tk", NULL); + continue; +#endif +#ifndef TOGL_AGL +# if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 5) + Tcl_AppendResult(interp, + "Need Tk 8.5 or later for fullscreen support", NULL); + continue; +# endif +#endif + } + /* Whether or not the format is okay is figured out when togl tries + * to create the window. */ +#ifdef MESA_COLOR_HACK + free_default_color_cells(Tk_Display(togl->TkWin), + Tk_Colormap(togl->TkWin)); +#endif + undoMask |= FORMAT_MASK; + } + + if (togl->Ctx) { + if (oldStereo != togl->Stereo) { + /* leaving stereo */ + Togl_LeaveStereo(togl, oldStereo); + if (togl->Stereo && !Togl_EnterStereo(togl)) + continue; + } + } + + if (mask & TIMER_MASK) { + if (togl->timerHandler != NULL) { + Tcl_DeleteTimerHandler(togl->timerHandler); + } + if (togl->TimerProc) { + togl->timerHandler = + Tcl_CreateTimerHandler(togl->TimerInterval, Togl_Timer, + (ClientData) togl); + } + undoMask |= TIMER_MASK; + } + break; + } + + if (error == 0) { + Tk_FreeSavedOptions(&savedOptions); + return TCL_OK; + } else { + Tcl_SetObjResult(interp, errorResult); + Tcl_DecrRefCount(errorResult); + return TCL_ERROR; + } +} + + +static int +Togl_ObjWidget(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl *togl = (Togl *) clientData; + const char *commands[] = { + "cget", "configure", "extensions", + "postredisplay", "render", + "swapbuffers", "makecurrent", "takephoto", + "loadbitmapfont", "unloadbitmapfont", "write", + "uselayer", "showoverlay", "hideoverlay", + "postredisplayoverlay", "renderoverlay", + "existsoverlay", "ismappedoverlay", + "getoverlaytransparentvalue", + "drawbuffer", "clear", "frustum", "ortho", + "numeyes", "contexttag", "copycontextto", "maketopfortrackpadevents", + NULL + }; + enum command + { + TOGL_CGET, TOGL_CONFIGURE, TOGL_EXTENSIONS, + TOGL_POSTREDISPLAY, TOGL_RENDER, + TOGL_SWAPBUFFERS, TOGL_MAKECURRENT, TOGL_TAKEPHOTO, + TOGL_LOADBITMAPFONT, TOGL_UNLOADBITMAPFONT, TOGL_WRITE, + TOGL_USELAYER, TOGL_SHOWOVERLAY, TOGL_HIDEOVERLAY, + TOGL_POSTREDISPLAYOVERLAY, TOGL_RENDEROVERLAY, + TOGL_EXISTSOVERLAY, TOGL_ISMAPPEDOVERLAY, + TOGL_GETOVERLAYTRANSPARENTVALUE, + TOGL_DRAWBUFFER, TOGL_CLEAR, TOGL_FRUSTUM, TOGL_ORTHO, + TOGL_NUMEYES, TOGL_CONTEXTTAG, TOGL_COPYCONTEXTTO, TOGL_MAKETOPFORTRACKPADEVENTS + }; + int result = TCL_OK; + Tcl_Obj *objPtr; + int index; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "command ?arg arg ...?"); + return TCL_ERROR; + } + + Tk_Preserve((ClientData) togl); + + result = Tcl_GetIndexFromObj(interp, objv[1], commands, "option", 0, + &index); + + switch (index) { + case TOGL_CGET: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "option"); + result = TCL_ERROR; + break; + } + objPtr = Tk_GetOptionValue(interp, WIDGREC togl, + togl->tpg->optionTable, (objc == 3) ? objv[2] : NULL, + togl->TkWin); + if (objPtr == NULL) { + result = TCL_ERROR; + break; + } + Tcl_SetObjResult(interp, objPtr); + break; + + case TOGL_CONFIGURE: + if (objc <= 3) { + /* + * Return one item if the option is given, + * or return all configuration information + */ + objPtr = Tk_GetOptionInfo(interp, WIDGREC togl, + togl->tpg->optionTable, (objc == 3) ? objv[2] : NULL, + togl->TkWin); + if (objPtr == NULL) { + result = TCL_ERROR; + } else { + Tcl_SetObjResult(interp, objPtr); + } + } else { + /* Execute a configuration change */ + result = Togl_ObjConfigure(interp, togl, objc - 2, objv + 2); + } + break; + + case TOGL_EXTENSIONS: + /* Return a list of OpenGL extensions available */ + /* TODO: -glu for glu extensions, -platform for glx/wgl extensions */ + if (objc == 2) { + const char *extensions; + Tcl_Obj *objPtr; + int length = -1; + + extensions = (const char *) glGetString(GL_EXTENSIONS); + objPtr = Tcl_NewStringObj(extensions, -1); + /* convert to list by asking for its length */ + (void) Tcl_ListObjLength(interp, objPtr, &length); + Tcl_SetObjResult(interp, objPtr); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_POSTREDISPLAY: + /* schedule the widget to be redrawn */ + if (objc == 2) { + Togl_PostRedisplay(togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_RENDER: + /* force the widget to be redrawn */ + if (objc == 2) { + Togl_Render((ClientData) togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_SWAPBUFFERS: + /* force the widget to be redrawn */ + if (objc == 2) { + Togl_SwapBuffers(togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_MAKECURRENT: + /* force the widget to be redrawn */ + if (objc == 2) { + Togl_MakeCurrent(togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_TAKEPHOTO: + { + /* force the widget to be redrawn */ + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "name"); + result = TCL_ERROR; + } else { + const char *name; + Tk_PhotoHandle photo; + + name = Tcl_GetStringFromObj(objv[2], NULL); + photo = Tk_FindPhoto(interp, name); + if (photo == NULL) { + Tcl_AppendResult(interp, "image \"", name, + "\" doesn't exist or is not a photo image", NULL); + result = TCL_ERROR; + break; + } + glPushAttrib(GL_PIXEL_MODE_BIT); + if (togl->DoubleFlag) { + glReadBuffer(GL_FRONT); + } + Togl_TakePhoto(togl, photo); + glPopAttrib(); /* restore glReadBuffer */ + } + break; + } + + case TOGL_LOADBITMAPFONT: +#if TOGL_USE_FONTS != 1 + Tcl_AppendResult(interp, "unsupported", NULL); + result = TCL_ERROR; +#else + if (objc >= 3) { + Tcl_Obj *font, *list; + + list = Tcl_NewListObj(objc - 2, objv + 2); + Tcl_IncrRefCount(list); + font = Togl_LoadBitmapFont(togl, Tcl_GetString(list)); + Tcl_DecrRefCount(list); + if (font) { + Tcl_SetObjResult(interp, font); + result = TCL_OK; + } else { + Tcl_AppendResult(interp, "Could not allocate font", NULL); + result = TCL_ERROR; + } + } else { + Tcl_WrongNumArgs(interp, 2, objv, "fontname"); + result = TCL_ERROR; + } +#endif + break; + + case TOGL_UNLOADBITMAPFONT: +#if TOGL_USE_FONTS != 1 + Tcl_AppendResult(interp, "unsupported", NULL); + result = TCL_ERROR; +#else + if (objc == 3) { + result = Togl_UnloadBitmapFont(togl, objv[2]); + } else { + Tcl_WrongNumArgs(interp, 2, objv, "toglfont"); + result = TCL_ERROR; + } +#endif + break; + + case TOGL_WRITE:{ +#if TOGL_USE_FONTS != 1 + Tcl_AppendResult(interp, "unsupported", NULL); + result = TCL_ERROR; +#else + /* Tcl_Obj *toglfont = objv[2]; */ + int wobjc = objc - 3; + Tcl_Obj *const *wobjv = objv + 3; + + while (wobjc > 1) { + const char *name = Tcl_GetStringFromObj(wobjv[0], NULL); + int oc, i; + Tcl_Obj **ov; + double args[4]; + + if (Tcl_ListObjGetElements(NULL, wobjv[1], &oc, &ov) != TCL_OK) { + oc = 0; + } else if (oc <= 4) { + for (i = 0; i < oc; ++i) { + if (Tcl_GetDoubleFromObj(NULL, ov[i], &args[i]) != TCL_OK) { + } + } + } + if (strcmp(name, "-color") == 0) { + if (oc == 4) + glColor4d(args[0], args[1], args[2], args[3]); + else if (oc == 3) + glColor3d(args[0], args[1], args[2]); + else + goto write_usage; + } else if (strcmp(name, "-pos") == 0) { + if (oc == 4) + glRasterPos4d(args[0], args[1], args[2], args[3]); + else if (oc == 3) + glRasterPos3d(args[0], args[1], args[2]); + else if (oc == 2) + glRasterPos2d(args[0], args[1]); + else + goto write_usage; + } else + goto write_usage; + wobjc -= 2; + wobjv += 2; + } + if (wobjc != 1) + goto write_usage; + result = Togl_WriteObj(togl, objv[2], wobjv[0]); + if (result != -1) + result = TCL_OK; + else { + Tcl_AppendResult(interp, "togl write failed", NULL); + result = TCL_ERROR; + } + break; + write_usage: + Tcl_WrongNumArgs(interp, 2, objv, "[-pos {x y [z [w]]}]" + " [-color {r g b [a]}" " string"); + result = TCL_ERROR; +#endif + break; + } + + case TOGL_USELAYER: + if (objc == 3) { + int layer; + + result = Tcl_GetIntFromObj(interp, objv[2], &layer); + if (result == TCL_OK) { + Togl_UseLayer(togl, layer); + } + } else { + Tcl_WrongNumArgs(interp, 2, objv, "layer"); + result = TCL_ERROR; + } + break; + + case TOGL_SHOWOVERLAY: + if (objc == 2) { + Togl_ShowOverlay(togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_HIDEOVERLAY: + if (objc == 2) { + Togl_HideOverlay(togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_POSTREDISPLAYOVERLAY: + if (objc == 2) { + Togl_PostOverlayRedisplay(togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_RENDEROVERLAY: + /* force the overlay to be redrawn */ + if (objc == 2) { + Togl_RenderOverlay((ClientData) togl); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_EXISTSOVERLAY: + if (objc == 2) { + Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_ExistsOverlay(togl))); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_ISMAPPEDOVERLAY: + if (objc == 2) { + Tcl_SetObjResult(interp, + Tcl_NewIntObj(Togl_IsMappedOverlay(togl))); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_GETOVERLAYTRANSPARENTVALUE: + if (objc == 2) { + Tcl_SetObjResult(interp, + Tcl_NewIntObj(Togl_GetOverlayTransparentValue(togl))); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_DRAWBUFFER: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "mode"); + result = TCL_ERROR; + } else { + int mask; + + result = Tcl_GetIntFromObj(interp, objv[2], &mask); + if (result == TCL_ERROR) + break; + Togl_DrawBuffer(togl, (GLenum) mask); + } + break; + + case TOGL_CLEAR: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "mask"); + result = TCL_ERROR; + } else { + int mask; + + result = Tcl_GetIntFromObj(interp, objv[2], &mask); + if (result == TCL_ERROR) + break; + Togl_Clear(togl, (GLbitfield) mask); + } + break; + + case TOGL_FRUSTUM: + if (objc != 8) { + Tcl_WrongNumArgs(interp, 2, objv, + "left right bottom top near far"); + result = TCL_ERROR; + } else { + double left, right, bottom, top, zNear, zFar; + + if (Tcl_GetDoubleFromObj(interp, objv[2], &left) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[3], + &right) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[4], + &bottom) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[5], + &top) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[6], + &zNear) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[7], + &zFar) == TCL_ERROR) { + result = TCL_ERROR; + break; + } + Togl_Frustum(togl, left, right, bottom, top, zNear, zFar); + } + break; + + case TOGL_ORTHO: + if (objc != 8) { + Tcl_WrongNumArgs(interp, 2, objv, + "left right bottom top near far"); + result = TCL_ERROR; + } else { + double left, right, bottom, top, zNear, zFar; + + if (Tcl_GetDoubleFromObj(interp, objv[2], &left) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[3], + &right) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[4], + &bottom) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[5], + &top) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[6], + &zNear) == TCL_ERROR + || Tcl_GetDoubleFromObj(interp, objv[7], + &zFar) == TCL_ERROR) { + result = TCL_ERROR; + break; + } + Togl_Ortho(togl, left, right, bottom, top, zNear, zFar); + } + break; + + case TOGL_NUMEYES: + if (objc == 2) { + Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_NumEyes(togl))); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_CONTEXTTAG: + if (objc == 2) { + Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_ContextTag(togl))); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; + + case TOGL_COPYCONTEXTTO: + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } else { + Togl *to; + unsigned int mask; + + if (Togl_GetToglFromObj(togl->Interp, objv[2], &to) == TCL_ERROR + || Tcl_GetIntFromObj(togl->Interp, objv[3], + (int *) &mask) == TCL_ERROR) { + result = TCL_ERROR; + break; + } + result = Togl_CopyContext(togl, to, mask); + } +#ifdef TOGL_NSOPENGL + case TOGL_MAKETOPFORTRACKPADEVENTS: + if (objc == 2) { + // This hack places the Togl NSView at the top of sibling views so that it receives + // trackpad events. The hierarchy is not used for drawing, nor for mouse event dispatching. + [togl->nsview retain]; + [togl->nsview removeFromSuperview]; + MacDrawable *d = ((TkWindow *) togl->TkWin)->privatePtr; + NSView *topview = d->toplevel->view; + [topview addSubview:togl->nsview]; + [togl->nsview release]; + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + } + break; +#endif + } + + Tk_Release((ClientData) togl); + return result; +} + +/* + * Togl_ObjCmdDelete + * + * Called when togl command is removed from interpreter. + */ + +static void +Togl_ObjCmdDelete(ClientData clientData) +{ + if (clientData != NULL) { + Togl_PackageGlobals *tpg = (Togl_PackageGlobals *) clientData; + + Tk_DeleteOptionTable(tpg->optionTable); + ckfree((char *) clientData); + } +} + + +/* + * Togl_ObjCmd + * + * Called when Togl is executed - creation of a Togl widget. + * * Creates a new window + * * Creates an 'Togl' data structure + * * Creates an event handler for this window + * * Creates a command that handles this object + * * Configures this Togl for the given arguments + */ +int +Togl_ObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv) +{ + Togl_PackageGlobals *tpg; + Togl *togl; + Tk_Window tkwin; + Tcl_SavedResult saveError; + + if (objc <= 1) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName ?options?"); + return TCL_ERROR; + } + tpg = (Togl_PackageGlobals *) clientData; + if (tpg == NULL) { + Tcl_CmdInfo info; + const char *name; + + /* + * Initialize the Togl_PackageGlobals for this widget the + * first time a Togl widget is created. The globals are + * saved as our client data. + */ + + tpg = (Togl_PackageGlobals *) ckalloc(sizeof (Togl_PackageGlobals)); + if (tpg == NULL) { + return TCL_ERROR; + } + tpg->nextContextTag = 0; + tpg->optionTable = Tk_CreateOptionTable(interp, optionSpecs); + tpg->toglHead = NULL; + + name = Tcl_GetString(objv[0]); + Tcl_GetCommandInfo(interp, name, &info); + info.objClientData = (ClientData) tpg; + Tcl_SetCommandInfo(interp, name, &info); + } + + /* Create the window. */ + tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), + Tcl_GetString(objv[1]), NULL); + if (tkwin == NULL) { + return TCL_ERROR; + } + + Tk_SetClass(tkwin, "Togl"); + + /* Create Togl data structure */ + togl = (Togl *) ckalloc(sizeof (Togl)); + if (togl == NULL) { + return TCL_ERROR; + } + + /* initialize Togl data structures values */ + togl->Next = NULL; + togl->Ctx = NULL; +#if defined(TOGL_WGL) + togl->tglGLHdc = NULL; + togl->tglGLOverlayHglrc = NULL; +#elif defined(TOGL_X11) + togl->OverlayCtx = NULL; +#endif + togl->contextTag = 0; + togl->display = Tk_Display(tkwin); + togl->TkWin = tkwin; + togl->Interp = interp; + togl->VisInfo = NULL; + togl->OverlayWindow = None; + togl->OverlayCmap = None; + togl->OverlayTransparentPixel = 0; + togl->OverlayIsMapped = False; + + togl->UpdatePending = False; + togl->OverlayUpdatePending = False; + togl->tpg = tpg; + togl->Client_Data = NULL; + + /* for color index mode photos */ + togl->RedMap = togl->GreenMap = togl->BlueMap = NULL; + togl->MapSize = 0; + +#ifndef NO_TK_CURSOR + togl->Cursor = None; +#endif + togl->Width = 0; + togl->Height = 0; + togl->PixelScale = 1; + togl->SetGrid = 0; + togl->TimerInterval = 0; + togl->RgbaFlag = True; + togl->RgbaRed = 1; + togl->RgbaGreen = 1; + togl->RgbaBlue = 1; + togl->DoubleFlag = False; + togl->DepthFlag = False; + togl->DepthSize = 1; + togl->AccumFlag = False; + togl->AccumRed = 1; + togl->AccumGreen = 1; + togl->AccumBlue = 1; + togl->AccumAlpha = 1; + togl->AlphaFlag = False; + togl->AlphaSize = 1; + togl->StencilFlag = False; + togl->StencilSize = 1; + togl->OverlayFlag = False; + togl->Stereo = TOGL_STEREO_NONE; + togl->EyeSeparation = 0; + togl->Convergence = 0; + togl->riStencilBit = 0; + togl->AuxNumber = 0; + togl->Indirect = False; + togl->PixelFormat = 0; + togl->SwapInterval = 1; + togl->MultisampleFlag = False; + togl->FullscreenFlag = False; + togl->PbufferFlag = False; + togl->LargestPbufferFlag = False; +#if defined(TOGL_X11) + togl->fbcfg = None; + togl->pbuf = None; +#elif defined(TOGL_WGL) + togl->pbuf = None; + togl->pbufferLost = 0; +#elif defined(TOGL_AGL) + togl->pbuf = NULL; +#elif defined(TOGL_NSOPENGL) + togl->pbuf = NULL; +#endif + + togl->CreateProc = NULL; + togl->DisplayProc = NULL; + togl->ReshapeProc = NULL; + togl->DestroyProc = NULL; + togl->TimerProc = NULL; + togl->timerHandler = NULL; + togl->OverlayDisplayProc = NULL; + togl->MagnifyProc = NULL; + togl->RotateProc = NULL; + togl->ScrollProc = NULL; + togl->ScrollWheelProc = NULL; + togl->TouchesProc = NULL; + togl->ShareList = NULL; + togl->ShareContext = NULL; + togl->Ident = NULL; + togl->PrivateCmapFlag = False; + togl->currentStereoBuffer = STEREO_BUFFER_NONE; +#ifdef HAVE_AUTOSTEREO + togl->as_initialized = False; + togl->ash = -1; +#endif + togl->badWindow = False; + + /* Create command event handler */ + togl->widgetCmd = Tcl_CreateObjCommand(interp, Tk_PathName(tkwin), + Togl_ObjWidget, (ClientData) togl, ToglCmdDeletedProc); + + /* + * Setup the Tk_ClassProcs callbacks to point at our own window creation + * function + * + * We need to check at runtime if we should use the new Tk_SetClassProcs() + * API or if we need to modify the window structure directly + */ +#ifdef HAVE_TK_SETCLASSPROCS + + if (SetClassProcsPtr != NULL) { /* use public API (Tk 8.4+) */ + Tk_ClassProcs *procsPtr; + + procsPtr = (Tk_ClassProcs *) ckalloc(sizeof (Tk_ClassProcs)); + procsPtr->size = sizeof (Tk_ClassProcs); + procsPtr->createProc = Togl_MakeWindow; + procsPtr->worldChangedProc = Togl_WorldChanged; + procsPtr->modalProc = NULL; + /* Tk_SetClassProcs(togl->TkWin, procsPtr, (ClientData) togl); */ + (SetClassProcsPtr) (togl->TkWin, procsPtr, (ClientData) togl); + } else +#endif + { /* use private API */ + /* + * We need to set these fields in the Tk_FakeWin structure: dummy17 = + * classProcsPtr dummy18 = instanceData */ + TkClassProcs *procsPtr; + Tk_FakeWin *winPtr = (Tk_FakeWin *) (togl->TkWin); + + procsPtr = (TkClassProcs *) ckalloc(sizeof (TkClassProcs)); + procsPtr->createProc = Togl_MakeWindow; + procsPtr->geometryProc = Togl_WorldChanged; + procsPtr->modalProc = NULL; + winPtr->dummy17 = (char *) procsPtr; + winPtr->dummy18 = (ClientData) togl; + } + + Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask, + Togl_EventProc, (ClientData) togl); + + /* Configure Togl widget */ + if (Tk_InitOptions(interp, WIDGREC togl, tpg->optionTable, tkwin) != TCL_OK + || Togl_ObjConfigure(interp, togl, objc - 2, objv + 2) != TCL_OK) { + goto error; + } + + /* + * If OpenGL window wasn't already created by Togl_ObjConfigure() we + * create it now. We can tell by checking if the OpenGL context has + * been initialized. + */ + if (!togl->Ctx) { + Tk_MakeWindowExist(togl->TkWin); + if (togl->badWindow) { + goto error; + } + } + Togl_MakeCurrent(togl); + if (togl->contextTag == 0) + togl->contextTag = ++tpg->nextContextTag; + + (void) Togl_SwapInterval(togl, togl->SwapInterval); + + /* If defined, call create callback */ + if (togl->CreateProc) { + if (Togl_CallCallback(togl, togl->CreateProc) != TCL_OK) { + goto error; + } + } +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + if (!togl->PbufferFlag) + SetMacBufRect(togl); +#endif + /* If defined, call reshape proc */ + if (togl->ReshapeProc) { + if (Togl_CallCallback(togl, togl->ReshapeProc) != TCL_OK) { + goto error; + } + } else { + Togl_SetViewPort(togl); +#if defined(TOGL_X11) + if (togl->OverlayFlag) { + Togl_UseLayer(togl, TOGL_OVERLAY); + Togl_SetViewPort(togl); + Togl_UseLayer(togl, TOGL_NORMAL); + } +#endif + } + + if (togl->Stereo && !Togl_EnterStereo(togl)) + goto error; + + Tcl_AppendResult(interp, Tk_PathName(tkwin), NULL); + + /* Add to linked list */ + AddToList(togl); + + return TCL_OK; + + error: + Tcl_SaveResult(interp, &saveError); + togl->badWindow = True; + (void) Tcl_DeleteCommandFromToken(interp, togl->widgetCmd); + Tcl_RestoreResult(interp, &saveError); + Tcl_AppendResult(interp, "\nCouldn't configure togl widget", NULL); + return TCL_ERROR; +} + + +#if TOGL_USE_OVERLAY + +/* + * Do all the setup for overlay planes + * Return: TCL_OK or TCL_ERROR + */ +static int +SetupOverlay(Togl *togl) +{ +# if defined(TOGL_X11) + +# ifdef GLX_TRANSPARENT_TYPE_EXT + static int ovAttributeList[] = { + GLX_BUFFER_SIZE, 2, + GLX_LEVEL, 1, + GLX_TRANSPARENT_TYPE_EXT, GLX_TRANSPARENT_INDEX_EXT, + None + }; +# else + static int ovAttributeList[] = { + GLX_BUFFER_SIZE, 2, + GLX_LEVEL, 1, + None + }; +# endif + + XVisualInfo *visinfo; + TkWindow *winPtr = (TkWindow *) togl->TkWin; + + XSetWindowAttributes swa; + Tcl_HashEntry *hPtr; + int new_flag; + + visinfo = + glXChooseVisual(togl->display, Tk_ScreenNumber(winPtr), + ovAttributeList); + if (!visinfo) { + Tcl_AppendResult(togl->Interp, Tk_PathName(winPtr), + ": No suitable overlay index visual available", NULL); + togl->OverlayCtx = NULL; + togl->OverlayWindow = 0; + togl->OverlayCmap = 0; + return TCL_ERROR; + } +# ifdef GLX_TRANSPARENT_INDEX_EXT + { + int fail = glXGetConfig(togl->display, visinfo, + GLX_TRANSPARENT_INDEX_VALUE_EXT, + &togl->OverlayTransparentPixel); + + if (fail) + togl->OverlayTransparentPixel = 0; /* maybe, maybe ... */ + } +# else + togl->OverlayTransparentPixel = 0; /* maybe, maybe ... */ +# endif + + /* share display lists with normal layer context */ + togl->OverlayCtx = glXCreateContext(togl->display, visinfo, togl->Ctx, + !togl->Indirect); + + swa.colormap = XCreateColormap(togl->display, + XRootWindow(togl->display, visinfo->screen), + visinfo->visual, AllocNone); + togl->OverlayCmap = swa.colormap; + + swa.border_pixel = 0; + swa.event_mask = ALL_EVENTS_MASK; + togl->OverlayWindow = XCreateWindow(togl->display, + Tk_WindowId(togl->TkWin), 0, 0, + togl->Width, togl->Height, 0, + visinfo->depth, InputOutput, + visinfo->visual, CWBorderPixel | CWColormap | CWEventMask, &swa); + + hPtr = Tcl_CreateHashEntry(&winPtr->dispPtr->winTable, + (const char *) togl->OverlayWindow, &new_flag); + Tcl_SetHashValue(hPtr, winPtr); + + /* XMapWindow(togl->display, togl->OverlayWindow); */ + togl->OverlayIsMapped = False; + + /* Make sure window manager installs our colormap */ + XSetWMColormapWindows(togl->display, togl->OverlayWindow, + &togl->OverlayWindow, 1); + + return TCL_OK; + +# elif defined(TOGL_WGL) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + /* not yet implemented on these */ + return TCL_ERROR; +# endif +} + +#endif /* TOGL_USE_OVERLAY */ + + + +#ifdef TOGL_WGL +# define TOGL_CLASS_NAME "Togl Class" +static Bool ToglClassInitialized = False; + +static LRESULT CALLBACK +Win32WinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + LONG result; + Togl *togl = (Togl *) GetWindowLongPtr(hwnd, 0); + WNDCLASS childClass; + + switch (message) { + + case WM_WINDOWPOSCHANGED: + /* Should be processed by DefWindowProc, otherwise a double buffered + * context is not properly resized when the corresponding window is + * resized. */ + break; + + case WM_DESTROY: + if (togl && togl->TkWin != NULL) { + if (togl->SetGrid > 0) { + Tk_UnsetGrid(togl->TkWin); + } + (void) Tcl_DeleteCommandFromToken(togl->Interp, togl->widgetCmd); + } + break; + + case WM_ERASEBKGND: + /* We clear our own window */ + return 1; + + case WM_DISPLAYCHANGE: + if (togl->PbufferFlag && hasARBPbuffer && !togl->pbufferLost) { + queryPbuffer(togl->pbuf, WGL_PBUFFER_LOST_ARB, + &togl->pbufferLost); + } + /* FALLTHROUGH */ + + default: +# if USE_STATIC_LIB + return TkWinChildProc(hwnd, message, wParam, lParam); +# else + /* + * OK, since TkWinChildProc is not explicitly exported in the + * dynamic libraries, we have to retrieve it from the class info + * registered with windows. + * + */ + if (tkWinChildProc == NULL) { + GetClassInfo(Tk_GetHINSTANCE(), TK_WIN_CHILD_CLASS_NAME, + &childClass); + tkWinChildProc = childClass.lpfnWndProc; + } + return tkWinChildProc(hwnd, message, wParam, lParam); +# endif + } + result = DefWindowProc(hwnd, message, wParam, lParam); + Tcl_ServiceAll(); + return result; +} +#endif /* TOGL_WGL */ + + +/* + * Togl_MakeWindow + * + * Window creation function, invoked as a callback from Tk_MakeWindowExist. + * This is called instead of TkpMakeWindow and must always succeed. + */ +static Window +Togl_MakeWindow(Tk_Window tkwin, Window parent, ClientData instanceData) +{ + Togl *togl = (Togl *) instanceData; + Display *dpy; + Colormap cmap; + int scrnum; + Window window = None; + +#if defined(TOGL_X11) + Bool directCtx = True; + XSetWindowAttributes swa; + int width, height; +#elif defined(TOGL_WGL) + HWND hwnd, parentWin; + DWORD style; + HINSTANCE hInstance; + PIXELFORMATDESCRIPTOR pfd; + int width, height; + Bool createdPbufferDC = False; +#elif defined(TOGL_AGL) +#endif + + if (togl->badWindow) { + TkWindow *winPtr = (TkWindow *) tkwin; + + return TkpMakeWindow(winPtr, parent); + } + + /* for color index mode photos */ + if (togl->RedMap) + free(togl->RedMap); + if (togl->GreenMap) + free(togl->GreenMap); + if (togl->BlueMap) + free(togl->BlueMap); + togl->RedMap = togl->GreenMap = togl->BlueMap = NULL; + togl->MapSize = 0; + + dpy = Tk_Display(tkwin); + scrnum = Tk_ScreenNumber(tkwin); + + /* + * Windows and Mac OS X need the window created before OpenGL context + * is created. So do that now and set the window variable. + */ +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + { + TkWindow *winPtr = (TkWindow *) tkwin; + + window = TkpMakeWindow(winPtr, parent); + if (!togl->PbufferFlag) + (void) XMapWindow(dpy, window); + } +#elif defined(TOGL_WGL) + hInstance = Tk_GetHINSTANCE(); + if (!ToglClassInitialized) { + WNDCLASS ToglClass; + + ToglClassInitialized = True; + ToglClass.style = CS_HREDRAW | CS_VREDRAW; + ToglClass.cbClsExtra = 0; + ToglClass.cbWndExtra = sizeof (LONG_PTR); /* to save Togl* */ + ToglClass.hInstance = hInstance; + ToglClass.hbrBackground = NULL; + ToglClass.lpszMenuName = NULL; + ToglClass.lpszClassName = TOGL_CLASS_NAME; + ToglClass.lpfnWndProc = Win32WinProc; + ToglClass.hIcon = NULL; + ToglClass.hCursor = NULL; + if (!RegisterClass(&ToglClass)) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable register Togl window class", TCL_STATIC); + goto error; + } + } + + /* duplicate tkpMakeWindow logic from tk8.[45]/win/tkWinWindow.c */ + if (parent != None) { + parentWin = Tk_GetHWND(parent); + style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + } else { + parentWin = NULL; + style = WS_POPUP | WS_CLIPCHILDREN; + } + if (togl->PbufferFlag) { + width = height = 1; /* TODO: demo code mishaves when set to 1000 */ + } else { + width = togl->Width; + height = togl->Height; + } + hwnd = CreateWindowEx(WS_EX_NOPARENTNOTIFY, TOGL_CLASS_NAME, NULL, style, + 0, 0, width, height, parentWin, NULL, hInstance, NULL); + SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); + window = Tk_AttachHWND(tkwin, hwnd); + SetWindowLongPtr(hwnd, 0, (LONG_PTR) togl); + if (togl->PbufferFlag) { + ShowWindow(hwnd, SW_HIDE); /* make sure it's hidden */ + } +#endif + + /* + * Figure out which OpenGL context to use + */ + +#ifdef TOGL_WGL + togl->tglGLHdc = GetDC(hwnd); +#endif + if (togl->PixelFormat) { +#if defined(TOGL_X11) + XVisualInfo template; + int count = 0; + + template.visualid = togl->PixelFormat; + togl->VisInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &count); + if (togl->VisInfo == NULL) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "missing visual information", TCL_STATIC); + goto error; + } +#endif + if (!togl_describePixelFormat(togl)) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't choose pixel format", TCL_STATIC); + goto error; + } + } else { +#if defined(TOGL_X11) + togl->VisInfo = togl_pixelFormat(togl, scrnum); + if (togl->VisInfo == NULL) +#elif defined(TOGL_WGL) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) +# ifdef TOGL_WGL + togl->PixelFormat = togl_pixelFormat(togl, hwnd); +# elif defined(TOGL_NSOPENGL) + togl->PixelFormat = (void *)togl_pixelFormat(togl); +# else + togl->PixelFormat = (Tcl_WideInt)togl_pixelFormat(togl); +# endif + if (togl->PixelFormat == 0) +#endif + { + goto error; + } + } +#ifdef TOGL_WGL + if (togl->PbufferFlag) { + togl->pbuf = togl_createPbuffer(togl); + if (togl->pbuf == NULL) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't create pbuffer", TCL_STATIC); + goto error; + } + ReleaseDC(hwnd, togl->tglGLHdc); + togl->tglGLHdc = getPbufferDC(togl->pbuf); + createdPbufferDC = True; + } else if (SetPixelFormat(togl->tglGLHdc, (int) togl->PixelFormat, + NULL) == FALSE) { + Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't set pixel format", + TCL_STATIC); + goto error; + } +#endif +#if defined(TOGL_WGL) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + if (togl->VisInfo == NULL) { + /* + * Create a new OpenGL rendering context. And check to share lists. + */ + Visual *visual; + + /* Just for portability, define the simplest visinfo */ + visual = DefaultVisual(dpy, scrnum); + togl->VisInfo = (XVisualInfo *) calloc(1, sizeof (XVisualInfo)); + togl->VisInfo->screen = scrnum; + togl->VisInfo->visual = visual; + togl->VisInfo->visualid = visual->visualid; +# if defined(__cplusplus) || defined(c_plusplus) + togl->VisInfo->c_class = visual->c_class; +# else + togl->VisInfo->class = visual->class; +# endif + togl->VisInfo->depth = visual->bits_per_rgb; + } +#endif + +#if defined(TOGL_X11) + if (togl->Indirect) { + directCtx = False; + } +#endif + + /* + * Create a new OpenGL rendering context. + */ +#if defined(TOGL_X11) + if (togl->ShareList) { + /* share display lists with existing togl widget */ + Togl *shareWith = FindTogl(togl, togl->ShareList); + GLXContext shareCtx; + int error_code; + + if (shareWith) { + shareCtx = shareWith->Ctx; + togl->contextTag = shareWith->contextTag; + } else { + shareCtx = None; + } + if (shareCtx) { + togl_SetupXErrorHandler(); + } + togl->Ctx = glXCreateContext(dpy, togl->VisInfo, shareCtx, directCtx); + if (shareCtx && (error_code = togl_CheckForXError(togl))) { + char buf[256]; + + togl->Ctx = NULL; + XGetErrorText(dpy, error_code, buf, sizeof buf); + Tcl_AppendResult(togl->Interp, + "unable to share display lists: ", buf, NULL); + goto error; + } + } else { + if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { + /* share OpenGL context with existing Togl widget */ + Togl *shareWith = FindTogl(togl, togl->ShareContext); + + if (togl->VisInfo->visualid != shareWith->VisInfo->visualid) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share OpenGL context", + TCL_STATIC); + goto error; + } + togl->Ctx = shareWith->Ctx; + } else { + /* don't share display lists */ + togl->ShareContext = False; + togl->Ctx = glXCreateContext(dpy, togl->VisInfo, None, directCtx); + } + } +#elif defined(TOGL_WGL) + if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { + /* share OpenGL context with existing Togl widget */ + Togl *shareWith = FindTogl(togl, togl->ShareContext); + + if (togl->PixelFormat != shareWith->PixelFormat) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share OpenGL context", TCL_STATIC); + goto error; + } + togl->Ctx = shareWith->Ctx; + } else { + togl->Ctx = wglCreateContext(togl->tglGLHdc); + } + + if (togl->ShareList) { + /* share display lists with existing togl widget */ + Togl *shareWith = FindTogl(togl, togl->ShareList); + + if (shareWith) { + if (!wglShareLists(shareWith->Ctx, togl->Ctx)) { +# if 0 + LPVOID lpMsgBuf; + DWORD err = GetLastError(); + + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, err, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &lpMsgBuf, 0, NULL); + fprintf(stderr, "unable to share display lists: %d: %s\n", + err, lpMsgBuf); + LocalFree(lpMsgBuf); +# endif + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share display lists", TCL_STATIC); + goto error; + } + togl->contextTag = shareWith->contextTag; + } + } +#elif defined(TOGL_AGL) + AGLContext shareCtx = NULL; + + if (togl->ShareList) { + /* share display lists with existing togl widget */ + Togl *shareWith = FindTogl(togl, togl->ShareList); + + if (shareWith) { + shareCtx = shareWith->Ctx; + togl->contextTag = shareWith->contextTag; + } + } + if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { + /* share OpenGL context with existing Togl widget */ + Togl *shareWith = FindTogl(togl, togl->ShareContext); + + if (togl->PixelFormat != shareWith->PixelFormat) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share OpenGL context", TCL_STATIC); + goto error; + } + togl->Ctx = shareWith->Ctx; + } else if ((togl->Ctx = aglCreateContext((AGLPixelFormat) togl->PixelFormat, + shareCtx)) == NULL) { + GLenum err = aglGetError(); + + aglDestroyPixelFormat((AGLPixelFormat) togl->PixelFormat); + togl->PixelFormat = 0; + if (err == AGL_BAD_MATCH) + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share display lists" + ": shared context doesn't match", TCL_STATIC); + else if (err == AGL_BAD_CONTEXT) + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share display lists" + ": bad shared context", TCL_STATIC); + else if (err == AGL_BAD_PIXELFMT) + Tcl_SetResult(togl->Interp, + TCL_STUPID "could not create rendering context" + ": bad pixel format", TCL_STATIC); + else + Tcl_SetResult(togl->Interp, + TCL_STUPID "could not create rendering context" + ": unknown reason", TCL_STATIC); + goto error; + } + + if (!togl->PbufferFlag + && !aglSetDrawable(togl->Ctx, Togl_MacOSXGetDrawablePort(togl))) { + /* aglSetDrawable is deprecated in OS X 10.5 */ + aglDestroyContext(togl->Ctx); + togl->Ctx = NULL; + aglDestroyPixelFormat((AGLPixelFormat) togl->PixelFormat); + togl->PixelFormat = 0; + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't set drawable", TCL_STATIC); + goto error; + } +#elif defined(TOGL_NSOPENGL) + NSOpenGLContext *shareCtx = NULL; + if (togl->ShareList) { + /* share display lists with existing togl widget */ + Togl *shareWith = FindTogl(togl, togl->ShareList); + + if (shareWith) { + shareCtx = shareWith->Ctx; + togl->contextTag = shareWith->contextTag; + } + } + if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { + /* share OpenGL context with existing Togl widget */ + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share NSOpenGL context", TCL_STATIC); + goto error; + /* + Togl *shareWith = FindTogl(togl, togl->ShareContext); + + if (togl->PixelFormat != shareWith->PixelFormat) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to share OpenGL context", TCL_STATIC); + goto error; + } + togl->Ctx = [[NSOpenGLContext alloc] initWithCGLContextObj:shareWith->Ctx]; + */ + /* initWithCGLContextObj requires Mac OS 10.6 */ + } else { + togl->Ctx = [NSOpenGLContext alloc]; + if ([togl->Ctx initWithFormat:togl->PixelFormat shareContext:shareCtx] + == nil) + { + [togl->PixelFormat release]; + togl->PixelFormat = 0; + Tcl_SetResult(togl->Interp, + TCL_STUPID "Could not obtain OpenGL context", + TCL_STATIC); + goto error; + } + } + + if (!togl->PbufferFlag) { + togl->nsview = [[ToglNSView alloc] initWithFrame:NSZeroRect]; + [togl->nsview setTogl:togl]; + if ([togl->nsview respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) { + [togl->nsview setWantsBestResolutionOpenGLSurface:YES]; + } + [togl->nsview setAcceptsTouchEvents:YES]; + MacDrawable *d = ((TkWindow *) togl->TkWin)->privatePtr; + NSView *topview = d->toplevel->view; + [topview addSubview:togl->nsview]; + /* TODO: Appears setView has to be deferred until window mapped. + * or it gives "invalid drawable" error. But MapNotify doesn't happen. + * I think toplevel is already mapped. Iconifying and uniconifying + * main window makes the graphics work. + */ + /* [togl->Ctx setView:togl->nsview];*/ + } +#endif + + if (togl->Ctx == NULL) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "could not create rendering context", TCL_STATIC); + goto error; + } +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + CGDisplayRegisterReconfigurationCallback(ReconfigureCB, togl); +#endif + + if (togl->PbufferFlag) { + /* Don't need a colormap, nor overlay, nor be displayed */ +#if defined(TOGL_X11) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + togl->pbuf = togl_createPbuffer(togl); + if (!togl->pbuf) { + /* tcl result set in togl_createPbuffer */ +# ifdef TOGL_AGL + if (!togl->ShareContext) { + aglDestroyContext(togl->Ctx); + aglDestroyPixelFormat((AGLPixelFormat) togl->PixelFormat); + } + togl->Ctx = NULL; + togl->PixelFormat = 0; +# endif +# ifdef TOGL_NSOPENGL + if (!togl->ShareContext) { + [togl->Ctx release]; + [togl->PixelFormat release]; + } + togl->Ctx = NULL; + togl->PixelFormat = 0; +# endif + goto error; + } +# ifdef TOGL_X11 + window = TkpMakeWindow((TkWindow *) tkwin, parent); +# endif +#endif + return window; + } +#ifdef TOGL_WGL + DescribePixelFormat(togl->tglGLHdc, (int) togl->PixelFormat, sizeof (pfd), + &pfd); +#endif + + /* + * find a colormap + */ + if (togl->RgbaFlag) { + /* Colormap for RGB mode */ +#if defined(TOGL_X11) + cmap = get_rgb_colormap(dpy, scrnum, togl->VisInfo, tkwin); +#elif defined(TOGL_WGL) + if (pfd.dwFlags & PFD_NEED_PALETTE) { + cmap = Win32CreateRgbColormap(pfd); + } else { + cmap = DefaultColormap(dpy, scrnum); + } +#elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + cmap = DefaultColormap(dpy, scrnum); +#endif + } else { + /* Colormap for CI mode */ +#ifdef TOGL_WGL + /* this logic is to overcome a combination driver/compiler bug: (1) + * cColorBits may be unusally large (e.g., 32 instead of 8 or 12) and + * (2) 1 << 32 might be 1 instead of zero (gcc for ia32) */ + if (pfd.cColorBits >= MAX_CI_COLORMAP_BITS) { + togl->CiColormapSize = MAX_CI_COLORMAP_SIZE; + } else { + togl->CiColormapSize = 1 << pfd.cColorBits; + if (togl->CiColormapSize >= MAX_CI_COLORMAP_SIZE) + togl->CiColormapSize = MAX_CI_COLORMAP_SIZE; + } + +#endif + if (togl->PrivateCmapFlag) { + /* need read/write colormap so user can store own color entries */ +#if defined(TOGL_X11) + cmap = XCreateColormap(dpy, XRootWindow(dpy, togl->VisInfo->screen), + togl->VisInfo->visual, AllocAll); +#elif defined(TOGL_WGL) + cmap = Win32CreateCiColormap(togl); +#elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + /* need to figure out how to do this correctly on Mac... */ + cmap = DefaultColormap(dpy, scrnum); +#endif + } else { + if (togl->VisInfo->visual == DefaultVisual(dpy, scrnum)) { + /* share default/root colormap */ + cmap = Tk_Colormap(tkwin); + } else { + /* make a new read-only colormap */ + cmap = XCreateColormap(dpy, + XRootWindow(dpy, togl->VisInfo->screen), + togl->VisInfo->visual, AllocNone); + } + } + } + + /* Make sure Tk knows to switch to the new colormap when the cursor is over + * this window when running in color index mode. */ + (void) Tk_SetWindowVisual(tkwin, togl->VisInfo->visual, + togl->VisInfo->depth, cmap); + +#ifdef TOGL_WGL + /* Install the colormap */ + SelectPalette(togl->tglGLHdc, ((TkWinColormap *) cmap)->palette, TRUE); + RealizePalette(togl->tglGLHdc); +#endif + +#if defined(TOGL_X11) + swa.background_pixmap = None; + swa.border_pixel = 0; + swa.colormap = cmap; + swa.event_mask = ALL_EVENTS_MASK; + if (togl->PbufferFlag) { + width = height = 1; + } else { + width = togl->Width; + height = togl->Height; + } + window = XCreateWindow(dpy, parent, + 0, 0, width, height, + 0, togl->VisInfo->depth, InputOutput, togl->VisInfo->visual, + CWBackPixmap | CWBorderPixel | CWColormap | CWEventMask, &swa); + /* Make sure window manager installs our colormap */ + (void) XSetWMColormapWindows(dpy, window, &window, 1); + + if (!togl->DoubleFlag) { + int dbl_flag; + + /* See if we requested single buffering but had to accept a double + * buffered visual. If so, set the GL draw buffer to be the front + * buffer to simulate single buffering. */ + if (glXGetConfig(dpy, togl->VisInfo, GLX_DOUBLEBUFFER, &dbl_flag)) { + if (dbl_flag) { + glXMakeCurrent(dpy, window, togl->Ctx); + glDrawBuffer(GL_FRONT); + glReadBuffer(GL_FRONT); + } + } + } +#elif defined(TOGL_WGL) + if (!togl->DoubleFlag) { + /* See if we requested single buffering but had to accept a double + * buffered visual. If so, set the GL draw buffer to be the front + * buffer to simulate single buffering. */ + if (getPixelFormatAttribiv == NULL) { + /* pfd is already set */ + if ((pfd.dwFlags & PFD_DOUBLEBUFFER) != 0) { + wglMakeCurrent(togl->tglGLHdc, togl->Ctx); + glDrawBuffer(GL_FRONT); + glReadBuffer(GL_FRONT); + } + } else { + static int attribs[] = { + WGL_DOUBLE_BUFFER_ARB, + }; +# define NUM_ATTRIBS (sizeof attribs / sizeof attribs[0]) + int info[NUM_ATTRIBS]; + + getPixelFormatAttribiv(togl->tglGLHdc, (int) togl->PixelFormat, 0, + NUM_ATTRIBS, attribs, info); +# undef NUM_ATTRIBS + if (info[0]) { + wglMakeCurrent(togl->tglGLHdc, togl->Ctx); + glDrawBuffer(GL_FRONT); + glReadBuffer(GL_FRONT); + } + } + } +#endif + +#if TOGL_USE_OVERLAY + if (togl->OverlayFlag) { + if (SetupOverlay(togl) == TCL_ERROR) { + fprintf(stderr, "Warning: couldn't setup overlay.\n"); + togl->OverlayFlag = False; + } + } +#endif + +#if !defined(TOGL_AGL) + /* Request the X window to be displayed */ + (void) XMapWindow(dpy, window); +#endif + + if (!togl->RgbaFlag) { + int index_size; + +#if defined(TOGL_X11) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + GLint index_bits; + + glGetIntegerv(GL_INDEX_BITS, &index_bits); + index_size = 1 << index_bits; +#elif defined(TOGL_WGL) + index_size = togl->CiColormapSize; +#endif + if (togl->MapSize != index_size) { + if (togl->RedMap) + free(togl->RedMap); + if (togl->GreenMap) + free(togl->GreenMap); + if (togl->BlueMap) + free(togl->BlueMap); + togl->MapSize = index_size; + togl->RedMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); + togl->GreenMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); + togl->BlueMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); + } + } +#ifdef HAVE_AUTOSTEREO + if (togl->Stereo == TOGL_STEREO_NATIVE) { + if (!togl->as_initialized) { + const char *autostereod; + + togl->as_initialized = True; + if ((autostereod = getenv("AUTOSTEREOD")) == NULL) + autostereod = AUTOSTEREOD; + if (autostereod && *autostereod) { + if (ASInitialize(togl->display, autostereod) == Success) { + togl->ash = ASCreatedStereoWindow(dpy); + } + } + } else { + togl->ash = ASCreatedStereoWindow(dpy); + } + } +#endif + + return window; + + error: + + togl->badWindow = True; + +#if defined(TOGL_X11) + if (window == None) { + TkWindow *winPtr = (TkWindow *) tkwin; + + window = TkpMakeWindow(winPtr, parent); + } +#elif defined(TOGL_WGL) + if (togl->tglGLHdc) { + if (createdPbufferDC) + releasePbufferDC(togl->pbuf, togl->tglGLHdc); + else + ReleaseDC(hwnd, togl->tglGLHdc); + togl->tglGLHdc = NULL; + } +#endif + return window; +} + +/* + * Togl_WorldChanged + * + * Add support for setgrid option. + */ +static void +Togl_WorldChanged(ClientData instanceData) +{ + Togl *togl = (Togl *) instanceData; + int width; + int height; + + if (togl->PbufferFlag) + width = height = 1; + else { + width = togl->Width; + height = togl->Height; + } + Tk_GeometryRequest(togl->TkWin, width, height); + Tk_SetInternalBorder(togl->TkWin, 0); + if (togl->SetGrid > 0) { + Tk_SetGrid(togl->TkWin, width / togl->SetGrid, + height / togl->SetGrid, togl->SetGrid, togl->SetGrid); + } else { + Tk_UnsetGrid(togl->TkWin); + } +} + +static void +Togl_SetViewPort(const struct Togl *togl) +{ + glViewport(0, 0, togl->Width*togl->PixelScale, togl->Height*togl->PixelScale); +} + +/* + * ToglFree + * + * Wrap the ckfree macro. + */ +static void +ToglFree(char *clientData) +{ + ckfree(clientData); +} + +/* + * ToglCmdDeletedProc + * + * This procedure is invoked when a widget command is deleted. If + * the widget isn't already in the process of being destroyed, + * this command destroys it. + * + * Results: + * None. + * + * Side effects: + * The widget is destroyed. + * + *---------------------------------------------------------------------- + */ +static void +ToglCmdDeletedProc(ClientData clientData) +{ + Togl *togl = (Togl *) clientData; + Tk_Window tkwin = togl->TkWin; + + /* + * This procedure could be invoked either because the window was + * destroyed and the command was then deleted (in which case tkwin + * is NULL) or because the command was deleted, and then this procedure + * destroys the widget. + */ + + if (tkwin) { + Tk_DeleteEventHandler(tkwin, ExposureMask | StructureNotifyMask, + Togl_EventProc, (ClientData) togl); + } + + Tk_Preserve((ClientData) togl); + Tcl_EventuallyFree((ClientData) togl, ToglFree); + + Togl_LeaveStereo(togl, togl->Stereo); + + if (togl->DestroyProc) { + /* call user's cleanup code */ + Togl_CallCallback(togl, togl->DestroyProc); + } + + if (togl->TimerProc != NULL) { + Tcl_DeleteTimerHandler(togl->timerHandler); + togl->timerHandler = NULL; + } + if (togl->UpdatePending) { + Tcl_CancelIdleCall(Togl_Render, (ClientData) togl); + togl->UpdatePending = False; + } +#ifndef NO_TK_CURSOR + if (togl->Cursor != None) { + Tk_FreeCursor(togl->display, togl->Cursor); + togl->Cursor = None; + } +#endif + + /* remove from linked list */ + RemoveFromList(togl); + + togl->TkWin = NULL; + if (tkwin != NULL) { + + if (togl->Ctx) { + if (FindToglWithSameContext(togl) == NULL) { +#if defined(TOGL_X11) + glXDestroyContext(togl->display, togl->Ctx); +#elif defined(TOGL_WGL) + wglDeleteContext(togl->Ctx); +#elif defined(TOGL_AGL) + aglDestroyContext(togl->Ctx); + CGDisplayRemoveReconfigurationCallback(ReconfigureCB, togl); +#elif defined(TOGL_NSOPENGL) + [togl->Ctx release]; + togl->Ctx = nil; + [togl->nsview setTogl:nil]; + [togl->nsview release]; + togl->nsview = nil; + CGDisplayRemoveReconfigurationCallback(ReconfigureCB, togl); +#endif +#if defined(TOGL_X11) + XFree(togl->VisInfo); +#else + free(togl->VisInfo); +#endif + } +#if defined(TOGL_WGL) + if (togl->tglGLHdc) { + if (togl->PbufferFlag) { + releasePbufferDC(togl->pbuf, togl->tglGLHdc); + } else { + HWND hwnd = Tk_GetHWND(Tk_WindowId(tkwin)); + + ReleaseDC(hwnd, togl->tglGLHdc); + } + togl->tglGLHdc = NULL; + } +#endif + if (togl->PbufferFlag && togl->pbuf) { + togl_destroyPbuffer(togl); + togl->pbuf = 0; + } + togl->Ctx = NULL; + togl->VisInfo = NULL; + } +#if defined(TOGL_X11) +# if TOGL_USE_OVERLAY + if (togl->OverlayCtx) { + Tcl_HashEntry *entryPtr; + TkWindow *winPtr = (TkWindow *) tkwin; + + if (winPtr) { + entryPtr = Tcl_FindHashEntry(&winPtr->dispPtr->winTable, + (const char *) togl->OverlayWindow); + Tcl_DeleteHashEntry(entryPtr); + } + if (FindToglWithSameOverlayContext(togl) == NULL) + glXDestroyContext(togl->display, togl->OverlayCtx); + togl->OverlayCtx = NULL; + } +# endif /* TOGL_USE_OVERLAY */ +#endif + + if (togl->SetGrid > 0) { + Tk_UnsetGrid(tkwin); + } + Tk_DestroyWindow(tkwin); + } + + Tk_Release((ClientData) togl); +} + + +/* + * This gets called to track top level position changes for + * row interleaved stereo. + */ +static void +Togl_RedisplayProc(ClientData clientData, XEvent *eventPtr) +{ + Togl *togl = (Togl *) clientData; + + switch (eventPtr->type) { + case ConfigureNotify: + Togl_PostRedisplay(togl); + break; + } +} + +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) +static int +viewPixelScale(NSView *nsview) +{ + int pixelScale = 1; + if ([nsview respondsToSelector:@selector(convertRectToBacking:)]) + { + NSRect wbounds = [nsview bounds]; + NSRect gbounds = [nsview convertRectToBacking:wbounds]; + pixelScale = (wbounds.size.width > 0 ? + gbounds.size.width / wbounds.size.width : 1); + } + return pixelScale; +} +#endif + +/* + * This gets called to handle Togl window configuration events + */ +static void +Togl_EventProc(ClientData clientData, XEvent *eventPtr) +{ + Togl *togl = (Togl *) clientData; + + switch (eventPtr->type) { + case Expose: +#if defined(TOGL_NSOPENGL) + if (!Tk_IsMapped(togl->TkWin)) + /* Tk Cocoa generates expose events for unmapped windows! */ + break; +#endif + if (eventPtr->xexpose.count == 0) { + if (!togl->UpdatePending + && eventPtr->xexpose.window == Tk_WindowId(togl->TkWin)) { + Togl_PostRedisplay(togl); + } +#if defined(TOGL_X11) + if (!togl->OverlayUpdatePending && togl->OverlayFlag + && togl->OverlayIsMapped + && eventPtr->xexpose.window == togl->OverlayWindow) { + Togl_PostOverlayRedisplay(togl); + } +#endif +#if defined(TOGL_NSOPENGL) + [togl->Ctx setView:togl->nsview]; + SetMacBufRect(togl); +#endif + } + break; + case ConfigureNotify: + if (togl->PbufferFlag) + break; +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + int pixelScale = viewPixelScale(togl->nsview); + if (togl->Width == Tk_Width(togl->TkWin) + && togl->Height == Tk_Height(togl->TkWin) + && togl->PixelScale == pixelScale) { + + // Even though the size hasn't changed, + // it's position on the screen may have. + if (Tk_IsMapped(togl->TkWin)) + SetMacBufRect(togl); + break; + } +#endif + togl->Width = Tk_Width(togl->TkWin); + togl->Height = Tk_Height(togl->TkWin); +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + togl->PixelScale = pixelScale; +#endif + (void) XResizeWindow(Tk_Display(togl->TkWin), + Tk_WindowId(togl->TkWin), togl->Width, togl->Height); +#if defined(TOGL_X11) + if (togl->OverlayFlag) { + (void) XResizeWindow(Tk_Display(togl->TkWin), + togl->OverlayWindow, togl->Width, togl->Height); + (void) XRaiseWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); + } +#endif + +#if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + SetMacBufRect(togl); +#endif + + Togl_MakeCurrent(togl); + if (togl->ReshapeProc) { + Togl_SetViewPort(togl); + (void) Togl_CallCallback(togl, togl->ReshapeProc); + } else { + Togl_SetViewPort(togl); +#if defined(TOGL_X11) + if (togl->OverlayFlag) { + Togl_UseLayer(togl, TOGL_OVERLAY); + Togl_SetViewPort(togl); + Togl_UseLayer(togl, TOGL_NORMAL); + } +#endif + } + break; + case MapNotify: +#if defined(TOGL_AGL) + if (!togl->PbufferFlag) { + /* + * See comment for the UnmapNotify case below. + */ + AGLDrawable d = Togl_MacOSXGetDrawablePort(togl); + + /* aglSetDrawable is deprecated in OS X 10.5 */ + aglSetDrawable(togl->Ctx, d); + SetMacBufRect(togl); + } +#endif +#if defined(TOGL_NSOPENGL) + if (!togl->PbufferFlag) { + /* + * See comment for the UnmapNotify case below. + */ + [togl->Ctx setView:togl->nsview]; + SetMacBufRect(togl); + } +#endif + break; + case UnmapNotify: +#if defined(TOGL_AGL) + if (!togl->PbufferFlag) { + /* + * For Mac OS X Aqua, Tk subwindows are not implemented as + * separate Aqua windows. They are just different regions of + * a single Aqua window. To unmap them they are just not drawn. + * Have to disconnect the AGL context otherwise they will continue + * to be displayed directly by Aqua. + */ + /* aglSetDrawable is deprecated in OS X 10.5 */ + aglSetDrawable(togl->Ctx, NULL); + } +#endif +#if defined(TOGL_NSOPENGL) + if (!togl->PbufferFlag) { + /* + * For Mac OS X Aqua, Tk subwindows are not implemented as + * separate Aqua windows. They are just different regions of + * a single Aqua window. To unmap them they are just not drawn. + * Have to disconnect the NSView otherwise they will continue + * to be displayed directly by Aqua. + */ + [togl->Ctx clearDrawable]; + } +#endif + break; + case DestroyNotify: + if (togl->TkWin != NULL) { +#ifdef TOGL_WGL + HWND hwnd = Tk_GetHWND(Tk_WindowId(togl->TkWin)); + + /* Prevent Win32WinProc from calling Tcl_DeleteCommandFromToken + * a second time */ + SetWindowLongPtr(hwnd, 0, (LONG_PTR) 0); +#endif + if (togl->SetGrid > 0) { + Tk_UnsetGrid(togl->TkWin); + } + (void) Tcl_DeleteCommandFromToken(togl->Interp, togl->widgetCmd); + } + break; + default: + /* nothing */ + ; + } +} + + +void +Togl_PostRedisplay(Togl *togl) +{ + if (!togl->UpdatePending) { + togl->UpdatePending = True; + Tk_DoWhenIdle(Togl_Render, (ClientData) togl); + } +} + + +Bool +Togl_UpdatePending(const Togl *togl) +{ + return togl->UpdatePending; +} + + +void +Togl_SwapBuffers(const Togl *togl) +{ + if (togl->DoubleFlag) { +#if defined(TOGL_WGL) + int res = SwapBuffers(togl->tglGLHdc); + + if (!res) { + ErrorExit(TEXT("SwapBuffers")); + } +#elif defined(TOGL_X11) + glXSwapBuffers(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin)); +#elif defined(TOGL_AGL) + aglSwapBuffers(togl->Ctx); +#elif defined(TOGL_NSOPENGL) + [togl->Ctx flushBuffer]; +#endif + } else { + glFlush(); + } +} + + + +const char * +Togl_Ident(const Togl *togl) +{ + return togl->Ident; +} + + +int +Togl_Width(const Togl *togl) +{ + return togl->Width; +} + + +int +Togl_Height(const Togl *togl) +{ + return togl->Height; +} + +int +Togl_PixelScale(const Togl *togl) +{ + return togl->PixelScale; +} + + +Tcl_Interp * +Togl_Interp(const Togl *togl) +{ + return togl->Interp; +} + + +Tk_Window +Togl_TkWin(const Togl *togl) +{ + return togl->TkWin; +} + + +const char * +Togl_CommandName(const Togl *togl) +{ + return Tcl_GetCommandName(togl->Interp, togl->widgetCmd); +} + +int +Togl_ContextTag(const Togl *togl) +{ + return togl->contextTag; +} + +Bool +Togl_HasRGBA(const Togl *togl) +{ + return togl->RgbaFlag; +} + +Bool +Togl_IsDoubleBuffered(const Togl *togl) +{ + return togl->DoubleFlag; +} + +Bool +Togl_HasDepthBuffer(const Togl *togl) +{ + return togl->DepthFlag; +} + +Bool +Togl_HasAccumulationBuffer(const Togl *togl) +{ + return togl->AccumFlag; +} + +Bool +Togl_HasDestinationAlpha(const Togl *togl) +{ + return togl->AlphaFlag; +} + +Bool +Togl_HasStencilBuffer(const Togl *togl) +{ + return togl->StencilFlag; +} + +int +Togl_StereoMode(const Togl *togl) +{ + return togl->Stereo; +} + +Bool +Togl_HasMultisample(const Togl *togl) +{ + return togl->MultisampleFlag; +} + + +#if defined(TOGL_X11) +/* + * A replacement for XAllocColor. This function should never + * fail to allocate a color. When XAllocColor fails, we return + * the nearest matching color. If we have to allocate many colors + * this function isn't too efficient; the XQueryColors() could be + * done just once. + * Written by Michael Pichler, Brian Paul, Mark Kilgard + * Input: dpy - X display + * cmap - X colormap + * cmapSize - size of colormap + * In/Out: color - the XColor struct + * Output: exact - 1=exact color match, 0=closest match + */ +static void +noFaultXAllocColor(Display *dpy, Colormap cmap, int cmapSize, + XColor *color, int *exact) +{ + XColor *ctable, subColor; + int i, bestmatch; + double mindist; /* 3*2^16^2 exceeds long int precision. */ + + /* First try just using XAllocColor. */ + if (XAllocColor(dpy, cmap, color)) { + *exact = 1; + return; + } + + /* Retrieve color table entries. */ + /* XXX alloca candidate. */ + ctable = (XColor *) ckalloc(cmapSize * sizeof (XColor)); + for (i = 0; i < cmapSize; i++) { + ctable[i].pixel = i; + } + (void) XQueryColors(dpy, cmap, ctable, cmapSize); + + /* Find best match. */ + bestmatch = -1; + mindist = 0; + for (i = 0; i < cmapSize; i++) { + double dr = (double) color->red - (double) ctable[i].red; + double dg = (double) color->green - (double) ctable[i].green; + double db = (double) color->blue - (double) ctable[i].blue; + double dist = dr * dr + dg * dg + db * db; + + if (bestmatch < 0 || dist < mindist) { + bestmatch = i; + mindist = dist; + } + } + + /* Return result. */ + subColor.red = ctable[bestmatch].red; + subColor.green = ctable[bestmatch].green; + subColor.blue = ctable[bestmatch].blue; + ckfree((char *) ctable); + /* Try to allocate the closest match color. This should only fail if the + * cell is read/write. Otherwise, we're incrementing the cell's reference + * count. */ + if (!XAllocColor(dpy, cmap, &subColor)) { + /* do this to work around a problem reported by Frank Ortega */ + subColor.pixel = (unsigned long) bestmatch; + subColor.red = ctable[bestmatch].red; + subColor.green = ctable[bestmatch].green; + subColor.blue = ctable[bestmatch].blue; + subColor.flags = DoRed | DoGreen | DoBlue; + } + *color = subColor; +} + +#elif defined(TOGL_WGL) + +static UINT +Win32AllocColor(const Togl *togl, float red, float green, float blue) +{ + /* Modified version of XAllocColor emulation of Tk. - returns index, + * instead of color itself - allocates logical palette entry even for + * non-palette devices */ + + TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); + UINT index; + COLORREF newColor, closeColor; + PALETTEENTRY entry, closeEntry; + int isNew, refCount; + Tcl_HashEntry *entryPtr; + + entry.peRed = (unsigned char) (red * 255 + .5); + entry.peGreen = (unsigned char) (green * 255 + .5); + entry.peBlue = (unsigned char) (blue * 255 + .5); + entry.peFlags = 0; + + /* + * Find the nearest existing palette entry. + */ + + newColor = RGB(entry.peRed, entry.peGreen, entry.peBlue); + index = GetNearestPaletteIndex(cmap->palette, newColor); + GetPaletteEntries(cmap->palette, index, 1, &closeEntry); + closeColor = RGB(closeEntry.peRed, closeEntry.peGreen, closeEntry.peBlue); + + /* + * If this is not a duplicate and colormap is not full, allocate a new entry. + */ + + if (newColor != closeColor) { + if (cmap->size == (unsigned int) togl->CiColormapSize) { + entry = closeEntry; + } else { + cmap->size++; + ResizePalette(cmap->palette, cmap->size); + index = cmap->size - 1; + SetPaletteEntries(cmap->palette, index, 1, &entry); + SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); + RealizePalette(togl->tglGLHdc); + } + } + newColor = PALETTERGB(entry.peRed, entry.peGreen, entry.peBlue); + entryPtr = Tcl_CreateHashEntry(&cmap->refCounts, + (CONST char *) newColor, &isNew); + if (isNew) { + refCount = 1; + } else { + refCount = ((int) Tcl_GetHashValue(entryPtr)) + 1; + } + Tcl_SetHashValue(entryPtr, (ClientData) refCount); + + /* for color index mode photos */ + togl->RedMap[index] = (GLfloat) (entry.peRed / 255.0); + togl->GreenMap[index] = (GLfloat) (entry.peGreen / 255.0); + togl->BlueMap[index] = (GLfloat) (entry.peBlue / 255.0); + return index; +} + +static void +Win32FreeColor(const Togl *togl, unsigned long index) +{ + TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); + COLORREF cref; + UINT count, refCount; + PALETTEENTRY entry, *entries; + Tcl_HashEntry *entryPtr; + + if (index >= cmap->size) { + panic("Tried to free a color that isn't allocated."); + } + GetPaletteEntries(cmap->palette, index, 1, &entry); + + cref = PALETTERGB(entry.peRed, entry.peGreen, entry.peBlue); + entryPtr = Tcl_FindHashEntry(&cmap->refCounts, (CONST char *) cref); + if (!entryPtr) { + panic("Tried to free a color that isn't allocated."); + } + refCount = (int) Tcl_GetHashValue(entryPtr) - 1; + if (refCount == 0) { + count = cmap->size - index; + entries = (PALETTEENTRY *) ckalloc(sizeof (PALETTEENTRY) * count); + GetPaletteEntries(cmap->palette, index + 1, count, entries); + SetPaletteEntries(cmap->palette, index, count, entries); + SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); + RealizePalette(togl->tglGLHdc); + ckfree((char *) entries); + cmap->size--; + Tcl_DeleteHashEntry(entryPtr); + } else { + Tcl_SetHashValue(entryPtr, (ClientData) refCount); + } +} + +static void +Win32SetColor(const Togl *togl, + unsigned long index, float red, float green, float blue) +{ + TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); + PALETTEENTRY entry; + + entry.peRed = (unsigned char) (red * 255 + .5); + entry.peGreen = (unsigned char) (green * 255 + .5); + entry.peBlue = (unsigned char) (blue * 255 + .5); + entry.peFlags = 0; + SetPaletteEntries(cmap->palette, index, 1, &entry); + SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); + RealizePalette(togl->tglGLHdc); + + /* for color index mode photos */ + togl->RedMap[index] = (GLfloat) (entry.peRed / 255.0); + togl->GreenMap[index] = (GLfloat) (entry.peGreen / 255.0); + togl->BlueMap[index] = (GLfloat) (entry.peBlue / 255.0); +} +#endif /* TOGL_X11 */ + + +unsigned long +Togl_AllocColor(const Togl *togl, float red, float green, float blue) +{ + if (togl->RgbaFlag) { + (void) fprintf(stderr, + "Error: Togl_AllocColor illegal in RGBA mode.\n"); + return 0; + } + /* TODO: maybe not... */ + if (togl->PrivateCmapFlag) { + (void) fprintf(stderr, + "Error: Togl_AllocColor illegal with private colormap\n"); + return 0; + } +#if defined(TOGL_X11) + { + XColor xcol; + int exact; + + xcol.red = (short) (red * 65535.0); + xcol.green = (short) (green * 65535.0); + xcol.blue = (short) (blue * 65535.0); + + noFaultXAllocColor(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), + Tk_Visual(togl->TkWin)->map_entries, &xcol, &exact); + /* for color index mode photos */ + togl->RedMap[xcol.pixel] = (float) xcol.red / 65535.0; + togl->GreenMap[xcol.pixel] = (float) xcol.green / 65535.0; + togl->BlueMap[xcol.pixel] = (float) xcol.blue / 65535.0; + + return xcol.pixel; + } + +#elif defined(TOGL_WGL) + return Win32AllocColor(togl, red, green, blue); + +#elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + /* still need to implement this on Mac... */ + return 0; + +#endif +} + + + +void +Togl_FreeColor(const Togl *togl, unsigned long pixel) +{ + if (togl->RgbaFlag) { + (void) fprintf(stderr, "Error: Togl_FreeColor illegal in RGBA mode.\n"); + return; + } + /* TODO: maybe not... */ + if (togl->PrivateCmapFlag) { + (void) fprintf(stderr, + "Error: Togl_FreeColor illegal with private colormap\n"); + return; + } +#if defined(TOGL_X11) + (void) XFreeColors(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), + &pixel, 1, 0); +#elif defined(TOGL_WGL) + Win32FreeColor(togl, pixel); +#endif +} + + + +void +Togl_SetColor(const Togl *togl, + unsigned long index, float red, float green, float blue) +{ + + if (togl->RgbaFlag) { + (void) fprintf(stderr, "Error: Togl_SetColor illegal in RGBA mode.\n"); + return; + } + if (!togl->PrivateCmapFlag) { + (void) fprintf(stderr, + "Error: Togl_SetColor requires a private colormap\n"); + return; + } +#if defined(TOGL_X11) + { + XColor xcol; + + xcol.pixel = index; + xcol.red = (short) (red * 65535.0); + xcol.green = (short) (green * 65535.0); + xcol.blue = (short) (blue * 65535.0); + xcol.flags = DoRed | DoGreen | DoBlue; + + (void) XStoreColor(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), + &xcol); + + /* for color index mode photos */ + togl->RedMap[xcol.pixel] = (float) xcol.red / 65535.0; + togl->GreenMap[xcol.pixel] = (float) xcol.green / 65535.0; + togl->BlueMap[xcol.pixel] = (float) xcol.blue / 65535.0; + } +#elif defined(TOGL_WGL) + Win32SetColor(togl, index, red, green, blue); +#endif +} + + +#if TOGL_USE_FONTS == 1 +# include "toglFont.c" +#else + +Tcl_Obj * +Togl_LoadBitmapFont(const Togl *togl, const char *fontname) +{ + return NULL; +} + +int +Togl_UnloadBitmapFont(const Togl *togl, Tcl_Obj *bitmapfont) +{ + return TCL_OK; +} + +int +Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj) +{ + return -1; +} + +int +Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *str, + int len) +{ + return -1; +} +#endif /* TOGL_USE_FONTS */ + + + +/* + * Overlay functions + */ + + +void +Togl_UseLayer(Togl *togl, int layer) +{ + if (layer == TOGL_NORMAL) { +#if defined(TOGL_WGL) + int res = wglMakeCurrent(togl->tglGLHdc, togl->Ctx); + + if (!res) { + ErrorExit(TEXT("wglMakeCurrent")); + } +#elif defined(TOGL_X11) + (void) glXMakeCurrent(Tk_Display(togl->TkWin), + Tk_WindowId(togl->TkWin), togl->Ctx); +#elif defined(TOGL_AGL) + (void) aglSetCurrentContext(togl->Ctx); +#elif defined(TOGL_NSOPENGL) + [togl->Ctx makeCurrentContext]; +#endif + } else if (layer == TOGL_OVERLAY && togl->OverlayWindow) { +#if defined(TOGL_WGL) + int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLOverlayHglrc); + + if (!res) { + ErrorExit(TEXT("wglMakeCurrent overlay")); + } +#elif defined(TOGL_X11) + (void) glXMakeCurrent(Tk_Display(togl->TkWin), + togl->OverlayWindow, togl->OverlayCtx); +#elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) +#endif + } else { + /* error */ + } +} + + +void +Togl_ShowOverlay(Togl *togl) +{ +#if defined(TOGL_X11) /* not yet implemented on Windows */ + if (togl->OverlayWindow) { + (void) XMapWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); + (void) XInstallColormap(Tk_Display(togl->TkWin), togl->OverlayCmap); + togl->OverlayIsMapped = True; + } +#endif +} + + +void +Togl_HideOverlay(Togl *togl) +{ + if (togl->OverlayWindow && togl->OverlayIsMapped) { + (void) XUnmapWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); + togl->OverlayIsMapped = False; + } +} + + +void +Togl_PostOverlayRedisplay(Togl *togl) +{ + if (!togl->OverlayUpdatePending + && togl->OverlayWindow && togl->OverlayDisplayProc) { + Tk_DoWhenIdle(Togl_RenderOverlay, (ClientData) togl); + togl->OverlayUpdatePending = True; + } +} + + +int +Togl_ExistsOverlay(const Togl *togl) +{ + return togl->OverlayFlag; +} + + +int +Togl_GetOverlayTransparentValue(const Togl *togl) +{ + return togl->OverlayTransparentPixel; +} + + +int +Togl_IsMappedOverlay(const Togl *togl) +{ + return togl->OverlayFlag && togl->OverlayIsMapped; +} + + +unsigned long +Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue) +{ +#if defined(TOGL_X11) /* not yet implemented on Windows */ + if (togl->OverlayFlag && togl->OverlayCmap) { + XColor xcol; + + xcol.red = (short) (red * 65535.0); + xcol.green = (short) (green * 65535.0); + xcol.blue = (short) (blue * 65535.0); + if (!XAllocColor(Tk_Display(togl->TkWin), togl->OverlayCmap, &xcol)) + return (unsigned long) -1; + return xcol.pixel; + } +#endif /* TOGL_X11 */ + return (unsigned long) -1; +} + + +void +Togl_FreeColorOverlay(const Togl *togl, unsigned long pixel) +{ +#if defined(TOGL_X11) /* not yet implemented on Windows */ + if (togl->OverlayFlag && togl->OverlayCmap) { + (void) XFreeColors(Tk_Display(togl->TkWin), togl->OverlayCmap, &pixel, + 1, 0); + } +#endif /* TOGL_X11 */ +} + + +/* + * User client data + */ + +ClientData +Togl_GetClientData(const Togl *togl) +{ + return togl->Client_Data; +} + + +void +Togl_SetClientData(Togl *togl, ClientData clientData) +{ + togl->Client_Data = clientData; +} + +int +Togl_CopyContext(const Togl *from, const Togl *to, unsigned mask) +{ +#ifdef TOGL_X11 + int error_code; + int same = (glXGetCurrentContext() == to->Ctx); + + if (same) + (void) glXMakeCurrent(to->display, None, NULL); + togl_SetupXErrorHandler(); + glXCopyContext(from->display, from->Ctx, to->Ctx, mask); + if (error_code = togl_CheckForXError(from)) { + char buf[256]; + + XGetErrorText(from->display, error_code, buf, sizeof buf); + Tcl_AppendResult(from->Interp, "unable to copy context: ", buf, NULL); + return TCL_ERROR; + } +#elif defined(TOGL_WGL) + int same = (wglGetCurrentContext() == to->Ctx); + + if (same) + (void) wglMakeCurrent(to->tglGLHdc, NULL); + if (!wglCopyContext(from->Ctx, to->Ctx, mask)) { + char buf[256]; + + snprintf(buf, sizeof buf, "unable to copy context: %d", GetLastError()); + Tcl_AppendElement(from->Interp, buf); + return TCL_ERROR; + } +#elif defined(TOGL_AGL) + int same = (aglGetCurrentContext() == to->Ctx); + + if (same) + (void) aglSetCurrentContext(NULL); + if (!aglCopyContext(from->Ctx, to->Ctx, mask)) { + Tcl_AppendResult(from->Interp, "unable to copy context: ", + aglErrorString(aglGetError()), NULL); + return TCL_ERROR; + } +#elif defined(TOGL_NSOPENGL) + int same = (from->Ctx == to->Ctx); + + if (same) { + [NSOpenGLContext clearCurrentContext]; + } + [to->Ctx copyAttributesFromContext:from->Ctx withMask:mask]; +#endif + if (same) + Togl_MakeCurrent(to); + return TCL_OK; +} + + +#ifdef MESA_COLOR_HACK +/* + * Let's know how many free colors do we have + */ +# define RLEVELS 5 +# define GLEVELS 9 +# define BLEVELS 5 + +/* to free dithered_rgb_colormap pixels allocated by Mesa */ +static unsigned long *ToglMesaUsedPixelCells = NULL; +static int ToglMesaUsedFreeCells = 0; + +static int +get_free_color_cells(Display *display, int screen, Colormap colormap) +{ + if (!ToglMesaUsedPixelCells) { + XColor xcol; + int i; + int colorsfailed, ncolors = XDisplayCells(display, screen); + + long r, g, b; + + ToglMesaUsedPixelCells = + (unsigned long *) ckalloc(ncolors * sizeof (unsigned long)); + + /* Allocate X colors and initialize color_table[], red_table[], etc */ + /* de Mesa 2.1: xmesa1.c setup_dithered_(...) */ + i = colorsfailed = 0; + for (r = 0; r < RLEVELS; r++) + for (g = 0; g < GLEVELS; g++) + for (b = 0; b < BLEVELS; b++) { + int exact; + + xcol.red = (r * 65535) / (RLEVELS - 1); + xcol.green = (g * 65535) / (GLEVELS - 1); + xcol.blue = (b * 65535) / (BLEVELS - 1); + noFaultXAllocColor(display, colormap, ncolors, + &xcol, &exact); + ToglMesaUsedPixelCells[i++] = xcol.pixel; + if (!exact) { + colorsfailed++; + } + } + ToglMesaUsedFreeCells = i; + + XFreeColors(display, colormap, ToglMesaUsedPixelCells, + ToglMesaUsedFreeCells, 0x00000000); + } + return ToglMesaUsedFreeCells; +} + + +static void +free_default_color_cells(Display *display, Colormap colormap) +{ + if (ToglMesaUsedPixelCells) { + XFreeColors(display, colormap, ToglMesaUsedPixelCells, + ToglMesaUsedFreeCells, 0x00000000); + ckfree((char *) ToglMesaUsedPixelCells); + ToglMesaUsedPixelCells = NULL; + ToglMesaUsedFreeCells = 0; + } +} +#endif + +/* + * Original stereo code contributed by Ben Evans (Ben.Evans@anusf.anu.edu.au) + * and was based on SGI's /usr/share/src/OpenGL/teach/stereo/glwstereo.c, + * which is identical to the 1997/12/1 glwstereo.c code in the CrystalEyes + * Software Development Kit. + */ + +int +Togl_NumEyes(const Togl *togl) +{ + if (togl->Stereo > TOGL_STEREO_ONE_EYE_MAX) + return 2; + return 1; +} + +/* call instead of glDrawBuffer */ +void +Togl_DrawBuffer(Togl *togl, GLenum mode) +{ + if (togl->Stereo <= TOGL_STEREO_ONE_EYE_MAX) { + /* Only drawing a single eye */ + if (togl->currentStereoBuffer != STEREO_BUFFER_NONE) { + Togl_SetViewPort(togl); + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + togl->currentStereoBuffer = STEREO_BUFFER_NONE; + } + switch (mode) { + case GL_FRONT: + case GL_BACK: + case GL_FRONT_AND_BACK: + break; + case GL_LEFT: + case GL_FRONT_LEFT: + case GL_RIGHT: + case GL_FRONT_RIGHT: + mode = GL_FRONT; + break; + case GL_BACK_LEFT: + case GL_BACK_RIGHT: + mode = GL_BACK; + break; + default: + break; + } + glDrawBuffer(mode); + return; + } + /* called once for each eye */ + switch (mode) { + case GL_FRONT: + case GL_BACK: + case GL_FRONT_AND_BACK: + /* + ** Simultaneous drawing to both left and right buffers isn't + ** really possible if we don't have a stereo capable visual. + ** For now just fall through and use the left buffer. + */ + case GL_LEFT: + case GL_FRONT_LEFT: + case GL_BACK_LEFT: + togl->currentStereoBuffer = STEREO_BUFFER_LEFT; + break; + case GL_RIGHT: + case GL_FRONT_RIGHT: + case GL_BACK_RIGHT: + togl->currentStereoBuffer = STEREO_BUFFER_RIGHT; + break; + default: + break; + } + if (togl->Stereo != TOGL_STEREO_NATIVE) { + switch (mode) { + default: + mode = GL_FRONT; + break; + case GL_BACK: + case GL_BACK_LEFT: + case GL_BACK_RIGHT: + mode = GL_BACK; + break; + } + } + int w = togl->Width*togl->PixelScale, h = togl->Height*togl->PixelScale; + switch (togl->Stereo) { + default: + break; +#ifdef __sgi + case TOGL_STEREO_SGIOLDSTYLE: + glXWaitGL(); /* sync with GL command stream before calling X + */ + XSGISetStereoBuffer(togl->display, Tk_WindowId(togl->TkWin), + togl->currentStereoBuffer); + glXWaitX(); /* sync with X command stream before calling GL + */ + break; +#endif + case TOGL_STEREO_ANAGLYPH: + if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) + glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_TRUE); + else + glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE); + glViewport(0, 0, w, h); + break; + case TOGL_STEREO_CROSS_EYE: + if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) + glViewport(w / 2 + 1, 0, w / 2, h); + else + glViewport(0, 0, w / 2, h); + break; + case TOGL_STEREO_WALL_EYE: + if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) + glViewport(0, 0, w / 2, h); + else + glViewport(w / 2 + 1, 0, w / 2, h); + break; + case TOGL_STEREO_DTI: + if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) + glViewport(0, 0, w / 2, h); + else + glViewport(w / 2 + 1, 0, w / 2, h); + break; + case TOGL_STEREO_ROW_INTERLEAVED: + glViewport(0, 0, w, h); + break; + } + glDrawBuffer(mode); +} + +/* call instead of glClear */ +void +Togl_Clear(const Togl *togl, GLbitfield mask) +{ + GLint stencil_write_mask = 0; + GLint stencil_clear_value = 0; + + switch (togl->Stereo) { + default: + break; + case TOGL_STEREO_CROSS_EYE: + case TOGL_STEREO_WALL_EYE: + case TOGL_STEREO_DTI: + if (togl->currentStereoBuffer != STEREO_BUFFER_LEFT) { + /* Since glViewport does not affect what is cleared (unlike + * glScissor), only clear in left eye */ + return; + } + break; + case TOGL_STEREO_ROW_INTERLEAVED: + if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) { + if ((mask & GL_STENCIL_BUFFER_BIT) == 0) { + mask |= GL_STENCIL_BUFFER_BIT; + glStencilMask(~0u); + glClearStencil(0); + } else { + glGetIntegerv(GL_STENCIL_WRITEMASK, &stencil_write_mask); + glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &stencil_clear_value); + glStencilMask(stencil_write_mask | togl->riStencilBit); + glClearStencil(stencil_clear_value & ~togl->riStencilBit); + } + } else { + mask &= ~(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + } + break; + } +#if 0 + /* only needed if we wish to support multi-eye clears */ + if (togl->Stereo > TOGL_STEREO_ONE_EYE_MAX) { + GLenum drawBuffer = togl->currentDrawBuffer; + + switch (drawBuffer) { + case GL_FRONT: + Togl_DrawBuffer(togl, GL_FRONT_RIGHT); + glClear(mask); + Togl_DrawBuffer(togl, drawBuffer); + break; + case GL_BACK: + Togl_DrawBuffer(togl, GL_BACK_RIGHT); + glClear(mask); + Togl_DrawBuffer(togl, drawBuffer); + break; + case GL_FRONT_AND_BACK: + Togl_DrawBuffer(togl, GL_RIGHT); + glClear(mask); + Togl_DrawBuffer(togl, drawBuffer); + break; + case GL_LEFT: + case GL_FRONT_LEFT: + case GL_BACK_LEFT: + case GL_RIGHT: + case GL_FRONT_RIGHT: + case GL_BACK_RIGHT: + default: + break; + } + } +#endif + if (mask != 0) + glClear(mask); + if (togl->Stereo == TOGL_STEREO_ROW_INTERLEAVED) { + int x, y; + + if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) { + int i; + + /* initialize stencil buffer mask */ + glPushAttrib(GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT + | GL_LINE_BIT | GL_VIEWPORT_BIT); + // 2d projection + Togl_SetViewPort(togl); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho(0, togl->Width, 0, togl->Height, -1, 1); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + glTranslatef(0.375f, 0.375f, 0); + glDisable(GL_ALPHA_TEST); + glDisable(GL_COLOR_LOGIC_OP); + glDisable(GL_DEPTH_TEST); + glDisable(GL_DITHER); + glDisable(GL_INDEX_LOGIC_OP); + glDisable(GL_LIGHTING); + glDisable(GL_LINE_SMOOTH); + glDisable(GL_MULTISAMPLE); + glLineWidth(1); + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + glStencilFunc(GL_ALWAYS, togl->riStencilBit, togl->riStencilBit); + glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); + glBegin(GL_LINES); + for (i = 0; i < togl->Height; i += 2) { + glVertex2i(0, i); + glVertex2i(togl->Width, i); + } + glEnd(); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + glPopAttrib(); + + if (stencil_write_mask) { + glStencilMask(stencil_write_mask & ~togl->riStencilBit); + } else { + glStencilMask(~togl->riStencilBit); + } + + Tk_GetRootCoords(togl->TkWin, &x, &y); + if ((y + togl->Height) % 2) { + glStencilFunc(GL_NOTEQUAL, togl->riStencilBit, + togl->riStencilBit); + } else { + glStencilFunc(GL_EQUAL, togl->riStencilBit, togl->riStencilBit); + } + } else { + Tk_GetRootCoords(togl->TkWin, &x, &y); + if ((y + togl->Height) % 2) { + glStencilFunc(GL_EQUAL, togl->riStencilBit, togl->riStencilBit); + } else { + glStencilFunc(GL_NOTEQUAL, togl->riStencilBit, + togl->riStencilBit); + } + } + } +} + +/* + * Togl_Frustum and Togl_Ortho: + * + * eyeOffset is the distance from the center line + * and is negative for the left eye and positive for right eye. + * eyeDist and eyeOffset need to be in the same units as your model space. + * In physical space, eyeDist might be 30 inches from the screen + * and eyeDist would be +/- 1.25 inch (for a total interocular distance + * of 2.5 inches). + */ + +void +Togl_Frustum(const Togl *togl, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) +{ + GLdouble eyeOffset = 0, eyeShift = 0; + + if (togl->Stereo == TOGL_STEREO_LEFT_EYE + || togl->currentStereoBuffer == STEREO_BUFFER_LEFT) + eyeOffset = -togl->EyeSeparation / 2; /* for left eye */ + else if (togl->Stereo == TOGL_STEREO_RIGHT_EYE + || togl->currentStereoBuffer == STEREO_BUFFER_RIGHT) + eyeOffset = togl->EyeSeparation / 2; /* for right eye */ + eyeShift = (togl->Convergence - zNear) * (eyeOffset / togl->Convergence); + + /* compenstate for altered viewports */ + switch (togl->Stereo) { + default: + break; + case TOGL_STEREO_SGIOLDSTYLE: + case TOGL_STEREO_DTI: + /* squished image is expanded, nothing needed */ + break; + case TOGL_STEREO_CROSS_EYE: + case TOGL_STEREO_WALL_EYE:{ + GLdouble delta = (top - bottom) / 2; + + top += delta; + bottom -= delta; + break; + } + } + + glFrustum(left + eyeShift, right + eyeShift, bottom, top, zNear, zFar); + glTranslated(-eyeShift, 0, 0); +} + +void +Togl_Ortho(const Togl *togl, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) +{ + /* TODO: debug this */ + GLdouble eyeOffset = 0, eyeShift = 0; + + if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) + eyeOffset = -togl->EyeSeparation / 2; /* for left eye */ + else if (togl->currentStereoBuffer == STEREO_BUFFER_RIGHT) + eyeOffset = togl->EyeSeparation / 2; /* for right eye */ + eyeShift = (togl->Convergence - zNear) * (eyeOffset / togl->Convergence); + + /* compenstate for altered viewports */ + switch (togl->Stereo) { + default: + break; + case TOGL_STEREO_SGIOLDSTYLE: + case TOGL_STEREO_DTI: + /* squished image is expanded, nothing needed */ + break; + case TOGL_STEREO_CROSS_EYE: + case TOGL_STEREO_WALL_EYE:{ + GLdouble delta = (top - bottom) / 2; + + top += delta; + bottom -= delta; + break; + } + } + + glOrtho(left + eyeShift, right + eyeShift, bottom, top, zNear, zFar); + glTranslated(-eyeShift, 0, 0); +} + +int +Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr) +{ + Tcl_Command toglCmd; + Tcl_CmdInfo info; + + toglCmd = Tcl_GetCommandFromObj(interp, obj); + if (Tcl_GetCommandInfoFromToken(toglCmd, &info) == 0 + || info.objProc != Togl_ObjWidget) { + Tcl_AppendResult(interp, "expected togl command argument", NULL); + return TCL_ERROR; + } + *toglPtr = (Togl *) info.objClientData; + return TCL_OK; +} + +int +Togl_GetToglFromName(Tcl_Interp *interp, const char *cmdName, Togl **toglPtr) +{ + Tcl_CmdInfo info; + + if (Tcl_GetCommandInfo(interp, cmdName, &info) == 0 + || info.objProc != Togl_ObjWidget) { + Tcl_AppendResult(interp, "expected togl command argument", NULL); + return TCL_ERROR; + } + *toglPtr = (Togl *) info.objClientData; + return TCL_OK; +} + +static int ObjectIsEmpty(Tcl_Obj *objPtr); + +/* + *---------------------------------------------------------------------- + * + * GetStereo - + * + * Converts an internal int into a a Tcl string obj. + * + * Results: + * Tcl_Obj containing the string representation of the stereo value. + * + * Side effects: + * Creates a new Tcl_Obj. + * + *---------------------------------------------------------------------- + */ + +static Tcl_Obj * +GetStereo(ClientData clientData, Tk_Window tkwin, char *recordPtr, + int internalOffset) + /* recordPtr is a pointer to widget record. */ + /* internalOffset is the offset within *recordPtr containing the stereo + * value. */ +{ + int stereo = *(int *) (recordPtr + internalOffset); + const char *name = "unknown"; + + switch (stereo) { + case TOGL_STEREO_NONE: + name = ""; + break; + case TOGL_STEREO_LEFT_EYE: + name = "left eye"; + break; + case TOGL_STEREO_RIGHT_EYE: + name = "right eye"; + break; + case TOGL_STEREO_NATIVE: + name = "native"; + break; + case TOGL_STEREO_SGIOLDSTYLE: + name = "sgioldstyle"; + break; + case TOGL_STEREO_ANAGLYPH: + name = "anaglyph"; + break; + case TOGL_STEREO_CROSS_EYE: + name = "cross-eye"; + break; + case TOGL_STEREO_WALL_EYE: + name = "wall-eye"; + break; + case TOGL_STEREO_DTI: + name = "dti"; + break; + case TOGL_STEREO_ROW_INTERLEAVED: + name = "row interleaved"; + break; + } + return Tcl_NewStringObj(name, -1); +} + +/* + *---------------------------------------------------------------------- + * + * SetStereo -- + * + * Converts a Tcl_Obj representing a widgets stereo into an + * integer value. + * + * Results: + * Standard Tcl result. + * + * Side effects: + * May store the integer value into the internal representation + * pointer. May change the pointer to the Tcl_Obj to NULL to indicate + * that the specified string was empty and that is acceptable. + * + *---------------------------------------------------------------------- + */ + +static int +SetStereo(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, + Tcl_Obj **value, char *recordPtr, int internalOffset, + char *oldInternalPtr, int flags) + /* interp is the current interp; may be used for errors. */ + /* tkwin is the Window for which option is being set. */ + /* value is a pointer to the pointer to the value object. We use a pointer + * to the pointer because we may need to return a value (NULL). */ + /* recordPtr is a pointer to storage for the widget record. */ + /* internalOffset is the offset within *recordPtr at which the internal + * value is to be stored. */ + /* oldInternalPtr is a pointer to storage for the old value. */ + /* flags are the flags for the option, set Tk_SetOptions. */ +{ + int stereo = 0; + char *string, *internalPtr; + + internalPtr = (internalOffset > 0) ? recordPtr + internalOffset : NULL; + + if ((flags & TK_OPTION_NULL_OK) && ObjectIsEmpty(*value)) { + *value = NULL; + } else { + /* + * Convert the stereo specifier into an integer value. + */ + + if (Tcl_GetBooleanFromObj(NULL, *value, &stereo) == TCL_OK) { + stereo = stereo ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE; + } else { + string = Tcl_GetString(*value); + + if (strcmp(string, "") == 0 || strcasecmp(string, "none") == 0) { + stereo = TOGL_STEREO_NONE; + } else if (strcasecmp(string, "native") == 0) { + stereo = TOGL_STEREO_NATIVE; + /* check if available when creating visual */ + } else if (strcasecmp(string, "left eye") == 0) { + stereo = TOGL_STEREO_LEFT_EYE; + } else if (strcasecmp(string, "right eye") == 0) { + stereo = TOGL_STEREO_RIGHT_EYE; + } else if (strcasecmp(string, "sgioldstyle") == 0) { + stereo = TOGL_STEREO_SGIOLDSTYLE; + } else if (strcasecmp(string, "anaglyph") == 0) { + stereo = TOGL_STEREO_ANAGLYPH; + } else if (strcasecmp(string, "cross-eye") == 0) { + stereo = TOGL_STEREO_CROSS_EYE; + } else if (strcasecmp(string, "wall-eye") == 0) { + stereo = TOGL_STEREO_WALL_EYE; + } else if (strcasecmp(string, "dti") == 0) { + stereo = TOGL_STEREO_DTI; + } else if (strcasecmp(string, "row interleaved") == 0) { + stereo = TOGL_STEREO_ROW_INTERLEAVED; + } else { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "bad stereo value \"", + Tcl_GetString(*value), "\"", NULL); + return TCL_ERROR; + } + } + } + + if (internalPtr != NULL) { + *((int *) oldInternalPtr) = *((int *) internalPtr); + *((int *) internalPtr) = stereo; + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * RestoreStereo -- + * + * Restore a stereo option value from a saved value. + * + * Results: + * None. + * + * Side effects: + * Restores the old value. + * + *---------------------------------------------------------------------- + */ + +static void +RestoreStereo(ClientData clientData, Tk_Window tkwin, char *internalPtr, + char *oldInternalPtr) +{ + *(int *) internalPtr = *(int *) oldInternalPtr; +} + +/* + *---------------------------------------------------------------------- + * + * GetWideInt - + * + * Converts an internal wide integer into a a Tcl WideInt obj. + * + * Results: + * Tcl_Obj containing the wide int value. + * + * Side effects: + * Creates a new Tcl_Obj. + * + *---------------------------------------------------------------------- + */ + +static Tcl_Obj * +GetWideInt(ClientData clientData, Tk_Window tkwin, char *recordPtr, + int internalOffset) + /* recordPtr is a pointer to widget record. */ + /* internalOffset is the offset within *recordPtr containing the wide int + * value. */ +{ + Tcl_WideInt wi = *(Tcl_WideInt *) (recordPtr + internalOffset); + + return Tcl_NewWideIntObj(wi); +} + +/* + *---------------------------------------------------------------------- + * + * SetWideInt -- + * + * Converts a Tcl_Obj representing a Tcl_WideInt. + * + * Results: + * Standard Tcl result. + * + * Side effects: + * May store the wide int value into the internal representation + * pointer. May change the pointer to the Tcl_Obj to NULL to indicate + * that the specified string was empty and that is acceptable. + * + *---------------------------------------------------------------------- + */ + +static int +SetWideInt(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, + Tcl_Obj **value, char *recordPtr, int internalOffset, + char *oldInternalPtr, int flags) + /* interp is the current interp; may be used for errors. */ + /* tkwin is the Window for which option is being set. */ + /* value is a pointer to the pointer to the value object. We use a pointer + * to the pointer because we may need to return a value (NULL). */ + /* recordPtr is a pointer to storage for the widget record. */ + /* internalOffset is the offset within *recordPtr at which the internal + * value is to be stored. */ + /* oldInternalPtr is a pointer to storage for the old value. */ + /* flags are the flags for the option, set Tk_SetOptions. */ +{ + char *internalPtr; + Tcl_WideInt w; + + internalPtr = (internalOffset > 0) ? recordPtr + internalOffset : NULL; + + if ((flags & TK_OPTION_NULL_OK) && ObjectIsEmpty(*value)) { + *value = NULL; + w = 0; + } else { + if (Tcl_GetWideIntFromObj(interp, *value, &w) != TCL_OK) { + return TCL_ERROR; + } + } + + if (internalPtr != NULL) { + *((Tcl_WideInt *) oldInternalPtr) = *((Tcl_WideInt *) internalPtr); + *((Tcl_WideInt *) internalPtr) = w; + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * RestoreWideInt -- + * + * Restore a wide int option value from a saved value. + * + * Results: + * None. + * + * Side effects: + * Restores the old value. + * + *---------------------------------------------------------------------- + */ + +static void +RestoreWideInt(ClientData clientData, Tk_Window tkwin, char *internalPtr, + char *oldInternalPtr) +{ + *(Tcl_WideInt *) internalPtr = *(Tcl_WideInt *) oldInternalPtr; +} + +/* + *---------------------------------------------------------------------- + * + * ObjectIsEmpty -- + * + * This procedure tests whether the string value of an object is + * empty. + * + * Results: + * The return value is 1 if the string value of objPtr has length + * zero, and 0 otherwise. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +ObjectIsEmpty(Tcl_Obj *objPtr) +/* objPtr = Object to test. May be NULL. */ +{ + int length; + + if (objPtr == NULL) { + return 1; + } + if (objPtr->bytes != NULL) { + return (objPtr->length == 0); + } + Tcl_GetStringFromObj(objPtr, &length); + return (length == 0); +} diff --git a/ng/Togl2.1/togl.decls b/ng/Togl2.1/togl.decls new file mode 100644 index 00000000..54d10797 --- /dev/null +++ b/ng/Togl2.1/togl.decls @@ -0,0 +1,195 @@ +library togl +interface togl + +# Declare each of the functions in the public Togl interface. Note that +# the an index should never be reused for a different function in order +# to preserve backwards compatibility. + +# package initialization +declare 0 generic { + int Togl_Init(Tcl_Interp *interp) +} + +# Miscellaneous +declare 1 generic { + void Togl_MakeCurrent(const Togl *togl) +} +declare 2 generic { + void Togl_PostRedisplay(Togl *togl) +} +declare 3 generic { + void Togl_SwapBuffers(const Togl *togl) +} +declare 33 generic { + Bool Togl_SwapInterval(const Togl *togl, int interval) +} +declare 48 generic { + int Togl_CopyContext(const Togl *from, const Togl *to, unsigned int mask) +} + +# Query functions +declare 4 generic { + const char *Togl_Ident(const Togl *togl) +} +declare 5 generic { + int Togl_Width(const Togl *togl) +} +declare 6 generic { + int Togl_Height(const Togl *togl) +} +declare 7 generic { + Tcl_Interp *Togl_Interp(const Togl *togl) +} +declare 8 generic { + Tk_Window Togl_TkWin(const Togl *togl) +} +declare 9 generic { + const char *Togl_CommandName(const Togl *togl) +} +declare 36 generic { + int Togl_ContextTag(const Togl *togl) +} +declare 37 generic { + Bool Togl_UpdatePending(const Togl *togl) +} + +declare 40 generic { + Bool Togl_HasRGBA(const Togl *togl) +} + +declare 41 generic { + Bool Togl_IsDoubleBuffered(const Togl *togl) +} + +declare 42 generic { + Bool Togl_HasDepthBuffer(const Togl *togl) +} + +declare 43 generic { + Bool Togl_HasAccumulationBuffer(const Togl *togl) +} + +declare 44 generic { + Bool Togl_HasDestinationAlpha(const Togl *togl) +} + +declare 45 generic { + Bool Togl_HasStencilBuffer(const Togl *togl) +} + +declare 46 generic { + int Togl_StereoMode(const Togl *togl) +} + +declare 47 generic { + Bool Togl_HasMultisample(const Togl *togl) +} + +declare 49 generic { + int Togl_PixelScale(const Togl *togl) +} + + +# Color Index mode +declare 10 generic { + unsigned long Togl_AllocColor(const Togl *togl, float red, + float green, float blue) +} +declare 11 generic { + void Togl_FreeColor(const Togl *togl, unsigned long index) +} +declare 12 generic { + void Togl_SetColor(const Togl *togl, unsigned long index, + float red, float green, float blue) +} + +# Bitmap fonts +declare 13 generic { + Tcl_Obj *Togl_LoadBitmapFont(const Togl *togl, const char *fontname) +} +declare 14 generic { + int Togl_UnloadBitmapFont(const Togl *togl, Tcl_Obj *toglfont) +} + +declare 38 generic { + int Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj) +} + +declare 39 generic { + int Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *str, int len) +} + +# Overlay functions +declare 15 generic { + void Togl_UseLayer(Togl *togl, int layer) +} +declare 16 generic { + void Togl_ShowOverlay(Togl *togl) +} +declare 17 generic { + void Togl_HideOverlay(Togl *togl) +} +declare 18 generic { + void Togl_PostOverlayRedisplay(Togl *togl) +} +declare 19 generic { + int Togl_ExistsOverlay(const Togl *togl) +} +declare 20 generic { + int Togl_GetOverlayTransparentValue(const Togl *togl) +} +declare 21 generic { + int Togl_IsMappedOverlay(const Togl *togl) +} +declare 22 generic { + unsigned long Togl_AllocColorOverlay(const Togl *togl, + float red, float green, float blue) +} +declare 23 generic { + void Togl_FreeColorOverlay(const Togl *togl, unsigned long index) +} + +# User client data +declare 24 generic { + ClientData Togl_GetClientData(const Togl *togl) +} +declare 25 generic { + void Togl_SetClientData(Togl *togl, ClientData clientData) +} + +# Stereo support +declare 26 generic { + void Togl_DrawBuffer(Togl *togl, GLenum mode) +} +declare 27 generic { + void Togl_Clear(const Togl *togl, GLbitfield mask) +} +declare 28 generic { + void Togl_Frustum(const Togl *togl, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) +} +declare 34 generic { + void Togl_Ortho(const Togl *togl, GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) +} +declare 35 generic { + int Togl_NumEyes(const Togl *togl) +} + +# save current contents of OpenGL window into photo image +declare 30 generic { + int Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo) +} + +# platform-independent lookup of OpenGL functions +declare 31 generic { + Togl_FuncPtr Togl_GetProcAddr(const char *funcname) +} + +# Return the Togl data associated with pathName +declare 29 generic { + int Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr) +} +declare 32 generic { + int Togl_GetToglFromName(Tcl_Interp *interp, const char *cmdName, Togl **toglPtr) +} diff --git a/ng/Togl2.1/togl.h b/ng/Togl2.1/togl.h new file mode 100644 index 00000000..ba71cb35 --- /dev/null +++ b/ng/Togl2.1/togl.h @@ -0,0 +1,145 @@ +/* $Id: togl.h,v 1.39 2009/03/31 23:21:13 gregcouch Exp $ */ + +/* vi:set sw=4: */ + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + + +#ifndef TOGL_H +# define TOGL_H + +//# include "togl_ws.h" + +# ifdef TOGL_WGL +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN +# if defined(_MSC_VER) +# define DllEntryPoint DllMain +# endif +# endif + +# if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) +# ifndef MAC_OSX_TCL +# define MAC_OSX_TCL 1 +# endif +# ifndef MAC_OSX_TK +# define MAC_OSX_TK 1 +# endif +# endif + +# ifdef USE_TOGL_STUBS +# ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +# endif +# ifndef USE_TK_STUBS +# define USE_TK_STUBS +# endif +# endif + +# include +# include +# if defined(TOGL_AGL) +# include +# elif defined(TOGL_NSOPENGL) +# include +# include +# else +# include +# endif + +# ifdef BUILD_togl +# undef TCL_STORAGE_CLASS +# define TCL_STORAGE_CLASS DLLEXPORT +# endif + +# ifndef CONST84 +# define CONST84 +# endif + +# ifndef NULL +# define NULL 0 +# endif + +# ifndef EXTERN +# define EXTERN extern +# endif + +# ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +# endif + +# define TOGL_VERSION "2.1" +# define TOGL_MAJOR_VERSION 2 +# define TOGL_MINOR_VERSION 1 + +/* + * "Standard" fonts which can be specified to Togl_LoadBitmapFont() + * Deprecated. Use the Tk font name or description instead. + */ +# define TOGL_BITMAP_8_BY_13 "8x13" +# define TOGL_BITMAP_9_BY_15 "9x15" +# define TOGL_BITMAP_TIMES_ROMAN_10 "Times 10" +# define TOGL_BITMAP_TIMES_ROMAN_24 "Times 24" +# define TOGL_BITMAP_HELVETICA_10 "Helvetica 10" +# define TOGL_BITMAP_HELVETICA_12 "Helvetica 12" +# define TOGL_BITMAP_HELVETICA_18 "Helvetica 18" + +/* + * Normal and overlay plane constants + */ +# define TOGL_NORMAL 1 +# define TOGL_OVERLAY 2 + +/* + * Stereo techniques: + * Only the native method uses OpenGL quad-buffered stereo. + * All need the eye offset and eye distance set properly. + */ +/* These versions need one eye drawn */ +# define TOGL_STEREO_NONE 0 +# define TOGL_STEREO_LEFT_EYE 1 /* just the left eye */ +# define TOGL_STEREO_RIGHT_EYE 2 /* just the right eye */ +# define TOGL_STEREO_ONE_EYE_MAX 127 +/* These versions need both eyes drawn */ +# define TOGL_STEREO_NATIVE 128 +# define TOGL_STEREO_SGIOLDSTYLE 129 /* interlaced, SGI API */ +# define TOGL_STEREO_ANAGLYPH 130 +# define TOGL_STEREO_CROSS_EYE 131 +# define TOGL_STEREO_WALL_EYE 132 +# define TOGL_STEREO_DTI 133 /* dti3d.com */ +# define TOGL_STEREO_ROW_INTERLEAVED 134 /* www.vrex.com/developer/interleave.htm */ + +struct Togl; +typedef struct Togl Togl; +typedef void (*Togl_FuncPtr) (); + +const char *Togl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, const char *version, + int exact)); + +# ifndef USE_TOGL_STUBS +# define Togl_InitStubs(interp, version, exact) \ + Tcl_PkgRequire(interp, "Togl", version, exact) +# endif + +/* + * Platform independent exported functions + */ + +# include "toglDecls.h" + +# ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +# endif + +#endif diff --git a/ng/Togl2.1/toglAGL.c b/ng/Togl2.1/toglAGL.c new file mode 100644 index 00000000..735a70d4 --- /dev/null +++ b/ng/Togl2.1/toglAGL.c @@ -0,0 +1,293 @@ +/* $Id: toglAGL.c,v 1.7 2009/10/22 00:06:41 gregcouch Exp $ */ + +/* vi:set sw=4 expandtab: */ + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +struct FBInfo +{ + GLint acceleration; + GLint colors; + GLint depth; + GLint samples; + AGLPixelFormat pix; +}; +typedef struct FBInfo FBInfo; + +static int +FBInfoCmp(const void *a, const void *b) +{ + /* + * 1. full acceleration is better + * 2. greater color bits is better + * 3. greater depth bits is better + * 4. more multisampling is better + */ + const FBInfo *x = (const FBInfo *) a; + const FBInfo *y = (const FBInfo *) b; + + if (x->acceleration != y->acceleration) + return y->acceleration - x->acceleration; + if (x->colors != y->colors) + return y->colors - x->colors; + if (x->depth != y->depth) + return y->depth - x->depth; + if (x->samples != y->samples) + return y->samples - x->samples; + return 0; +} + +static AGLPixelFormat +togl_pixelFormat(Togl *togl) +{ + GLint attribs[32]; + int na = 0; + AGLPixelFormat pix; + GDHandle display = NULL; + FBInfo *info = NULL; + int count; + +#if 0 + if (togl->MultisampleFlag && !hasMultisampling) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "multisampling not supported", TCL_STATIC); + return NULL; + } +#endif + + if (togl->PbufferFlag && !togl->RgbaFlag) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "puffer must be RGB[A]", TCL_STATIC); + return NULL; + } + + attribs[na++] = AGL_MINIMUM_POLICY; + /* ask for hardware-accelerated onscreen */ + attribs[na++] = AGL_ACCELERATED; + attribs[na++] = AGL_NO_RECOVERY; + if (togl->RgbaFlag) { + /* RGB[A] mode */ + attribs[na++] = AGL_RGBA; + attribs[na++] = AGL_RED_SIZE; + attribs[na++] = togl->RgbaRed; + attribs[na++] = AGL_GREEN_SIZE; + attribs[na++] = togl->RgbaGreen; + attribs[na++] = AGL_BLUE_SIZE; + attribs[na++] = togl->RgbaBlue; + if (togl->AlphaFlag) { + attribs[na++] = AGL_ALPHA_SIZE; + attribs[na++] = togl->AlphaSize; + } + } else { + /* Color index mode */ + attribs[na++] = AGL_BUFFER_SIZE; + attribs[na++] = 8; + } + if (togl->DepthFlag) { + attribs[na++] = AGL_DEPTH_SIZE; + attribs[na++] = togl->DepthSize; + } + if (togl->DoubleFlag) { + attribs[na++] = AGL_DOUBLEBUFFER; + } + if (togl->StencilFlag) { + attribs[na++] = AGL_STENCIL_SIZE; + attribs[na++] = togl->StencilSize; + } + if (togl->AccumFlag) { + attribs[na++] = AGL_ACCUM_RED_SIZE; + attribs[na++] = togl->AccumRed; + attribs[na++] = AGL_ACCUM_GREEN_SIZE; + attribs[na++] = togl->AccumGreen; + attribs[na++] = AGL_ACCUM_BLUE_SIZE; + attribs[na++] = togl->AccumBlue; + if (togl->AlphaFlag) { + attribs[na++] = AGL_ACCUM_ALPHA_SIZE; + attribs[na++] = togl->AccumAlpha; + } + } + if (togl->MultisampleFlag) { + attribs[na++] = AGL_MULTISAMPLE; +#ifdef AGL_SAMPLES_ARB + /* OS X 10.2 and later */ + attribs[na++] = AGL_SAMPLE_BUFFERS_ARB; + attribs[na++] = 1; + attribs[na++] = AGL_SAMPLES_ARB; + attribs[na++] = 2; +#endif + } + if (togl->AuxNumber != 0) { + attribs[na++] = AGL_AUX_BUFFERS; + attribs[na++] = togl->AuxNumber; + } + if (togl->Stereo == TOGL_STEREO_NATIVE) { + attribs[na++] = AGL_STEREO; + } + if (togl->FullscreenFlag) { + attribs[na++] = AGL_FULLSCREEN; + /* TODO: convert Tk screen to display device */ + display = GetMainDevice(); + } + attribs[na++] = AGL_NONE; + + if ((pix = aglChoosePixelFormat(&display, togl->FullscreenFlag ? 1 : 0, + attribs)) == NULL) { + Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", + TCL_STATIC); + return NULL; + } + + /* TODO: since we aglDestroyPixelFormat elsewhere, this code may leak + * memory if the pixel format choosen is not the original (because + * aglDestroyPixelFormat will give an error). */ + count = 0; + do { + info = (FBInfo *) realloc(info, (count + 1) * sizeof (FBInfo)); + info[count].pix = pix; + aglDescribePixelFormat(pix, AGL_ACCELERATED, &info[count].acceleration); + aglDescribePixelFormat(pix, AGL_BUFFER_SIZE, &info[count].colors); + aglDescribePixelFormat(pix, AGL_DEPTH_SIZE, &info[count].depth); +#ifdef AGL_SAMPLES_ARB + aglDescribePixelFormat(pix, AGL_SAMPLES_ARB, &info[count].samples); +#else + info[count].samples = 0; +#endif + ++count; + } while (pix = aglNextPixelFormat(pix)); + qsort(info, count, sizeof info[0], FBInfoCmp); + pix = info[0].pix; + free(info); + return pix; +} + +static int +togl_describePixelFormat(Togl *togl) +{ + AGLPixelFormat pixelformat; + + /* fill in RgbaFlag, DoubleFlag, and Stereo */ + pixelformat = (AGLPixelFormat) togl->PixelFormat; + GLint has_rgba, has_doublebuf, has_depth, has_accum, has_alpha, + has_stencil, has_stereo, has_multisample; + + if (aglDescribePixelFormat(pixelformat, AGL_RGBA, &has_rgba) + && aglDescribePixelFormat(pixelformat, AGL_DOUBLEBUFFER, + &has_doublebuf) + && aglDescribePixelFormat(pixelformat, AGL_DEPTH_SIZE, &has_depth) + && aglDescribePixelFormat(pixelformat, AGL_ACCUM_RED_SIZE, + &has_accum) + && aglDescribePixelFormat(pixelformat, AGL_ALPHA_SIZE, &has_alpha) + && aglDescribePixelFormat(pixelformat, AGL_STENCIL_SIZE, + &has_stencil) + && aglDescribePixelFormat(pixelformat, AGL_STEREO, &has_stereo) +#ifdef AGL_SAMPLES_ARB + && aglDescribePixelFormat(pixelformat, AGL_SAMPLES_ARB, + &has_multisample) +#endif + ) { + togl->RgbaFlag = (has_rgba != 0); + togl->DoubleFlag = (has_doublebuf != 0); + togl->DepthFlag = (has_depth != 0); + togl->AccumFlag = (has_accum != 0); + togl->AlphaFlag = (has_alpha != 0); + togl->StencilFlag = (has_stencil != 0); + togl->Stereo = (has_stereo ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE); +#ifdef AGL_SAMPLES_ARB + togl->MultisampleFlag = (has_multisample != 0); +#else + togl->MultisampleFlag = False; +#endif + return True; + } else { + Tcl_SetResult(togl->Interp, + TCL_STUPID "failed querying pixel format attributes", + TCL_STATIC); + return False; + } +} + +#define isPow2(x) (((x) & ((x) - 1)) == 0) + +static AGLPbuffer +togl_createPbuffer(Togl *togl) +{ + GLint min_size[2], max_size[2]; + Bool hasPbuffer; + const char *extensions; + GLboolean good; + GLint target; + GLint virtualScreen; + AGLPbuffer pbuf; + + extensions = (const char *) glGetString(GL_EXTENSIONS); + hasPbuffer = (strstr(extensions, "GL_APPLE_pixel_buffer") != NULL); + if (!hasPbuffer) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "pbuffers are not supported", TCL_STATIC); + return NULL; + } + glGetIntegerv(GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE, min_size); + glGetIntegerv(GL_MAX_VIEWPORT_DIMS, max_size); + virtualScreen = aglGetVirtualScreen(togl->Ctx); + for (;;) { + /* make sure we don't exceed the maximum size because if we do, + * aglCreatePbuffer may succeed and later uses of the pbuffer fail */ + if (togl->Width < min_size[0]) + togl->Width = min_size[0]; + else if (togl->Width > max_size[0]) { + if (togl->LargestPbufferFlag) + togl->Width = max_size[0]; + else { + Tcl_SetResult(togl->Interp, + TCL_STUPID "pbuffer too large", TCL_STATIC); + return NULL; + } + } + if (togl->Height < min_size[1]) + togl->Height = min_size[1]; + else if (togl->Height > max_size[1]) { + if (togl->LargestPbufferFlag) + togl->Height = max_size[1]; + else { + Tcl_SetResult(togl->Interp, + TCL_STUPID "pbuffer too large", TCL_STATIC); + return NULL; + } + } + + if (isPow2(togl->Width) && isPow2(togl->Height)) + target = GL_TEXTURE_2D; + else + target = GL_TEXTURE_RECTANGLE_ARB; + + good = aglCreatePBuffer(togl->Width, togl->Height, target, + togl->AlphaFlag ? GL_RGBA : GL_RGB, 0, &pbuf); + if (good) { + /* aglSetPbuffer allocates the framebuffer space */ + if (aglSetPBuffer(togl->Ctx, pbuf, 0, 0, virtualScreen)) { + return pbuf; + } + } + if (!togl->LargestPbufferFlag + || togl->Width == min_size[0] || togl->Height == min_size[1]) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to create pbuffer", TCL_STATIC); + return NULL; + } + /* largest unavailable, try something smaller */ + togl->Width = togl->Width / 2 + togl->Width % 2; + togl->Height = togl->Width / 2 + togl->Height % 2; + } +} + +static void +togl_destroyPbuffer(Togl *togl) +{ + aglDestroyPBuffer(togl->pbuf); +} diff --git a/ng/Togl2.1/toglDecls.h b/ng/Togl2.1/toglDecls.h new file mode 100755 index 00000000..0fdf8004 --- /dev/null +++ b/ng/Togl2.1/toglDecls.h @@ -0,0 +1,546 @@ +#ifndef ToglDecls_H +# define ToglDecls_H + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Togl_Init_TCL_DECLARED +#define Togl_Init_TCL_DECLARED +/* 0 */ +EXTERN int Togl_Init(Tcl_Interp *interp); +#endif +#ifndef Togl_MakeCurrent_TCL_DECLARED +#define Togl_MakeCurrent_TCL_DECLARED +/* 1 */ +EXTERN void Togl_MakeCurrent(const Togl *togl); +#endif +#ifndef Togl_PostRedisplay_TCL_DECLARED +#define Togl_PostRedisplay_TCL_DECLARED +/* 2 */ +EXTERN void Togl_PostRedisplay(Togl *togl); +#endif +#ifndef Togl_SwapBuffers_TCL_DECLARED +#define Togl_SwapBuffers_TCL_DECLARED +/* 3 */ +EXTERN void Togl_SwapBuffers(const Togl *togl); +#endif +#ifndef Togl_Ident_TCL_DECLARED +#define Togl_Ident_TCL_DECLARED +/* 4 */ +EXTERN const char * Togl_Ident(const Togl *togl); +#endif +#ifndef Togl_Width_TCL_DECLARED +#define Togl_Width_TCL_DECLARED +/* 5 */ +EXTERN int Togl_Width(const Togl *togl); +#endif +#ifndef Togl_Height_TCL_DECLARED +#define Togl_Height_TCL_DECLARED +/* 6 */ +EXTERN int Togl_Height(const Togl *togl); +#endif +#ifndef Togl_Interp_TCL_DECLARED +#define Togl_Interp_TCL_DECLARED +/* 7 */ +EXTERN Tcl_Interp * Togl_Interp(const Togl *togl); +#endif +#ifndef Togl_TkWin_TCL_DECLARED +#define Togl_TkWin_TCL_DECLARED +/* 8 */ +EXTERN Tk_Window Togl_TkWin(const Togl *togl); +#endif +#ifndef Togl_CommandName_TCL_DECLARED +#define Togl_CommandName_TCL_DECLARED +/* 9 */ +EXTERN const char * Togl_CommandName(const Togl *togl); +#endif +#ifndef Togl_AllocColor_TCL_DECLARED +#define Togl_AllocColor_TCL_DECLARED +/* 10 */ +EXTERN unsigned long Togl_AllocColor(const Togl *togl, float red, + float green, float blue); +#endif +#ifndef Togl_FreeColor_TCL_DECLARED +#define Togl_FreeColor_TCL_DECLARED +/* 11 */ +EXTERN void Togl_FreeColor(const Togl *togl, unsigned long index); +#endif +#ifndef Togl_SetColor_TCL_DECLARED +#define Togl_SetColor_TCL_DECLARED +/* 12 */ +EXTERN void Togl_SetColor(const Togl *togl, unsigned long index, + float red, float green, float blue); +#endif +#ifndef Togl_LoadBitmapFont_TCL_DECLARED +#define Togl_LoadBitmapFont_TCL_DECLARED +/* 13 */ +EXTERN Tcl_Obj * Togl_LoadBitmapFont(const Togl *togl, + const char *fontname); +#endif +#ifndef Togl_UnloadBitmapFont_TCL_DECLARED +#define Togl_UnloadBitmapFont_TCL_DECLARED +/* 14 */ +EXTERN int Togl_UnloadBitmapFont(const Togl *togl, + Tcl_Obj *toglfont); +#endif +#ifndef Togl_UseLayer_TCL_DECLARED +#define Togl_UseLayer_TCL_DECLARED +/* 15 */ +EXTERN void Togl_UseLayer(Togl *togl, int layer); +#endif +#ifndef Togl_ShowOverlay_TCL_DECLARED +#define Togl_ShowOverlay_TCL_DECLARED +/* 16 */ +EXTERN void Togl_ShowOverlay(Togl *togl); +#endif +#ifndef Togl_HideOverlay_TCL_DECLARED +#define Togl_HideOverlay_TCL_DECLARED +/* 17 */ +EXTERN void Togl_HideOverlay(Togl *togl); +#endif +#ifndef Togl_PostOverlayRedisplay_TCL_DECLARED +#define Togl_PostOverlayRedisplay_TCL_DECLARED +/* 18 */ +EXTERN void Togl_PostOverlayRedisplay(Togl *togl); +#endif +#ifndef Togl_ExistsOverlay_TCL_DECLARED +#define Togl_ExistsOverlay_TCL_DECLARED +/* 19 */ +EXTERN int Togl_ExistsOverlay(const Togl *togl); +#endif +#ifndef Togl_GetOverlayTransparentValue_TCL_DECLARED +#define Togl_GetOverlayTransparentValue_TCL_DECLARED +/* 20 */ +EXTERN int Togl_GetOverlayTransparentValue(const Togl *togl); +#endif +#ifndef Togl_IsMappedOverlay_TCL_DECLARED +#define Togl_IsMappedOverlay_TCL_DECLARED +/* 21 */ +EXTERN int Togl_IsMappedOverlay(const Togl *togl); +#endif +#ifndef Togl_AllocColorOverlay_TCL_DECLARED +#define Togl_AllocColorOverlay_TCL_DECLARED +/* 22 */ +EXTERN unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, + float green, float blue); +#endif +#ifndef Togl_FreeColorOverlay_TCL_DECLARED +#define Togl_FreeColorOverlay_TCL_DECLARED +/* 23 */ +EXTERN void Togl_FreeColorOverlay(const Togl *togl, + unsigned long index); +#endif +#ifndef Togl_GetClientData_TCL_DECLARED +#define Togl_GetClientData_TCL_DECLARED +/* 24 */ +EXTERN ClientData Togl_GetClientData(const Togl *togl); +#endif +#ifndef Togl_SetClientData_TCL_DECLARED +#define Togl_SetClientData_TCL_DECLARED +/* 25 */ +EXTERN void Togl_SetClientData(Togl *togl, ClientData clientData); +#endif +#ifndef Togl_DrawBuffer_TCL_DECLARED +#define Togl_DrawBuffer_TCL_DECLARED +/* 26 */ +EXTERN void Togl_DrawBuffer(Togl *togl, GLenum mode); +#endif +#ifndef Togl_Clear_TCL_DECLARED +#define Togl_Clear_TCL_DECLARED +/* 27 */ +EXTERN void Togl_Clear(const Togl *togl, GLbitfield mask); +#endif +#ifndef Togl_Frustum_TCL_DECLARED +#define Togl_Frustum_TCL_DECLARED +/* 28 */ +EXTERN void Togl_Frustum(const Togl *togl, GLdouble left, + GLdouble right, GLdouble bottom, + GLdouble top, GLdouble near, GLdouble far); +#endif +#ifndef Togl_GetToglFromObj_TCL_DECLARED +#define Togl_GetToglFromObj_TCL_DECLARED +/* 29 */ +EXTERN int Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, + Togl **toglPtr); +#endif +#ifndef Togl_TakePhoto_TCL_DECLARED +#define Togl_TakePhoto_TCL_DECLARED +/* 30 */ +EXTERN int Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo); +#endif +#ifndef Togl_GetProcAddr_TCL_DECLARED +#define Togl_GetProcAddr_TCL_DECLARED +/* 31 */ +EXTERN Togl_FuncPtr Togl_GetProcAddr(const char *funcname); +#endif +#ifndef Togl_GetToglFromName_TCL_DECLARED +#define Togl_GetToglFromName_TCL_DECLARED +/* 32 */ +EXTERN int Togl_GetToglFromName(Tcl_Interp *interp, + const char *cmdName, Togl **toglPtr); +#endif +#ifndef Togl_SwapInterval_TCL_DECLARED +#define Togl_SwapInterval_TCL_DECLARED +/* 33 */ +EXTERN Bool Togl_SwapInterval(const Togl *togl, int interval); +#endif +#ifndef Togl_Ortho_TCL_DECLARED +#define Togl_Ortho_TCL_DECLARED +/* 34 */ +EXTERN void Togl_Ortho(const Togl *togl, GLdouble left, + GLdouble right, GLdouble bottom, + GLdouble top, GLdouble near, GLdouble far); +#endif +#ifndef Togl_NumEyes_TCL_DECLARED +#define Togl_NumEyes_TCL_DECLARED +/* 35 */ +EXTERN int Togl_NumEyes(const Togl *togl); +#endif +#ifndef Togl_ContextTag_TCL_DECLARED +#define Togl_ContextTag_TCL_DECLARED +/* 36 */ +EXTERN int Togl_ContextTag(const Togl *togl); +#endif +#ifndef Togl_UpdatePending_TCL_DECLARED +#define Togl_UpdatePending_TCL_DECLARED +/* 37 */ +EXTERN Bool Togl_UpdatePending(const Togl *togl); +#endif +#ifndef Togl_WriteObj_TCL_DECLARED +#define Togl_WriteObj_TCL_DECLARED +/* 38 */ +EXTERN int Togl_WriteObj(const Togl *togl, + const Tcl_Obj *toglfont, Tcl_Obj *obj); +#endif +#ifndef Togl_WriteChars_TCL_DECLARED +#define Togl_WriteChars_TCL_DECLARED +/* 39 */ +EXTERN int Togl_WriteChars(const Togl *togl, + const Tcl_Obj *toglfont, const char *str, + int len); +#endif +#ifndef Togl_HasRGBA_TCL_DECLARED +#define Togl_HasRGBA_TCL_DECLARED +/* 40 */ +EXTERN Bool Togl_HasRGBA(const Togl *togl); +#endif +#ifndef Togl_IsDoubleBuffered_TCL_DECLARED +#define Togl_IsDoubleBuffered_TCL_DECLARED +/* 41 */ +EXTERN Bool Togl_IsDoubleBuffered(const Togl *togl); +#endif +#ifndef Togl_HasDepthBuffer_TCL_DECLARED +#define Togl_HasDepthBuffer_TCL_DECLARED +/* 42 */ +EXTERN Bool Togl_HasDepthBuffer(const Togl *togl); +#endif +#ifndef Togl_HasAccumulationBuffer_TCL_DECLARED +#define Togl_HasAccumulationBuffer_TCL_DECLARED +/* 43 */ +EXTERN Bool Togl_HasAccumulationBuffer(const Togl *togl); +#endif +#ifndef Togl_HasDestinationAlpha_TCL_DECLARED +#define Togl_HasDestinationAlpha_TCL_DECLARED +/* 44 */ +EXTERN Bool Togl_HasDestinationAlpha(const Togl *togl); +#endif +#ifndef Togl_HasStencilBuffer_TCL_DECLARED +#define Togl_HasStencilBuffer_TCL_DECLARED +/* 45 */ +EXTERN Bool Togl_HasStencilBuffer(const Togl *togl); +#endif +#ifndef Togl_StereoMode_TCL_DECLARED +#define Togl_StereoMode_TCL_DECLARED +/* 46 */ +EXTERN int Togl_StereoMode(const Togl *togl); +#endif +#ifndef Togl_HasMultisample_TCL_DECLARED +#define Togl_HasMultisample_TCL_DECLARED +/* 47 */ +EXTERN Bool Togl_HasMultisample(const Togl *togl); +#endif +#ifndef Togl_CopyContext_TCL_DECLARED +#define Togl_CopyContext_TCL_DECLARED +/* 48 */ +EXTERN int Togl_CopyContext(const Togl *from, const Togl *to, + unsigned int mask); +#endif + +typedef struct ToglStubs { + int magic; + const struct ToglStubHooks *hooks; + + int (*togl_Init) (Tcl_Interp *interp); /* 0 */ + void (*togl_MakeCurrent) (const Togl *togl); /* 1 */ + void (*togl_PostRedisplay) (Togl *togl); /* 2 */ + void (*togl_SwapBuffers) (const Togl *togl); /* 3 */ + const char * (*togl_Ident) (const Togl *togl); /* 4 */ + int (*togl_Width) (const Togl *togl); /* 5 */ + int (*togl_Height) (const Togl *togl); /* 6 */ + Tcl_Interp * (*togl_Interp) (const Togl *togl); /* 7 */ + Tk_Window (*togl_TkWin) (const Togl *togl); /* 8 */ + const char * (*togl_CommandName) (const Togl *togl); /* 9 */ + unsigned long (*togl_AllocColor) (const Togl *togl, float red, float green, float blue); /* 10 */ + void (*togl_FreeColor) (const Togl *togl, unsigned long index); /* 11 */ + void (*togl_SetColor) (const Togl *togl, unsigned long index, float red, float green, float blue); /* 12 */ + Tcl_Obj * (*togl_LoadBitmapFont) (const Togl *togl, const char *fontname); /* 13 */ + int (*togl_UnloadBitmapFont) (const Togl *togl, Tcl_Obj *toglfont); /* 14 */ + void (*togl_UseLayer) (Togl *togl, int layer); /* 15 */ + void (*togl_ShowOverlay) (Togl *togl); /* 16 */ + void (*togl_HideOverlay) (Togl *togl); /* 17 */ + void (*togl_PostOverlayRedisplay) (Togl *togl); /* 18 */ + int (*togl_ExistsOverlay) (const Togl *togl); /* 19 */ + int (*togl_GetOverlayTransparentValue) (const Togl *togl); /* 20 */ + int (*togl_IsMappedOverlay) (const Togl *togl); /* 21 */ + unsigned long (*togl_AllocColorOverlay) (const Togl *togl, float red, float green, float blue); /* 22 */ + void (*togl_FreeColorOverlay) (const Togl *togl, unsigned long index); /* 23 */ + ClientData (*togl_GetClientData) (const Togl *togl); /* 24 */ + void (*togl_SetClientData) (Togl *togl, ClientData clientData); /* 25 */ + void (*togl_DrawBuffer) (Togl *togl, GLenum mode); /* 26 */ + void (*togl_Clear) (const Togl *togl, GLbitfield mask); /* 27 */ + void (*togl_Frustum) (const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); /* 28 */ + int (*togl_GetToglFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr); /* 29 */ + int (*togl_TakePhoto) (Togl *togl, Tk_PhotoHandle photo); /* 30 */ + Togl_FuncPtr (*togl_GetProcAddr) (const char *funcname); /* 31 */ + int (*togl_GetToglFromName) (Tcl_Interp *interp, const char *cmdName, Togl **toglPtr); /* 32 */ + Bool (*togl_SwapInterval) (const Togl *togl, int interval); /* 33 */ + void (*togl_Ortho) (const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); /* 34 */ + int (*togl_NumEyes) (const Togl *togl); /* 35 */ + int (*togl_ContextTag) (const Togl *togl); /* 36 */ + Bool (*togl_UpdatePending) (const Togl *togl); /* 37 */ + int (*togl_WriteObj) (const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj); /* 38 */ + int (*togl_WriteChars) (const Togl *togl, const Tcl_Obj *toglfont, const char *str, int len); /* 39 */ + Bool (*togl_HasRGBA) (const Togl *togl); /* 40 */ + Bool (*togl_IsDoubleBuffered) (const Togl *togl); /* 41 */ + Bool (*togl_HasDepthBuffer) (const Togl *togl); /* 42 */ + Bool (*togl_HasAccumulationBuffer) (const Togl *togl); /* 43 */ + Bool (*togl_HasDestinationAlpha) (const Togl *togl); /* 44 */ + Bool (*togl_HasStencilBuffer) (const Togl *togl); /* 45 */ + int (*togl_StereoMode) (const Togl *togl); /* 46 */ + Bool (*togl_HasMultisample) (const Togl *togl); /* 47 */ + int (*togl_CopyContext) (const Togl *from, const Togl *to, unsigned int mask); /* 48 */ +} ToglStubs; + +#if defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) +extern const ToglStubs *toglStubsPtr; +#endif /* defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) */ + +#if defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Togl_Init +#define Togl_Init \ + (toglStubsPtr->togl_Init) /* 0 */ +#endif +#ifndef Togl_MakeCurrent +#define Togl_MakeCurrent \ + (toglStubsPtr->togl_MakeCurrent) /* 1 */ +#endif +#ifndef Togl_PostRedisplay +#define Togl_PostRedisplay \ + (toglStubsPtr->togl_PostRedisplay) /* 2 */ +#endif +#ifndef Togl_SwapBuffers +#define Togl_SwapBuffers \ + (toglStubsPtr->togl_SwapBuffers) /* 3 */ +#endif +#ifndef Togl_Ident +#define Togl_Ident \ + (toglStubsPtr->togl_Ident) /* 4 */ +#endif +#ifndef Togl_Width +#define Togl_Width \ + (toglStubsPtr->togl_Width) /* 5 */ +#endif +#ifndef Togl_Height +#define Togl_Height \ + (toglStubsPtr->togl_Height) /* 6 */ +#endif +#ifndef Togl_Interp +#define Togl_Interp \ + (toglStubsPtr->togl_Interp) /* 7 */ +#endif +#ifndef Togl_TkWin +#define Togl_TkWin \ + (toglStubsPtr->togl_TkWin) /* 8 */ +#endif +#ifndef Togl_CommandName +#define Togl_CommandName \ + (toglStubsPtr->togl_CommandName) /* 9 */ +#endif +#ifndef Togl_AllocColor +#define Togl_AllocColor \ + (toglStubsPtr->togl_AllocColor) /* 10 */ +#endif +#ifndef Togl_FreeColor +#define Togl_FreeColor \ + (toglStubsPtr->togl_FreeColor) /* 11 */ +#endif +#ifndef Togl_SetColor +#define Togl_SetColor \ + (toglStubsPtr->togl_SetColor) /* 12 */ +#endif +#ifndef Togl_LoadBitmapFont +#define Togl_LoadBitmapFont \ + (toglStubsPtr->togl_LoadBitmapFont) /* 13 */ +#endif +#ifndef Togl_UnloadBitmapFont +#define Togl_UnloadBitmapFont \ + (toglStubsPtr->togl_UnloadBitmapFont) /* 14 */ +#endif +#ifndef Togl_UseLayer +#define Togl_UseLayer \ + (toglStubsPtr->togl_UseLayer) /* 15 */ +#endif +#ifndef Togl_ShowOverlay +#define Togl_ShowOverlay \ + (toglStubsPtr->togl_ShowOverlay) /* 16 */ +#endif +#ifndef Togl_HideOverlay +#define Togl_HideOverlay \ + (toglStubsPtr->togl_HideOverlay) /* 17 */ +#endif +#ifndef Togl_PostOverlayRedisplay +#define Togl_PostOverlayRedisplay \ + (toglStubsPtr->togl_PostOverlayRedisplay) /* 18 */ +#endif +#ifndef Togl_ExistsOverlay +#define Togl_ExistsOverlay \ + (toglStubsPtr->togl_ExistsOverlay) /* 19 */ +#endif +#ifndef Togl_GetOverlayTransparentValue +#define Togl_GetOverlayTransparentValue \ + (toglStubsPtr->togl_GetOverlayTransparentValue) /* 20 */ +#endif +#ifndef Togl_IsMappedOverlay +#define Togl_IsMappedOverlay \ + (toglStubsPtr->togl_IsMappedOverlay) /* 21 */ +#endif +#ifndef Togl_AllocColorOverlay +#define Togl_AllocColorOverlay \ + (toglStubsPtr->togl_AllocColorOverlay) /* 22 */ +#endif +#ifndef Togl_FreeColorOverlay +#define Togl_FreeColorOverlay \ + (toglStubsPtr->togl_FreeColorOverlay) /* 23 */ +#endif +#ifndef Togl_GetClientData +#define Togl_GetClientData \ + (toglStubsPtr->togl_GetClientData) /* 24 */ +#endif +#ifndef Togl_SetClientData +#define Togl_SetClientData \ + (toglStubsPtr->togl_SetClientData) /* 25 */ +#endif +#ifndef Togl_DrawBuffer +#define Togl_DrawBuffer \ + (toglStubsPtr->togl_DrawBuffer) /* 26 */ +#endif +#ifndef Togl_Clear +#define Togl_Clear \ + (toglStubsPtr->togl_Clear) /* 27 */ +#endif +#ifndef Togl_Frustum +#define Togl_Frustum \ + (toglStubsPtr->togl_Frustum) /* 28 */ +#endif +#ifndef Togl_GetToglFromObj +#define Togl_GetToglFromObj \ + (toglStubsPtr->togl_GetToglFromObj) /* 29 */ +#endif +#ifndef Togl_TakePhoto +#define Togl_TakePhoto \ + (toglStubsPtr->togl_TakePhoto) /* 30 */ +#endif +#ifndef Togl_GetProcAddr +#define Togl_GetProcAddr \ + (toglStubsPtr->togl_GetProcAddr) /* 31 */ +#endif +#ifndef Togl_GetToglFromName +#define Togl_GetToglFromName \ + (toglStubsPtr->togl_GetToglFromName) /* 32 */ +#endif +#ifndef Togl_SwapInterval +#define Togl_SwapInterval \ + (toglStubsPtr->togl_SwapInterval) /* 33 */ +#endif +#ifndef Togl_Ortho +#define Togl_Ortho \ + (toglStubsPtr->togl_Ortho) /* 34 */ +#endif +#ifndef Togl_NumEyes +#define Togl_NumEyes \ + (toglStubsPtr->togl_NumEyes) /* 35 */ +#endif +#ifndef Togl_ContextTag +#define Togl_ContextTag \ + (toglStubsPtr->togl_ContextTag) /* 36 */ +#endif +#ifndef Togl_UpdatePending +#define Togl_UpdatePending \ + (toglStubsPtr->togl_UpdatePending) /* 37 */ +#endif +#ifndef Togl_WriteObj +#define Togl_WriteObj \ + (toglStubsPtr->togl_WriteObj) /* 38 */ +#endif +#ifndef Togl_WriteChars +#define Togl_WriteChars \ + (toglStubsPtr->togl_WriteChars) /* 39 */ +#endif +#ifndef Togl_HasRGBA +#define Togl_HasRGBA \ + (toglStubsPtr->togl_HasRGBA) /* 40 */ +#endif +#ifndef Togl_IsDoubleBuffered +#define Togl_IsDoubleBuffered \ + (toglStubsPtr->togl_IsDoubleBuffered) /* 41 */ +#endif +#ifndef Togl_HasDepthBuffer +#define Togl_HasDepthBuffer \ + (toglStubsPtr->togl_HasDepthBuffer) /* 42 */ +#endif +#ifndef Togl_HasAccumulationBuffer +#define Togl_HasAccumulationBuffer \ + (toglStubsPtr->togl_HasAccumulationBuffer) /* 43 */ +#endif +#ifndef Togl_HasDestinationAlpha +#define Togl_HasDestinationAlpha \ + (toglStubsPtr->togl_HasDestinationAlpha) /* 44 */ +#endif +#ifndef Togl_HasStencilBuffer +#define Togl_HasStencilBuffer \ + (toglStubsPtr->togl_HasStencilBuffer) /* 45 */ +#endif +#ifndef Togl_StereoMode +#define Togl_StereoMode \ + (toglStubsPtr->togl_StereoMode) /* 46 */ +#endif +#ifndef Togl_HasMultisample +#define Togl_HasMultisample \ + (toglStubsPtr->togl_HasMultisample) /* 47 */ +#endif +#ifndef Togl_CopyContext +#define Togl_CopyContext \ + (toglStubsPtr->togl_CopyContext) /* 48 */ +#endif + +#endif /* defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#endif diff --git a/ng/Togl2.1/toglFont.c b/ng/Togl2.1/toglFont.c new file mode 100644 index 00000000..337d28cc --- /dev/null +++ b/ng/Togl2.1/toglFont.c @@ -0,0 +1,447 @@ +/* $Id: toglFont.c,v 1.8 2009/05/22 00:18:36 gregcouch Exp $ */ + +/* vi:set sw=4 expandtab: */ + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2008 Greg Couch + * See the LICENSE file for copyright details. + */ + +/* + * Togl Bitmap Font support + * + * If bitmap font support is requested, then this file is included into + * togl.c. Parts of this file are based on , + * "Creating and Using Tcl Handles in C Extensions". + * + * Neither the Tk public nor the internal interface give enough information + * to reuse the font in OpenGL, so we copy the private structures here to + * access what we need. + * + * Globals needed by the font module are in togl.c + */ + +#include + +struct Togl_BitmapFontInfo +{ + GLuint base; + GLuint first; + GLuint last; + int contextTag; + /* TODO: keep original font and/or encoding */ +}; +typedef struct Togl_BitmapFontInfo Togl_BitmapFontInfo; + +#define BITMAP_FONT_INFO(obj) \ + ((Togl_BitmapFontInfo *) (obj)->internalRep.otherValuePtr) +#define SET_BITMAP_FONT_INFO(obj) \ + (obj)->internalRep.otherValuePtr + +static void Togl_FontFree(Tcl_Obj *obj); +static void Togl_FontDup(Tcl_Obj *src, Tcl_Obj *dup); +static void Togl_FontString(Tcl_Obj *obj); +static int Togl_FontSet(Tcl_Interp *interp, Tcl_Obj *obj); + +static Tcl_ObjType Togl_BitmapFontType = { + "Togl BitmapFont", /* name */ + Togl_FontFree, /* free internal rep */ + Togl_FontDup, /* dup internal rep */ + Togl_FontString, /* update string from internal rep */ + Togl_FontSet /* set internal rep from string */ +}; + +static int +Togl_FontSet(Tcl_Interp *interp, Tcl_Obj *obj) +{ + if (interp) + Tcl_AppendResult(interp, "cannot (re)build object of type \"", + Togl_BitmapFontType.name, "\"", NULL); + return TCL_ERROR; +} + +static void +Togl_FontFree(Tcl_Obj *obj) +{ + Togl_BitmapFontInfo *bfi = BITMAP_FONT_INFO(obj); + + ckfree((char *) bfi); +} + +static void +Togl_FontString(Tcl_Obj *obj) +{ + /* assert(obj->bytes == NULL) */ + static char buf[256]; + register unsigned len; + Togl_BitmapFontInfo *bfi = BITMAP_FONT_INFO(obj); + +#if !defined(TOGL_AGL) && !defined(TOGL_NSOPENGL) + snprintf(buf, sizeof buf - 1, "{{%s} %d %d %d}", + Togl_BitmapFontType.name, bfi->base, bfi->first, bfi->last); +#else + /* unlike every other platform, on Aqua, GLint is long */ + snprintf(buf, sizeof buf - 1, "{{%s} %ld %ld %ld}", + Togl_BitmapFontType.name, bfi->base, bfi->first, bfi->last); +#endif + buf[sizeof buf - 1] = '\0'; + len = strlen(buf); + obj->bytes = (char *) ckalloc(len + 1); + strcpy(obj->bytes, buf); + obj->length = len; +} + +static void +Togl_FontDup(Tcl_Obj *src, Tcl_Obj *dup) +{ + /* + * When duplicated, lose the font-ness and just be a string. + * So don't copy the internal representation and don't set + * dup->typePtr. + */ +} + +#if defined(TOGL_X11) +/* From tkUnixFont.c */ +/* + * The following structure encapsulates an individual screen font. A font + * object is made up of however many SubFonts are necessary to display a + * stream of multilingual characters. + */ + +typedef struct FontFamily FontFamily; + +typedef struct SubFont +{ + char **fontMap; /* Pointer to font map from the FontFamily, + * cached here to save a dereference. */ + XFontStruct *fontStructPtr; /* The specific screen font that will be used + * when displaying/measuring chars belonging to + * the FontFamily. */ + FontFamily *familyPtr; /* The FontFamily for this SubFont. */ +} SubFont; + +/* + * The following structure represents Unix's implementation of a font + * object. + */ + +# define SUBFONT_SPACE 3 +# define BASE_CHARS 256 + +typedef struct UnixFont +{ + TkFont font; /* Stuff used by generic font package. Must be + * first in structure. */ + SubFont staticSubFonts[SUBFONT_SPACE]; + /* Builtin space for a limited number of SubFonts. */ + int numSubFonts; /* Length of following array. */ + SubFont *subFontArray; /* Array of SubFonts that have been loaded in + * order to draw/measure all the characters + * encountered by this font so far. All fonts + * start off with one SubFont initialized by + * AllocFont() from the original set of font + * attributes. Usually points to + * staticSubFonts, but may point to malloced + * space if there are lots of SubFonts. */ + SubFont controlSubFont; /* Font to use to display control-character + * expansions. */ + +# if 0 + Display *display; /* Display that owns font. */ + int pixelSize; /* Original pixel size used when font was + * constructed. */ + TkXLFDAttributes xa; /* Additional attributes that specify the + * preferred foundry and encoding to use when + * constructing additional SubFonts. */ + int widths[BASE_CHARS]; /* Widths of first 256 chars in the base font, + * for handling common case. */ + int underlinePos; /* Offset from baseline to origin of underline + * bar (used when drawing underlined font) + * (pixels). */ + int barHeight; /* Height of underline or overstrike bar (used + * when drawing underlined or strikeout font) + * (pixels). */ +# endif +} UnixFont; + +#elif defined(TOGL_WGL) +# include +/* From tkWinFont.c */ + +typedef struct FontFamily FontFamily; + +/* + * The following structure encapsulates an individual screen font. A font + * object is made up of however many SubFonts are necessary to display a + * stream of multilingual characters. + */ + +typedef struct SubFont +{ + char **fontMap; /* Pointer to font map from the FontFamily, + * cached here to save a dereference. */ + HFONT hFont; /* The specific screen font that will be used + * when displaying/measuring chars belonging to + * the FontFamily. */ + FontFamily *familyPtr; /* The FontFamily for this SubFont. */ +} SubFont; + +/* + * The following structure represents Windows' implementation of a font + * object. + */ + +# define SUBFONT_SPACE 3 +# define BASE_CHARS 128 + +typedef struct WinFont +{ + TkFont font; /* Stuff used by generic font package. Must be + * first in structure. */ + SubFont staticSubFonts[SUBFONT_SPACE]; + /* Builtin space for a limited number of SubFonts. */ + int numSubFonts; /* Length of following array. */ + SubFont *subFontArray; /* Array of SubFonts that have been loaded in + * order to draw/measure all the characters + * encountered by this font so far. All fonts + * start off with one SubFont initialized by + * AllocFont() from the original set of font + * attributes. Usually points to + * staticSubFonts, but may point to malloced + * space if there are lots of SubFonts. */ + + HWND hwnd; /* Toplevel window of application that owns + * this font, used for getting HDC for + * offscreen measurements. */ + int pixelSize; /* Original pixel size used when font was + * constructed. */ + int widths[BASE_CHARS]; /* Widths of first 128 chars in the base font, + * for handling common case. The base font is + * always used to draw characters between + * 0x0000 and 0x007f. */ +} WinFont; + +#elif defined(TOGL_AGL) + +typedef struct FontFamily +{ + struct FontFamily *nextPtr; /* Next in list of all known font families. */ + int refCount; /* How many SubFonts are referring to this + * FontFamily. When the refCount drops to + * zero, this FontFamily may be freed. */ + /* + * Key. + */ + + FMFontFamily faceNum; /* Unique face number key for this FontFamily. */ + + /* + * Derived properties. + */ + + Tcl_Encoding encoding; /* Encoding for this font family. */ +# if 0 + int isSymbolFont; /* Non-zero if this is a symbol family. */ + int isMultiByteFont; /* Non-zero if this is a multi-byte family. */ + char typeTable[256]; /* Table that identfies all lead bytes for a + * multi-byte family, used when measuring + * chars. If a byte is a lead byte, the value + * at the corresponding position in the + * typeTable is 1, otherwise 0. If this is a + * single-byte font, all entries are 0. */ + char *fontMap[FONTMAP_PAGES]; + /* Two-level sparse table used to determine quickly if the specified + * character exists. As characters are encountered, more pages in this + * table are dynamically added. The contents of each page is a bitmask + * consisting of FONTMAP_BITSPERPAGE bits, representing whether this font + * can be used to display the given character at the corresponding bit + * position. The high bits of the character are used to pick which page of + * the table is used. */ +# endif +} FontFamily; + +/* + * The following structure encapsulates an individual screen font. A font + * object is made up of however many SubFonts are necessary to display a + * stream of multilingual characters. + */ + +typedef struct SubFont +{ + char **fontMap; /* Pointer to font map from the FontFamily, + * cached here to save a dereference. */ + FontFamily *familyPtr; /* The FontFamily for this SubFont. */ +} SubFont; + +/* + * The following structure represents Macintosh's implementation of a font + * object. + */ + +# define SUBFONT_SPACE 3 + +typedef struct MacFont +{ + TkFont font; /* Stuff used by generic font package. Must be + * first in structure. */ + SubFont staticSubFonts[SUBFONT_SPACE]; + /* Builtin space for a limited number of SubFonts. */ + int numSubFonts; /* Length of following array. */ + SubFont *subFontArray; /* Array of SubFonts that have been loaded in + * order to draw/measure all the characters + * encountered by this font so far. All fonts + * start off with one SubFont initialized by + * AllocFont() from the original set of font + * attributes. Usually points to + * staticSubFonts, but may point to malloced + * space if there are lots of SubFonts. */ + + short size; /* Font size in pixels, constructed from font + * attributes. */ + short style; /* Style bits, constructed from font + * attributes. */ +} MacFont; +#endif + +/* + * Load the named bitmap font as a sequence of bitmaps in a display list. + * fontname may be any font recognized by Tk_GetFont. + */ +Tcl_Obj * +Togl_LoadBitmapFont(const Togl *togl, const char *fontname) +{ + Tk_Font font; + Togl_BitmapFontInfo *bfi; + Tcl_Obj *obj; + +#if defined(TOGL_X11) + UnixFont *unixfont; + XFontStruct *fontinfo; +#elif defined(TOGL_WGL) + WinFont *winfont; + HFONT oldFont; + TEXTMETRIC tm; +#elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + MacFont *macfont; +#endif + int first, last, count; + GLuint fontbase; + + if (!fontname) { + fontname = DEFAULT_FONTNAME; + } + + font = Tk_GetFont(togl->Interp, togl->TkWin, fontname); + if (!font) { + return NULL; + } +#if defined(TOGL_X11) + unixfont = (UnixFont *) font; + fontinfo = unixfont->subFontArray->fontStructPtr; + first = fontinfo->min_char_or_byte2; + last = fontinfo->max_char_or_byte2; +#elif defined(TOGL_WGL) + winfont = (WinFont *) font; + oldFont = + (HFONT) SelectObject(togl->tglGLHdc, winfont->subFontArray->hFont); + GetTextMetrics(togl->tglGLHdc, &tm); + first = tm.tmFirstChar; + last = tm.tmLastChar; +#elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) + macfont = (MacFont *) font; + first = 10; /* don't know how to determine font range on + * Mac... */ + last = 255; +#endif + + if (last > 255) + last = 255; /* no unicode support */ + + count = last - first + 1; + fontbase = glGenLists((GLuint) (last + 1)); + if (fontbase == 0) { +#ifdef TOGL_WGL + SelectObject(togl->tglGLHdc, oldFont); +#endif + Tk_FreeFont(font); + return NULL; + } +#if defined(TOGL_WGL) + wglUseFontBitmaps(togl->tglGLHdc, first, count, fontbase + first); + SelectObject(togl->tglGLHdc, oldFont); +#elif defined(TOGL_X11) + glXUseXFont(fontinfo->fid, first, count, (int) fontbase + first); +#elif defined(TOGL_AGL) + /* deprecated in OS X 10.5 */ + aglUseFont(togl->Ctx, + macfont->subFontArray->familyPtr->faceNum, + macfont->style, macfont->size, first, count, fontbase + first); +#elif defined(TOGL_NSOPENGL) + /* No NSOpenGL equivalent to aglUseFont(). */ +#endif + Tk_FreeFont(font); + + bfi = (Togl_BitmapFontInfo *) ckalloc(sizeof (Togl_BitmapFontInfo)); + bfi->base = fontbase; + bfi->first = first; + bfi->last = last; + bfi->contextTag = togl->contextTag; + + obj = Tcl_NewObj(); + SET_BITMAP_FONT_INFO(obj) = bfi; + obj->typePtr = &Togl_BitmapFontType; + + return obj; +} + +/* + * Release the display lists which were generated by Togl_LoadBitmapFont(). + */ +int +Togl_UnloadBitmapFont(const Togl *togl, Tcl_Obj *toglfont) +{ + Togl_BitmapFontInfo *bfi; + + if (toglfont == NULL || toglfont->typePtr != &Togl_BitmapFontType) { + Tcl_Interp *interp = Togl_Interp(togl); + + Tcl_AppendResult(interp, "font not found", NULL); + return TCL_ERROR; + } + bfi = BITMAP_FONT_INFO(toglfont); + glDeleteLists(bfi->base, bfi->last + 1); /* match glGenLists */ + return TCL_OK; +} + +int +Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj) +{ + const char *str; + int len; + + str = Tcl_GetStringFromObj(obj, &len); + return Togl_WriteChars(togl, toglfont, str, len); +} + +int +Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *str, + int len) +{ + /* TODO: assume utf8 encoding and convert to font encoding */ + Togl_BitmapFontInfo *bfi; + + if (toglfont == NULL || toglfont->typePtr != &Togl_BitmapFontType) + return -1; + bfi = BITMAP_FONT_INFO(toglfont); + if (Togl_ContextTag(togl) != bfi->contextTag) + return -1; + if (len == 0) + len = strlen(str); + glListBase(bfi->base); + glCallLists(len, GL_UNSIGNED_BYTE, str); + return len; +} diff --git a/ng/Togl2.1/toglGLX.c b/ng/Togl2.1/toglGLX.c new file mode 100644 index 00000000..ff2934e7 --- /dev/null +++ b/ng/Togl2.1/toglGLX.c @@ -0,0 +1,481 @@ +/* $Id: toglGLX.c,v 1.12 2009/10/22 20:40:52 gregcouch Exp $ */ + +/* vi:set sw=4 expandtab: */ + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +/* TODO: fullscreen support */ + +#undef DEBUG_GLX + +static PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig = NULL; +static PFNGLXGETFBCONFIGATTRIBPROC getFBConfigAttrib = NULL; +static PFNGLXGETVISUALFROMFBCONFIGPROC getVisualFromFBConfig = NULL; +static PFNGLXCREATEPBUFFERPROC createPbuffer = NULL; +static PFNGLXCREATEGLXPBUFFERSGIXPROC createPbufferSGIX = NULL; +static PFNGLXDESTROYPBUFFERPROC destroyPbuffer = NULL; +static PFNGLXQUERYDRAWABLEPROC queryPbuffer = NULL; +static Bool hasMultisampling = False; +static Bool hasPbuffer = False; + +struct FBInfo +{ + int acceleration; + int samples; + int depth; + int colors; + GLXFBConfig fbcfg; + XVisualInfo *visInfo; +}; +typedef struct FBInfo FBInfo; + +static int +FBInfoCmp(const void *a, const void *b) +{ + /* + * 1. full acceleration is better + * 2. greater color bits is better + * 3. greater depth bits is better + * 4. more multisampling is better + */ + const FBInfo *x = (const FBInfo *) a; + const FBInfo *y = (const FBInfo *) b; + + if (x->acceleration != y->acceleration) + return y->acceleration - x->acceleration; + if (x->colors != y->colors) + return y->colors - x->colors; + if (x->depth != y->depth) + return y->depth - x->depth; + if (x->samples != y->samples) + return y->samples - x->samples; + return 0; +} + +#ifdef DEBUG_GLX +static int +fatal_error(Display *dpy, XErrorEvent * event) +{ + char buf[256]; + + XGetErrorText(dpy, event->error_code, buf, sizeof buf); + fprintf(stderr, "%s\n", buf); + abort(); +} +#endif + +static XVisualInfo * +togl_pixelFormat(Togl *togl, int scrnum) +{ + int attribs[256]; + int na = 0; + int i; + XVisualInfo *visinfo; + FBInfo *info; + static int loadedOpenGL = False; + + if (!loadedOpenGL) { + int dummy; + int major, minor; + const char *extensions; + + /* Make sure OpenGL's GLX extension supported */ + if (!glXQueryExtension(togl->display, &dummy, &dummy)) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "X server is missing OpenGL GLX extension", + TCL_STATIC); + return NULL; + } + + loadedOpenGL = True; +#ifdef DEBUG_GLX + (void) XSetErrorHandler(fatal_error); +#endif + + glXQueryVersion(togl->display, &major, &minor); + extensions = glXQueryExtensionsString(togl->display, scrnum); + + if (major > 1 || (major == 1 && minor >= 3)) { + chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) + Togl_GetProcAddr("glXChooseFBConfig"); + getFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC) + Togl_GetProcAddr("glXGetFBConfigAttrib"); + getVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC) + Togl_GetProcAddr("glXGetVisualFromFBConfig"); + createPbuffer = (PFNGLXCREATEPBUFFERPROC) + Togl_GetProcAddr("glXCreatePbuffer"); + destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) + Togl_GetProcAddr("glXDestroyPbuffer"); + queryPbuffer = (PFNGLXQUERYDRAWABLEPROC) + Togl_GetProcAddr("glXQueryDrawable"); + if (createPbuffer && destroyPbuffer && queryPbuffer) { + hasPbuffer = True; + } else { + createPbuffer = NULL; + destroyPbuffer = NULL; + queryPbuffer = NULL; + } + } + if (major == 1 && minor == 2) { + chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) + Togl_GetProcAddr("glXChooseFBConfigSGIX"); + getFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC) + Togl_GetProcAddr("glXGetFBConfigAttribSGIX"); + getVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC) + Togl_GetProcAddr("glXGetVisualFromFBConfigSGIX"); + if (strstr(extensions, "GLX_SGIX_pbuffer") != NULL) { + createPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC) + Togl_GetProcAddr("glXCreateGLXPbufferSGIX"); + destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) + Togl_GetProcAddr("glXDestroyGLXPbufferSGIX"); + queryPbuffer = (PFNGLXQUERYDRAWABLEPROC) + Togl_GetProcAddr("glXQueryGLXPbufferSGIX"); + if (createPbufferSGIX && destroyPbuffer && queryPbuffer) { + hasPbuffer = True; + } else { + createPbufferSGIX = NULL; + destroyPbuffer = NULL; + queryPbuffer = NULL; + } + } + } + if (chooseFBConfig) { + /* verify that chooseFBConfig works (workaround Mesa 6.5 bug) */ + int n = 0; + GLXFBConfig *cfgs; + + attribs[n++] = GLX_RENDER_TYPE; + attribs[n++] = GLX_RGBA_BIT; + attribs[n++] = None; + + cfgs = chooseFBConfig(togl->display, scrnum, attribs, &n); + if (cfgs == NULL || n == 0) { + chooseFBConfig = NULL; + } + XFree(cfgs); + } + if (chooseFBConfig == NULL + || getFBConfigAttrib == NULL || getVisualFromFBConfig == NULL) { + chooseFBConfig = NULL; + getFBConfigAttrib = NULL; + getVisualFromFBConfig = NULL; + } + if (hasPbuffer && !chooseFBConfig) { + hasPbuffer = False; + } + + if ((major > 1 || (major == 1 && minor >= 4)) + || strstr(extensions, "GLX_ARB_multisample") != NULL + || strstr(extensions, "GLX_SGIS_multisample") != NULL) { + /* Client GLX supports multisampling, but does the server? Well, we + * can always ask. */ + hasMultisampling = True; + } + } + + if (togl->MultisampleFlag && !hasMultisampling) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "multisampling not supported", TCL_STATIC); + return NULL; + } + + if (togl->PbufferFlag && !hasPbuffer) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "pbuffers are not supported", TCL_STATIC); + return NULL; + } + + /* + * Only use the newer glXGetFBConfig if there's an explicit need for it + * because it is buggy on many systems: + * (1) NVidia 96.43.07 on Linux, single-buffered windows don't work + * (2) Mesa 6.5.X and earlier fail + */ + if (chooseFBConfig) { + /* have new glXGetFBConfig! */ + int count; + GLXFBConfig *cfgs; + + attribs[na++] = GLX_RENDER_TYPE; + if (togl->RgbaFlag) { + /* RGB[A] mode */ + attribs[na++] = GLX_RGBA_BIT; + attribs[na++] = GLX_RED_SIZE; + attribs[na++] = togl->RgbaRed; + attribs[na++] = GLX_GREEN_SIZE; + attribs[na++] = togl->RgbaGreen; + attribs[na++] = GLX_BLUE_SIZE; + attribs[na++] = togl->RgbaBlue; + if (togl->AlphaFlag) { + attribs[na++] = GLX_ALPHA_SIZE; + attribs[na++] = togl->AlphaSize; + } + } else { + /* Color index mode */ + attribs[na++] = GLX_COLOR_INDEX_BIT; + attribs[na++] = GLX_BUFFER_SIZE; + attribs[na++] = 1; + } + if (togl->DepthFlag) { + attribs[na++] = GLX_DEPTH_SIZE; + attribs[na++] = togl->DepthSize; + } + if (togl->DoubleFlag) { + attribs[na++] = GLX_DOUBLEBUFFER; + attribs[na++] = True; + } + if (togl->StencilFlag) { + attribs[na++] = GLX_STENCIL_SIZE; + attribs[na++] = togl->StencilSize; + } + if (togl->AccumFlag) { + attribs[na++] = GLX_ACCUM_RED_SIZE; + attribs[na++] = togl->AccumRed; + attribs[na++] = GLX_ACCUM_GREEN_SIZE; + attribs[na++] = togl->AccumGreen; + attribs[na++] = GLX_ACCUM_BLUE_SIZE; + attribs[na++] = togl->AccumBlue; + if (togl->AlphaFlag) { + attribs[na++] = GLX_ACCUM_ALPHA_SIZE; + attribs[na++] = togl->AccumAlpha; + } + } + if (togl->Stereo == TOGL_STEREO_NATIVE) { + attribs[na++] = GLX_STEREO; + attribs[na++] = True; + } + if (togl->MultisampleFlag) { + attribs[na++] = GLX_SAMPLE_BUFFERS_ARB; + attribs[na++] = 1; + attribs[na++] = GLX_SAMPLES_ARB; + attribs[na++] = 2; + } + if (togl->PbufferFlag) { + attribs[na++] = GLX_DRAWABLE_TYPE; + attribs[na++] = GLX_WINDOW_BIT | GLX_PBUFFER_BIT; + } + if (togl->AuxNumber != 0) { + attribs[na++] = GLX_AUX_BUFFERS; + attribs[na++] = togl->AuxNumber; + } + attribs[na++] = None; + + cfgs = chooseFBConfig(togl->display, scrnum, attribs, &count); + if (cfgs == NULL || count == 0) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't choose pixel format", TCL_STATIC); + return NULL; + } + /* + * Pick best format + */ + info = (FBInfo *) malloc(count * sizeof (FBInfo)); + for (i = 0; i != count; ++i) { + info[i].visInfo = getVisualFromFBConfig(togl->display, cfgs[i]); + info[i].fbcfg = cfgs[i]; + getFBConfigAttrib(togl->display, cfgs[i], GLX_CONFIG_CAVEAT, + &info[i].acceleration); + getFBConfigAttrib(togl->display, cfgs[i], GLX_BUFFER_SIZE, + &info[i].colors); + getFBConfigAttrib(togl->display, cfgs[i], GLX_DEPTH_SIZE, + &info[i].depth); + getFBConfigAttrib(togl->display, cfgs[i], GLX_SAMPLES, + &info[i].samples); + /* revise attributes so larger is better */ + info[i].acceleration = -(info[i].acceleration - GLX_NONE); + if (!togl->DepthFlag) + info[i].depth = -info[i].depth; + if (!togl->MultisampleFlag) + info[i].samples = -info[i].samples; + } + qsort(info, count, sizeof info[0], FBInfoCmp); + + togl->fbcfg = info[0].fbcfg; + visinfo = info[0].visInfo; + for (i = 1; i != count; ++i) + XFree(info[i].visInfo); + free(info); + XFree(cfgs); + return visinfo; + } + + /* use original glXChooseVisual */ + + attribs[na++] = GLX_USE_GL; + if (togl->RgbaFlag) { + /* RGB[A] mode */ + attribs[na++] = GLX_RGBA; + attribs[na++] = GLX_RED_SIZE; + attribs[na++] = togl->RgbaRed; + attribs[na++] = GLX_GREEN_SIZE; + attribs[na++] = togl->RgbaGreen; + attribs[na++] = GLX_BLUE_SIZE; + attribs[na++] = togl->RgbaBlue; + if (togl->AlphaFlag) { + attribs[na++] = GLX_ALPHA_SIZE; + attribs[na++] = togl->AlphaSize; + } + } else { + /* Color index mode */ + attribs[na++] = GLX_BUFFER_SIZE; + attribs[na++] = 1; + } + if (togl->DepthFlag) { + attribs[na++] = GLX_DEPTH_SIZE; + attribs[na++] = togl->DepthSize; + } + if (togl->DoubleFlag) { + attribs[na++] = GLX_DOUBLEBUFFER; + } + if (togl->StencilFlag) { + attribs[na++] = GLX_STENCIL_SIZE; + attribs[na++] = togl->StencilSize; + } + if (togl->AccumFlag) { + attribs[na++] = GLX_ACCUM_RED_SIZE; + attribs[na++] = togl->AccumRed; + attribs[na++] = GLX_ACCUM_GREEN_SIZE; + attribs[na++] = togl->AccumGreen; + attribs[na++] = GLX_ACCUM_BLUE_SIZE; + attribs[na++] = togl->AccumBlue; + if (togl->AlphaFlag) { + attribs[na++] = GLX_ACCUM_ALPHA_SIZE; + attribs[na++] = togl->AccumAlpha; + } + } + if (togl->Stereo == TOGL_STEREO_NATIVE) { + attribs[na++] = GLX_STEREO; + } + if (togl->AuxNumber != 0) { + attribs[na++] = GLX_AUX_BUFFERS; + attribs[na++] = togl->AuxNumber; + } + attribs[na++] = None; + + visinfo = glXChooseVisual(togl->display, scrnum, attribs); + if (visinfo == NULL) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't choose pixel format", TCL_STATIC); + return NULL; + } + return visinfo; +} + +static int +togl_describePixelFormat(Togl *togl) +{ + int tmp = 0; + + /* fill in flags normally passed in that affect behavior */ + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_RGBA, + &togl->RgbaFlag); + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_DOUBLEBUFFER, + &togl->DoubleFlag); + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_DEPTH_SIZE, &tmp); + togl->DepthFlag = (tmp != 0); + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_ACCUM_RED_SIZE, &tmp); + togl->AccumFlag = (tmp != 0); + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_ALPHA_SIZE, &tmp); + togl->AlphaFlag = (tmp != 0); + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_STENCIL_SIZE, &tmp); + togl->StencilFlag = (tmp != 0); + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_STEREO, &tmp); + togl->Stereo = tmp ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE; + if (hasMultisampling) { + (void) glXGetConfig(togl->display, togl->VisInfo, GLX_SAMPLES, &tmp); + togl->MultisampleFlag = (tmp != 0); + } + return True; +} + +static Tcl_ThreadDataKey togl_XError; +struct ErrorData +{ + int error_code; + XErrorHandler prevHandler; +}; +typedef struct ErrorData ErrorData; + +static int +togl_HandleXError(Display *dpy, XErrorEvent * event) +{ + ErrorData *data = Tcl_GetThreadData(&togl_XError, (int) sizeof (ErrorData)); + + data->error_code = event->error_code; + return 0; +} + +static void +togl_SetupXErrorHandler() +{ + ErrorData *data = Tcl_GetThreadData(&togl_XError, (int) sizeof (ErrorData)); + + data->error_code = Success; /* 0 */ + data->prevHandler = XSetErrorHandler(togl_HandleXError); +} + +static int +togl_CheckForXError(const Togl *togl) +{ + ErrorData *data = Tcl_GetThreadData(&togl_XError, (int) sizeof (ErrorData)); + + XSync(togl->display, False); + (void) XSetErrorHandler(data->prevHandler); + return data->error_code; +} + +static GLXPbuffer +togl_createPbuffer(Togl *togl) +{ + int attribs[32]; + int na = 0; + GLXPbuffer pbuf; + + togl_SetupXErrorHandler(); + if (togl->LargestPbufferFlag) { + attribs[na++] = GLX_LARGEST_PBUFFER; + attribs[na++] = True; + } + attribs[na++] = GLX_PRESERVED_CONTENTS; + attribs[na++] = True; + if (createPbuffer) { + attribs[na++] = GLX_PBUFFER_WIDTH; + attribs[na++] = togl->Width; + attribs[na++] = GLX_PBUFFER_HEIGHT; + attribs[na++] = togl->Width; + attribs[na++] = None; + pbuf = createPbuffer(togl->display, togl->fbcfg, attribs); + } else { + attribs[na++] = None; + pbuf = createPbufferSGIX(togl->display, togl->fbcfg, togl->Width, + togl->Height, attribs); + } + if (togl_CheckForXError(togl) || pbuf == None) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "unable to allocate pbuffer", TCL_STATIC); + return None; + } + if (pbuf && togl->LargestPbufferFlag) { + int tmp; + + queryPbuffer(togl->display, pbuf, GLX_WIDTH, &tmp); + if (tmp != 0) + togl->Width = tmp; + queryPbuffer(togl->display, pbuf, GLX_HEIGHT, &tmp); + if (tmp != 0) + togl->Height = tmp; + } + return pbuf; +} + +static void +togl_destroyPbuffer(Togl *togl) +{ + destroyPbuffer(togl->display, togl->pbuf); +} diff --git a/ng/Togl2.1/toglProcAddr.c b/ng/Togl2.1/toglProcAddr.c new file mode 100644 index 00000000..2e72fbea --- /dev/null +++ b/ng/Togl2.1/toglProcAddr.c @@ -0,0 +1,61 @@ +/* $Id */ + +/* vi:set sw=4: */ + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +#include "togl.h" + +#if defined(TOGL_OSMESA) || defined(TOGL_WGL) +/* nothing extra to include */ +#elif defined(__APPLE__) +# include +#else +# if !defined(TOGL_X11) || !defined(GLX_VERSION_1_4) +# include +# endif +#endif + +Togl_FuncPtr +Togl_GetProcAddr(const char *funcname) +{ +#if defined(TOGL_OSMESA) + return (Togl_FuncPtr) OSMesaGetProcAddress(funcname); +#elif defined(TOGL_WGL) + return (Togl_FuncPtr) wglGetProcAddress(funcname); +#elif defined(__APPLE__) + char buf[256]; + + snprintf(buf, sizeof buf - 1, "_%s", funcname); + buf[sizeof buf - 1] = '\0'; + if (NSIsSymbolNameDefined(buf)) { + NSSymbol nssym; + + nssym = NSLookupAndBindSymbol(buf); + if (nssym) + return (Togl_FuncPtr) NSAddressOfSymbol(nssym); + } + return NULL; +#else +# if defined(TOGL_X11) && defined(GLX_VERSION_1_4) + /* Strictly speaking, we can only call glXGetProcAddress if glXQueryVersion + * says we're using version 1.4 or later. */ + return (Togl_FuncPtr) glXGetProcAddress(funcname); +# else + /* Linux, IRIX, OSF/1, ? */ + static void *dlHandle = NULL; + + if (dlHandle == NULL) + dlHandle = dlopen(NULL, RTLD_LAZY); + /* Strictly speaking, the following cast of a data pointer to a function + * pointer is not legal in ISO C, but we don't have any choice. */ + return (Togl_FuncPtr) dlsym(dlHandle, funcname); +# endif +#endif +} diff --git a/ng/Togl2.1/toglStubInit.c b/ng/Togl2.1/toglStubInit.c new file mode 100755 index 00000000..2f858596 --- /dev/null +++ b/ng/Togl2.1/toglStubInit.c @@ -0,0 +1,69 @@ +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +#include "togl.h" + +extern const ToglStubs toglStubs; + +/* !BEGIN!: Do not edit below this line. */ + +const ToglStubs toglStubs = { + TCL_STUB_MAGIC, + NULL, + Togl_Init, /* 0 */ + Togl_MakeCurrent, /* 1 */ + Togl_PostRedisplay, /* 2 */ + Togl_SwapBuffers, /* 3 */ + Togl_Ident, /* 4 */ + Togl_Width, /* 5 */ + Togl_Height, /* 6 */ + Togl_Interp, /* 7 */ + Togl_TkWin, /* 8 */ + Togl_CommandName, /* 9 */ + Togl_AllocColor, /* 10 */ + Togl_FreeColor, /* 11 */ + Togl_SetColor, /* 12 */ + Togl_LoadBitmapFont, /* 13 */ + Togl_UnloadBitmapFont, /* 14 */ + Togl_UseLayer, /* 15 */ + Togl_ShowOverlay, /* 16 */ + Togl_HideOverlay, /* 17 */ + Togl_PostOverlayRedisplay, /* 18 */ + Togl_ExistsOverlay, /* 19 */ + Togl_GetOverlayTransparentValue, /* 20 */ + Togl_IsMappedOverlay, /* 21 */ + Togl_AllocColorOverlay, /* 22 */ + Togl_FreeColorOverlay, /* 23 */ + Togl_GetClientData, /* 24 */ + Togl_SetClientData, /* 25 */ + Togl_DrawBuffer, /* 26 */ + Togl_Clear, /* 27 */ + Togl_Frustum, /* 28 */ + Togl_GetToglFromObj, /* 29 */ + Togl_TakePhoto, /* 30 */ + Togl_GetProcAddr, /* 31 */ + Togl_GetToglFromName, /* 32 */ + Togl_SwapInterval, /* 33 */ + Togl_Ortho, /* 34 */ + Togl_NumEyes, /* 35 */ + Togl_ContextTag, /* 36 */ + Togl_UpdatePending, /* 37 */ + Togl_WriteObj, /* 38 */ + Togl_WriteChars, /* 39 */ + Togl_HasRGBA, /* 40 */ + Togl_IsDoubleBuffered, /* 41 */ + Togl_HasDepthBuffer, /* 42 */ + Togl_HasAccumulationBuffer, /* 43 */ + Togl_HasDestinationAlpha, /* 44 */ + Togl_HasStencilBuffer, /* 45 */ + Togl_StereoMode, /* 46 */ + Togl_HasMultisample, /* 47 */ + Togl_CopyContext, /* 48 */ +}; + +/* !END!: Do not edit above this line. */ diff --git a/ng/Togl2.1/toglStubLib.c b/ng/Togl2.1/toglStubLib.c new file mode 100644 index 00000000..7f72d02b --- /dev/null +++ b/ng/Togl2.1/toglStubLib.c @@ -0,0 +1,59 @@ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif +#undef USE_TCL_STUB_PROCS +#ifndef USE_TK_STUBS +# define USE_TK_STUBS +#endif +#undef USE_TK_STUB_PROCS + +#include "togl.h" + +const ToglStubs *toglStubsPtr; + +/* + ** Ensure that Togl_InitStubs is built as an exported symbol. The other stub + ** functions should be built as non-exported symbols. + */ +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + +/* + * Togl_InitStubs -- + * + * Checks that the correct version of Togl is loaded and that it + * supports stubs. It then initialises the stub table pointers. + * + * Results: + * The actual version of Togl that satisfies the request, or + * NULL to indicate that an error occurred. + * + * Side effects: + * sets the stub table pointer. + * + */ + +#ifdef Togl_InitStubs +# undef Togl_InitStubs +#endif + +const char * +Togl_InitStubs(Tcl_Interp *interp, const char *version, int exact) +{ + const char *actualVersion; + + actualVersion = Tcl_PkgRequireEx(interp, "Togl", version, exact, + (ClientData *) &toglStubsPtr); + if (!actualVersion) { + return NULL; + } + + if (!toglStubsPtr) { + Tcl_SetResult(interp, + "This implementation of Togl does not support stubs", + TCL_STATIC); + return NULL; + } + + return actualVersion; +} diff --git a/ng/Togl2.1/toglWGL.c b/ng/Togl2.1/toglWGL.c new file mode 100644 index 00000000..ed2c0ab2 --- /dev/null +++ b/ng/Togl2.1/toglWGL.c @@ -0,0 +1,595 @@ +/* $Id: toglWGL.c,v 1.8 2009/12/23 21:50:49 gregcouch Exp $ */ + +/* vi:set sw=4 expandtab: */ + +/* + * Togl - a Tk OpenGL widget + * + * Copyright (C) 1996-2002 Brian Paul and Ben Bederson + * Copyright (C) 2005-2009 Greg Couch + * See the LICENSE file for copyright details. + */ + +/* TODO: fullscreen support */ + +#include +#include +#include +#include +#include +#include + +#ifndef PFD_SUPPORT_COMPOSITION +/* for Vista -- not needed because we don't use PFD_SUPPORT_GDI/BITMAP */ +# define PFD_SUPPORT_COMPOSITION 0x00008000 +#endif + +/* TODO: move these statics into global structure */ +static PFNWGLGETEXTENSIONSSTRINGARBPROC getExtensionsString = NULL; +static PFNWGLCHOOSEPIXELFORMATARBPROC choosePixelFormat; +static PFNWGLGETPIXELFORMATATTRIBIVARBPROC getPixelFormatAttribiv; +static PFNWGLCREATEPBUFFERARBPROC createPbuffer = NULL; +static PFNWGLDESTROYPBUFFERARBPROC destroyPbuffer = NULL; +static PFNWGLGETPBUFFERDCARBPROC getPbufferDC = NULL; +static PFNWGLRELEASEPBUFFERDCARBPROC releasePbufferDC = NULL; +static PFNWGLQUERYPBUFFERARBPROC queryPbuffer = NULL; +static int hasMultisampling = FALSE; +static int hasPbuffer = FALSE; +static int hasARBPbuffer = FALSE; + +static HWND +toglCreateTestWindow(HWND parent) +{ + static char ClassName[] = "ToglTestWindow"; + WNDCLASS wc; + HINSTANCE instance = GetModuleHandle(NULL); + HWND wnd; + HDC dc; + PIXELFORMATDESCRIPTOR pfd; + int pixelFormat; + + wc.style = CS_OWNDC; + wc.lpfnWndProc = DefWindowProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = instance; + wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = NULL; + wc.lpszMenuName = NULL; + wc.lpszClassName = ClassName; + if (!RegisterClass(&wc)) { + DWORD err = GetLastError(); + + if (err != ERROR_CLASS_ALREADY_EXISTS) { + fprintf(stderr, "Unable to register Togl Test Window class\n"); + return NULL; + } + } + + wnd = CreateWindow(ClassName, "test OpenGL capabilities", + WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, + 0, 0, 1, 1, parent, NULL, instance, NULL); + if (wnd == NULL) { + fprintf(stderr, "Unable to create temporary OpenGL window\n"); + return NULL; + } + dc = GetDC(wnd); + + memset(&pfd, 0, sizeof pfd); + pfd.nSize = sizeof pfd; + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.cColorBits = 3; + pfd.iLayerType = PFD_MAIN_PLANE; + pixelFormat = ChoosePixelFormat(dc, &pfd); + if (pixelFormat == 0) { + fprintf(stderr, "Unable to choose simple pixel format\n"); + ReleaseDC(wnd, dc); + return NULL; + } + if (!SetPixelFormat(dc, pixelFormat, &pfd)) { + fprintf(stderr, "Unable to set simple pixel format\n"); + ReleaseDC(wnd, dc); + return NULL; + } + + ShowWindow(wnd, SW_HIDE); // make sure it's hidden + ReleaseDC(wnd, dc); + return wnd; +} + +struct FBInfo +{ + int stereo; + int acceleration; + int colors; + int depth; + int samples; + int pixelFormat; +}; +typedef struct FBInfo FBInfo; +static int FBAttribs[] = { + /* must match order in FBInfo structure */ + WGL_STEREO_ARB, + WGL_ACCELERATION_ARB, + WGL_COLOR_BITS_ARB, + WGL_DEPTH_BITS_ARB, + WGL_SAMPLES_ARB, +}; + +#define NUM_FBAttribs (sizeof FBAttribs / sizeof FBAttribs[0]) + +static int +FBInfoCmp(const void *a, const void *b) +{ + /* + * 1. stereo is better + * 2. full acceleration is better + * 3. greater color bits is better + * 4. greater depth bits is better + * 5. more multisampling is better + */ + const FBInfo *x = (const FBInfo *) a; + const FBInfo *y = (const FBInfo *) b; + + if (x->stereo != y->stereo) + return y->stereo - x->stereo; + if (x->acceleration != y->acceleration) + return y->acceleration - x->acceleration; + if (x->colors != y->colors) + return y->colors - x->colors; + if (x->depth != y->depth) + return y->depth - x->depth; + if (x->samples != y->samples) + return y->samples - x->samples; + return 0; +} + +static int +togl_pixelFormat(Togl *togl, HWND hwnd) +{ + /* return 0 when pixel format is unavailable. */ + int pixelformat = 0; + static int loadedOpenGL = FALSE; + int formats[256]; + UINT numFormats; + FBInfo *info; + UINT i; + int attribs[128]; + int na = 0; + + if (!loadedOpenGL) { + HWND test = NULL; + HDC dc; + HGLRC rc; + + if (wglGetCurrentContext() != NULL) { + dc = wglGetCurrentDC(); + } else { + /* HWND hwnd = Tk_GetHWND(Tk_WindowId(togl->TkWin)); */ + + test = toglCreateTestWindow(hwnd); + if (test == NULL) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "can't create dummy OpenGL window", + TCL_STATIC); + return 0; + } + + dc = GetDC(test); + rc = wglCreateContext(dc); + wglMakeCurrent(dc, rc); + } + loadedOpenGL = TRUE; + + /* + * Now that we have an OpenGL window, we can initialize all + * OpenGL information and figure out if multisampling is supported. + */ + getExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC) + wglGetProcAddress("wglGetExtensionsStringARB"); + if (getExtensionsString == NULL) + getExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC) + wglGetProcAddress("wglGetExtensionsStringEXT"); + if (getExtensionsString) { + const char *extensions = getExtensionsString(dc); + + if (strstr(extensions, "WGL_ARB_multisample") != NULL + || strstr(extensions, "WGL_EXT_multisample") != NULL) + hasMultisampling = TRUE; + + if (strstr(extensions, "WGL_ARB_pixel_format") != NULL) { + choosePixelFormat = (PFNWGLCHOOSEPIXELFORMATARBPROC) + wglGetProcAddress("wglChoosePixelFormatARB"); + getPixelFormatAttribiv = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC) + wglGetProcAddress("wglGetPixelFormatAttribivARB"); + if (choosePixelFormat == NULL || getPixelFormatAttribiv == NULL) { + choosePixelFormat = NULL; + getPixelFormatAttribiv = NULL; + } + } + if (choosePixelFormat == NULL + && strstr(extensions, "WGL_EXT_pixel_format") != NULL) { + choosePixelFormat = (PFNWGLCHOOSEPIXELFORMATARBPROC) + wglGetProcAddress("wglChoosePixelFormatEXT"); + getPixelFormatAttribiv = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC) + wglGetProcAddress("wglGetPixelFormatAttribivEXT"); + if (choosePixelFormat == NULL || getPixelFormatAttribiv == NULL) { + choosePixelFormat = NULL; + getPixelFormatAttribiv = NULL; + } + } + if (createPbuffer == NULL + && strstr(extensions, "WGL_ARB_pbuffer") != NULL) { + createPbuffer = (PFNWGLCREATEPBUFFERARBPROC) + wglGetProcAddress("wglCreatePbufferARB"); + destroyPbuffer = (PFNWGLDESTROYPBUFFERARBPROC) + wglGetProcAddress("wglDestroyPbufferARB"); + getPbufferDC = (PFNWGLGETPBUFFERDCARBPROC) + wglGetProcAddress("wglGetPbufferDCARB"); + releasePbufferDC = (PFNWGLRELEASEPBUFFERDCARBPROC) + wglGetProcAddress("wglReleasePbufferDCARB"); + queryPbuffer = (PFNWGLQUERYPBUFFERARBPROC) + wglGetProcAddress("wglQueryPbufferARB"); + if (createPbuffer == NULL || destroyPbuffer == NULL + || getPbufferDC == NULL || releasePbufferDC == NULL + || queryPbuffer == NULL) { + createPbuffer = NULL; + destroyPbuffer = NULL; + getPbufferDC = NULL; + releasePbufferDC = NULL; + queryPbuffer = NULL; + } else { + hasPbuffer = TRUE; + hasARBPbuffer = TRUE; + } + } + if (createPbuffer == NULL + && strstr(extensions, "WGL_EXT_pbuffer") != NULL) { + createPbuffer = (PFNWGLCREATEPBUFFERARBPROC) + wglGetProcAddress("wglCreatePbufferEXT"); + destroyPbuffer = (PFNWGLDESTROYPBUFFERARBPROC) + wglGetProcAddress("wglDestroyPbufferEXT"); + getPbufferDC = (PFNWGLGETPBUFFERDCARBPROC) + wglGetProcAddress("wglGetPbufferDCEXT"); + releasePbufferDC = (PFNWGLRELEASEPBUFFERDCARBPROC) + wglGetProcAddress("wglReleasePbufferDCEXT"); + queryPbuffer = (PFNWGLQUERYPBUFFERARBPROC) + wglGetProcAddress("wglQueryPbufferEXT"); + if (createPbuffer == NULL || destroyPbuffer == NULL + || getPbufferDC == NULL || releasePbufferDC == NULL + || queryPbuffer == NULL) { + createPbuffer = NULL; + destroyPbuffer = NULL; + getPbufferDC = NULL; + releasePbufferDC = NULL; + queryPbuffer = NULL; + } else { + hasPbuffer = TRUE; + } + } + } + + /* No need to confirm multisampling is in glGetString(GL_EXTENSIONS) + * because OpenGL driver is local */ + + if (test != NULL) { + /* cleanup by removing temporary OpenGL window */ + wglMakeCurrent(NULL, NULL); + wglDeleteContext(rc); + ReleaseDC(test, dc); + DestroyWindow(test); + } + } + + if (togl->MultisampleFlag && !hasMultisampling) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "multisampling not supported", TCL_STATIC); + return 0; + } + + if (togl->PbufferFlag && !hasPbuffer) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "pbuffers are not supported", TCL_STATIC); + return 0; + } + + if (choosePixelFormat == NULL) { + PIXELFORMATDESCRIPTOR pfd; + + /* Don't have the great wglChoosePixelFormatARB() function, so do it + * the old way. */ + if (togl->MultisampleFlag) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "multisampling not supported", TCL_STATIC); + return 0; + } + + memset(&pfd, 0, sizeof pfd); + pfd.nSize = sizeof pfd; + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL + | PFD_SUPPORT_COMPOSITION; + if (togl->DoubleFlag) { + pfd.dwFlags |= PFD_DOUBLEBUFFER; + } + if (togl->Stereo == TOGL_STEREO_NATIVE) { + pfd.dwFlags |= PFD_STEREO; + } + pfd.iPixelType = togl->RgbaFlag ? PFD_TYPE_RGBA : PFD_TYPE_COLORINDEX; + pfd.cColorBits = togl->RgbaRed + togl->RgbaGreen + togl->RgbaBlue; + /* Alpha bitplanes are not supported in the current generic OpenGL + * implementation, but may be supported by specific hardware devices. */ + pfd.cAlphaBits = togl->AlphaFlag ? togl->AlphaSize : 0; + pfd.cAccumBits = togl->AccumFlag ? (togl->AccumRed + togl->AccumGreen + + togl->AccumBlue + togl->AccumAlpha) : 0; + pfd.cDepthBits = togl->DepthFlag ? togl->DepthSize : 0; + pfd.cStencilBits = togl->StencilFlag ? togl->StencilSize : 0; + /* Auxiliary buffers are not supported in the current generic OpenGL + * implementation, but may be supported by specific hardware devices. */ + pfd.cAuxBuffers = togl->AuxNumber; + pfd.iLayerType = PFD_MAIN_PLANE; + + if ((pixelformat = ChoosePixelFormat(togl->tglGLHdc, &pfd)) == 0) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't choose pixel format", TCL_STATIC); + return 0; + } + + /* double check that we got the stereo format we requested */ + if (togl->Stereo == TOGL_STEREO_NATIVE) { + DescribePixelFormat(togl->tglGLHdc, pixelformat, sizeof (pfd), + &pfd); + if ((pfd.dwFlags & PFD_STEREO) == 0) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't choose stereo pixel format", + TCL_STATIC); + return 0; + } + } + return pixelformat; + } + // We have the new wglChoosePixelFormat!! + if (togl->MultisampleFlag && !hasMultisampling) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "multisampling not supported", TCL_STATIC); + return 0; + } + + if (togl->PbufferFlag) + attribs[na++] = WGL_DRAW_TO_PBUFFER_ARB; + else + attribs[na++] = WGL_DRAW_TO_WINDOW_ARB; + attribs[na++] = GL_TRUE; + attribs[na++] = WGL_SUPPORT_OPENGL_ARB; + attribs[na++] = GL_TRUE; + attribs[na++] = WGL_PIXEL_TYPE_ARB; + if (!togl->RgbaFlag) { + attribs[na++] = WGL_TYPE_COLORINDEX_ARB; + } else { + attribs[na++] = WGL_TYPE_RGBA_ARB; + attribs[na++] = WGL_RED_BITS_ARB; + attribs[na++] = togl->RgbaRed; + attribs[na++] = WGL_GREEN_BITS_ARB; + attribs[na++] = togl->RgbaGreen; + attribs[na++] = WGL_BLUE_BITS_ARB; + attribs[na++] = togl->RgbaBlue; + if (togl->AlphaFlag) { + attribs[na++] = WGL_ALPHA_BITS_ARB; + attribs[na++] = togl->AlphaSize; + } + } + if (togl->DepthFlag) { + attribs[na++] = WGL_DEPTH_BITS_ARB; + attribs[na++] = togl->DepthSize; + } + if (togl->DoubleFlag) { + attribs[na++] = WGL_DOUBLE_BUFFER_ARB; + attribs[na++] = GL_TRUE; + } + if (togl->StencilFlag) { + attribs[na++] = WGL_STENCIL_BITS_ARB; + attribs[na++] = togl->StencilSize; + } + if (togl->AccumFlag) { + attribs[na++] = WGL_ACCUM_RED_BITS_ARB; + attribs[na++] = togl->AccumRed; + attribs[na++] = WGL_ACCUM_GREEN_BITS_ARB; + attribs[na++] = togl->AccumGreen; + attribs[na++] = WGL_ACCUM_BLUE_BITS_ARB; + attribs[na++] = togl->AccumBlue; + if (togl->AlphaFlag) { + attribs[na++] = WGL_ACCUM_ALPHA_BITS_ARB; + attribs[na++] = togl->AccumAlpha; + } + } + if (togl->Stereo == TOGL_STEREO_NATIVE) { + attribs[na++] = WGL_STEREO_ARB; + attribs[na++] = GL_TRUE; + } + if (togl->MultisampleFlag) { + attribs[na++] = WGL_SAMPLE_BUFFERS_ARB; + attribs[na++] = 1; + attribs[na++] = WGL_SAMPLES_ARB; + attribs[na++] = 2; + } + if (togl->AuxNumber) { + attribs[na++] = WGL_AUX_BUFFERS_ARB; + attribs[na++] = togl->AuxNumber; + } + attribs[na++] = 0; // must be last + + if (!choosePixelFormat(togl->tglGLHdc, &attribs[0], NULL, 256, formats, + &numFormats) || numFormats == 0) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't choose pixel format", TCL_STATIC); + return 0; + } + + /* + * Pick best format + */ + info = (FBInfo *) malloc(numFormats * sizeof (FBInfo)); + for (i = 0; i != numFormats; ++i) { + info[i].pixelFormat = formats[i]; + getPixelFormatAttribiv(togl->tglGLHdc, formats[i], 0, + NUM_FBAttribs, FBAttribs, &info[i].stereo); + /* revise attributes so larger is better */ + if (!togl->DepthFlag) + info[i].depth = -info[i].depth; + if (!togl->MultisampleFlag) + info[i].samples = -info[i].samples; + if (togl->Stereo != TOGL_STEREO_NATIVE) + info[i].stereo = -info[i].stereo; + } + qsort(info, numFormats, sizeof info[0], FBInfoCmp); + pixelformat = info[0].pixelFormat; + /* double check that we got the stereo format we requested */ + if (togl->Stereo == TOGL_STEREO_NATIVE && !info[0].stereo) { + Tcl_SetResult(togl->Interp, + TCL_STUPID "couldn't choose stereo pixel format", TCL_STATIC); + free(info); + return 0; + } + free(info); + return pixelformat; +} + +static int +togl_describePixelFormat(Togl *togl) +{ + if (getPixelFormatAttribiv == NULL) { + PIXELFORMATDESCRIPTOR pfd; + + DescribePixelFormat(togl->tglGLHdc, (int) togl->PixelFormat, + sizeof (pfd), &pfd); + /* fill in flags normally passed in that affect behavior */ + togl->RgbaFlag = pfd.iPixelType == PFD_TYPE_RGBA; + togl->DoubleFlag = (pfd.dwFlags & PFD_DOUBLEBUFFER) != 0; + togl->DepthFlag = (pfd.cDepthBits != 0); + togl->AccumFlag = (pfd.cAccumBits != 0); + togl->AlphaFlag = (pfd.cAlphaBits != 0); + togl->StencilFlag = (pfd.cStencilBits != 0); + if ((pfd.dwFlags & PFD_STEREO) != 0) + togl->Stereo = TOGL_STEREO_NATIVE; + else + togl->Stereo = TOGL_STEREO_NONE; + } else { + static int attribs[] = { + WGL_PIXEL_TYPE_ARB, + WGL_DOUBLE_BUFFER_ARB, + WGL_DEPTH_BITS_ARB, + WGL_ACCUM_RED_BITS_ARB, + WGL_ALPHA_BITS_ARB, + WGL_STENCIL_BITS_ARB, + WGL_STEREO_ARB, + WGL_SAMPLES_ARB + }; +#define NUM_ATTRIBS (sizeof attribs / sizeof attribs[0]) + int info[NUM_ATTRIBS]; + + getPixelFormatAttribiv(togl->tglGLHdc, (int) togl->PixelFormat, 0, + NUM_ATTRIBS, attribs, info); +#undef NUM_ATTRIBS + togl->RgbaFlag = info[0]; + togl->DoubleFlag = info[1]; + togl->DepthFlag = (info[2] != 0); + togl->AccumFlag = (info[3] != 0); + togl->AlphaFlag = (info[4] != 0); + togl->StencilFlag = (info[5] != 0); + togl->Stereo = info[6] ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE; + togl->MultisampleFlag = (info[7] != 0); + } + return True; +} + +static HPBUFFERARB +togl_createPbuffer(Togl *togl) +{ + int attribs[32]; + int na = 0; + HPBUFFERARB pbuf; + + if (togl->LargestPbufferFlag) { + attribs[na++] = WGL_PBUFFER_LARGEST_ARB; + attribs[na++] = 1; + } + attribs[na] = 0; + pbuf = createPbuffer(togl->tglGLHdc, (int) togl->PixelFormat, togl->Width, + togl->Height, attribs); + if (pbuf && togl->LargestPbufferFlag) { + queryPbuffer(pbuf, WGL_PBUFFER_WIDTH_ARB, &togl->Width); + queryPbuffer(pbuf, WGL_PBUFFER_HEIGHT_ARB, &togl->Height); + } + return pbuf; +} + +static void +togl_destroyPbuffer(Togl *togl) +{ + destroyPbuffer(togl->pbuf); +} + +#if 0 +// From nvidia.com + +Multisampling requires WGL_ARB_extension_string and WGL_ARB_pixel_format +wglGetProcAddress("wglGetExtensionsStringARB") +// From msdn.microsoft.com, various ways to enumerate PixelFormats + void CPixForm::OnClickedLastPfd() +{ + COpenGL gl; + PIXELFORMATDESCRIPTOR pfd; + + // + // Get the hwnd of the view window. + // + HWND hwndview = GetViewHwnd(); + + // + // Get a DC associated with the view window. + // + HDC dc =::GetDC(hwndview); + int nID = (m_nNextID > 1) ? m_nNextID-- : 1; + + // + // Get a description of the pixel format. If it is valid, then go and + // update the controls in the dialog box, otherwise do nothing. + // + if (gl.DescribePixelFormat(dc, nID, sizeof (PIXELFORMATDESCRIPTOR), &pfd)) + UpdateDlg(&pfd); + // + // Release the DC. + // + ::ReleaseDC(hwndview, dc); +} + +---------------------- + // local variables +int iMax; +PIXELFORMATDESCRIPTOR pfd; +int iPixelFormat; + +// initialize a pixel format index variable +iPixelFormat = 1; + +// keep obtaining and examining pixel format data... +do { + // try to obtain some pixel format data + iMax = DescribePixelFormat(dc, iPixelFormat, sizeof (pfd), &pfd); + + // if there was some problem with that... + if (iMax == 0) + // return indicating failure + return (FALSE); + + // we have successfully obtained pixel format data + + // let's examine the pixel format data... + myPixelFormatExaminer(&pfd); +} +// ...until we've looked at all the device context's pixel formats +while (++iPixelFormat <= iMax); +#endif diff --git a/ng/Togl2.1/togl_ws.h.in b/ng/Togl2.1/togl_ws.h.in new file mode 100644 index 00000000..3a01a9c3 --- /dev/null +++ b/ng/Togl2.1/togl_ws.h.in @@ -0,0 +1,7 @@ +#ifndef TOGL_WS_H +# define TOGL_WS_H + +/* define windowing system togl is compiled with */ +# define @TOGL_WINDOWINGSYSTEM@ + +#endif diff --git a/ng/Togl2.1/toglpy.h b/ng/Togl2.1/toglpy.h new file mode 100644 index 00000000..4b964c46 --- /dev/null +++ b/ng/Togl2.1/toglpy.h @@ -0,0 +1,81 @@ +/* + * getToglFromWidget: + * + * Given a Python widget, get the corresponding Togl pointer. + * and should be included before this. If included into a C file, + * there should be a static keyword just before the include. + * + * There should be one copy of getToglFromWidget per-shared libary so that + * the library's Tcl/Tk/Togl stub pointers are properly initialized. + * + * Copyright (C) 2006 Greg Couch + * See the LICENSE file for copyright details. + */ + +Togl * +getToglFromWidget(PyObject *widget) +{ + PyObject *cmdNameObj, *tk, *interpAddr; + const char *cmdName; + Tcl_Interp *interp; + Togl *curTogl; + +#ifdef USE_TOGL_STUBS + static int didOnce = 0; +#endif + + /* Python: cmdName = widget._w */ + /* Python: interpAddr = widget.tk.interpaddr() */ + cmdNameObj = PyObject_GetAttrString(widget, "_w"); + tk = PyObject_GetAttrString(widget, "tk"); + if (cmdNameObj == NULL || !PyString_Check(cmdNameObj) || tk == NULL) { + Py_XDECREF(cmdNameObj); + Py_XDECREF(tk); +#ifdef __cplusplus + throw std::invalid_argument("not a Tk widget"); +#else + return NULL; +#endif + } + + interpAddr = PyEval_CallMethod(tk, "interpaddr", "()"); + if (interpAddr == NULL || !PyInt_Check(interpAddr)) { + Py_DECREF(cmdNameObj); + Py_DECREF(tk); + Py_XDECREF(interpAddr); +#ifdef __cplusplus + throw std::invalid_argument("not a Tk widget"); +#else + return NULL; +#endif + } + + cmdName = PyString_AsString(cmdNameObj); + interp = (Tcl_Interp *) PyInt_AsLong(interpAddr); + +#ifdef USE_TOGL_STUBS + if (!didOnce) { + /* make sure stubs are initialized before calling a Togl function. */ + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL + || Tk_InitStubs(interp, TK_VERSION, 0) == NULL + || Togl_InitStubs(interp, TOGL_VERSION, 0) == NULL) +# ifdef __cplusplus + throw std::runtime_error("unable to initialize Togl"); +# else + return NULL; +# endif + didOnce = 1; + } +#endif + + if (Togl_GetToglFromName(interp, cmdName, &curTogl) != TCL_OK) + curTogl = NULL; + Py_DECREF(cmdNameObj); + Py_DECREF(tk); + Py_DECREF(interpAddr); +#ifdef __cplusplus + if (curTogl == NULL) + throw std::invalid_argument("not a Togl widget"); +#endif + return curTogl; +} diff --git a/ng/Togl2.1/tree2.rgba b/ng/Togl2.1/tree2.rgba new file mode 100644 index 0000000000000000000000000000000000000000..67b02799cf5bd4d3bdebac754e57bb1abf30560a GIT binary patch literal 66048 zcmeFa-;3MWzAxC9nU{t<FI&ERis3W8kT0{p)P`Jd!u zP88)LzytnYo%^4BQjmpWQRaos41?dk!T$`xro1iioXkT2{_M_Q=aiQ>x3_sn;ol0r z3i;32FaLEY{s2mjlexk+$5ZovaO1CZlG~EGEnbibe(pDbxwiI^O7F_twosHswEtfo z{;gZNk5vlISKuYNBy;k|9{mUv>rbxO_fe__3!xkpWrYH#Z7AzrD4!qHbejEw{0L>+bsPwVUuvxm=Kbw5AVk+`1jM zrEM^lF91B1Pj0Q>eg6pPBGPW>OPiY;`NHPLw!+}w)#dyrpX7_>%4U8&pI^_d-ysxk z-@a9IdTME_AbdogZ&A6kUKEaIc0+{2s)wg>8HTu);f5(RVLI5c}^(i zH@PkP<2IT(UEA6&sDYtYOV#yOVo7ptjpr*=(^mOC5#Ku^(6{d1y>+*?wXLH=i9F9q zs>E0z30s@_TtSeulq(d3@|}(Cjl2x#TVgT4vBl@Nd2X|?RVZv0>wF=X&kLm@FBDC~ z^TchnT;@4y$b6xAE0@=u?}26)Zr!@OVO#06QQ8)zl33t4P%p3-Io(i!M}ZSS#pWh7 zp0JtAQOhZYD*V{ZN6C4@CLvYIEe@0k|+br76?S`D1`z(@`AXX-@w1ZCaw_t?ZU<; zy8{fsC!(0>03JBZ1Hat5S}7Lu>vz`kRYTa$U-d`=FYwc4qNyS;3MEl6MbyVb1b{j~ z0q*AJR$*f!ms?+7XE@|@xW|sN51^SLN2d%PJ~%PYi*$m53e+kG_@#}zwUTLR&_xrvuiEbU+0sd;xt@5Clz^U^)>01-t(?lt2ThSQS=JUJ^fq z&CVE7EAFpQDo`)W*v{%eHQAl3>Q;ymGdLj+n?VqGv;y=y!7mBB7lHC#=i)6^Sq{&x zAgrppKD&mWH3$HrQhE=(WkA`J@4>SpFdw{vI;GYJ2Y8M_m&?KFNo*=wM(yf#`T|`y zA<`wrWV#4eL*0=`ux5bTf!@KzRZC>=Q62OaeSl~*FPM+c&5NoCEHe0t9$bzi6Y@v3 zvlrPU)_|7KTSfPEsVuEo-_D-(KN!burJ$=-eD{ zm;%UGL!fjE2(5iqY#vTJ!Oa8y~*1meOKtn3yE z0xN_%#&HL#Rgl4W(Q*_}%fCmU-b#Q*g};VRa+=HWj(8=2MC_`eGrD195GDmZ^ljZz zNch3nn{99np3s4KLP_DTz{^e?doqSPpa7_%NJfWeRHO=FOvGmlfRcACiDU{R+BMmP z1OetbIx1+UB*>)NfibxIfd~)+1RDiMG#XMjD5y|8iXxRtlAf6!0s7CNtkWzEHN!lT$@D=7XTb5M zNHtLhT@}!s@m0`a+6oZBQcYDQp`=WM$z^OSwSjK~zQzE8O`Jxf1Tjoe;?xAK8P(j1 z1B4_x1+gce7fl0g2MHz^bR{Qf^iAx*2`VA*tdN=le6)J8WUG+AfMEf6q^k`@23QQiRc$H4=MQ@nen87nH=Fj<1Fx8f#Yq06j|_S?5In%1h8@fU<&_ zaf&gFUBVqAUvS7uge}D@2F7~5-|+!|+;D#va>y= zK;tD72WoKoqk>L{3bJD+dZd>~Pvo~S59DO1K7rT6sMV}M0~dw#bW#?|?Gz#bdh%p4 zL*p=c;UR9Qh``eU{&>ZLDx$*BW2~VQlofnXD4;je74{0wIZ>9Ve`2bV=SxiU?s)r8 zov~Id7Pt9fN0N-dZ~!0mWvD};@C8j~m5>%;c;HO2WKf)Ex|gsd)-z->1B{-}7bH_% z^+fhsK{n0RWUf%ajEpM?V$}+r{&O8_;Q7U#Eg8BjT-%bP`)UCqn3 zPVLR060GbbmlO1Cvcj%GHPF*2q!G~Jb;l&(BG!yliQC$ijjC&mTCe~_`PEm|ZFDgn z5`x}N>WBE2D;Gn0x^WA;7*M9S$aP1SOy2c%q-+ zp}@LOvJ-Z1b(P_RWnxUkXlTk~8cFk7u`JfRsw^f4TCpUyUS7VXAxX77j#EhG1r}sR z)(f1@#3%!uF@aN=K?nl|CLBSLWQIUql(PeXTnRtJl4!<%s5a={0$=7!+l8%?QXMI1 z`cmaVt0*5|F6;_T0cDlrEgfvqEevEL^r>}a5CerwqE?j~p-#pIu3ioK1$l)lV}6Dc zs9>rD>Id3~}>GC#LteAR9mZWV-S4(!ws#NcNRqQ&u z^J%*-C|E6ln!xO!p!rSxO67|}hCm+1JzCj9KSu2sY^Y{gCtZU=AP6b}y`HnMM=;$& z!((a#@`X|ZJ+91GL|v)7gI&3HFfN|8op#!-bB?20A}2cv`a}?np!HdGZ2f>xAOR}y z4n|_oM)NXUGkh%8fJ$QSiVc8&J!QyfhY3kYVg*D(o7d}_;Hb{7rQYvZtwmI-p6oWN zW|-Fk*;6<^F~BPWlLPiLD9!XCprL_e$cIe)6%`sPbEuIGEHrX*S*ItKGsIa-5bvSU zNhNP?ZHpyQsniXzTv4pVEZ1v}wp*<|Jg!w0gA>MSs47}y6fowRG#6nFnFk|CwNOpG zESf6rQ}=*r1FC37#TOKey_n9j*%NVtnjyoV2!{saaSwdiE@Hi`qKcyA#y~`ERkUx) z%1K&w(;}BQ=8qzb4OpbG@J-VcYE~eT*VL>wkfJF{K^ZU(=LJQVc@;t%#HJuRDHf_| z^r6=( zPV6Y?ViwdU)yd?TD3+ifU|9kISPEgJ(M;AD3@t?+p7>CKAd@RdlBCfw^t>R57*Z_< zOG=z5(YzBApR!c)lccWo&S3l>4K7U6H_@zvV;|28y6KOeE>0JY3MG^oAB>H_EH4CL z3-lg_M=sCXk*$f6Du-!k2C3(3w1fb5E2a%qiUP%tVYeV+O_A0c3>ayWsz{num)&ts zF|?;e@u;GAETfOP2j81mvZ?8g9X);f`)@|74ql;OK{JD+XlFhz_MsI4AB6EaK0KZe zBg-(O(J%=t!#7n-X`o0wtV`2s0w>ym1M^9JYRSv+v4q4P{9LavCpR*cRhq9rje5t8wEFi0cYUo0b)cjhU^ z6HzlgJzvl@nanvo31LGkngY6c+mAe+6J)G@shU(YT4u98o}*Ln<(^T(A}Xhz^_!^= z6~pniZkT9mQY(&^^(DXu=t9nlNC+U8l59CqGEGfg_hinRPy4DM8Zmk>8VObo#K7_$ zol_l8(sfZYY^Nm3)&lSqNj9wA-FEL8Mj&CEyRXr*fOtA|&Qr{#sc^DrFl9nGuq!0l z-~z3kKpnDPjY>%pcz~aSVqL*UXCj2CgPSi-M_89UN5IQXkzP4qydXYE#PsPtJPX}MWemyvIq*8GkVjxH!Y9k$o0cS-%8SsT{ zHHuG%iDy6~0U3;PWcf?}$TlS@{9+kdl7jV3$0AXL9xx<9hw>A6NicNPGqoTNbkjs1 z)Xj$O?nIaT;bP<@U(OrYbf6`5j9;9Dkq8iBZ9^2H8AuOuSS@5@UtSzSPk^g{kA`8* z!$s3blk~4&V8H^r;+l+23{loq6^lwLDPKVmEZZ;~KX5eDi6d3g%zn4C*X?ablY0Z# zGgTP8C|D;(^XqD+c_Wx4(20Ow;0I>L4AB^vuuh=ZR`97^!nv;c#_~ir3`MiBE3HYY zLA^mn6M$EODw)2aIBhIFXwEcLF%AuO9y~fwi^b7gwlz~(DuRIFALyg68bAh&rEadl zB&80;#ut)50liQXY#Zo+`9Olxh51x9Jx@2hG_YVJKnIzI4h?`+ULEWDY{^N2I961x zqG8;SE7cv>JA4xq#kr%ax>>J#j)8?R8#8H4fkKm5jzt9s92>teq+oGA8sG3?{ zi%I44fg$9n3o|RSAo!z1(?y^{9RmwvD+IWLVd|jK3$a=xVLi%#cpK4BlZ<4#ym+xV zeeohy>>!B@tsnH0aoq8$?*=WmS=m<7MPf*nCrF`617=`ydE3Gu z1Oec%uNE)7Bw|v?*gzcvsF+C{IHAt#4%G5&fPSE3h0BN?%^CXU^0jYFFMLckf_dM8 zbcFM9f465wY2Es-RiP+h4_hoZp4KXrZPAzwn&>91)52PC>_Sd5F@iuA1Si&|aHNyj zPc1^4iJ2O(+%$jK2g9If!j~su5Q1;AA0>n7T#;x`Mb)4(t(e9ts~`7*gT=|iqw_~E zu<}=wYU5Tpb`HK=LUpKSdo~ZCEzrTRN&{mD;s<>S259D7%!{K)Rr4I!LTf~j4dMWF zwP{$eFtD~5^!rgbjdaCKv8XnWA!(S|!65MUV73TsvpyT`IQ_+we>(rJ4AoyOO1)=q zCi5^HJ;hF6rS@*1NYkVrr^9GGRj@KG z$msEYYMXJdH}1#DQEz9^>%CaEJ%BIirZW=7vtqqBnP+2)g_W4yLS-x4KF$`?%9 z+bIYk+8v;vCZWrL04`!#Q~;KoWc$zsXpRC#dM{SxD4h<#1J8_Q(N+~z)$DZO7{Pe7 zzv~|jpY%_MlX&^%zELcdjvplV#mmLWJ3W0p?gReF{=>=Z>C9BoPt8E&OxS=>A2BU( z6?hD^CKOs8Y!C_(OgmVh#$w1i1^THVad3=~M3`<`xhhJvYNg`nx;0+JrrTTIi~LR) zCBs?L?!LL4{hP(spG&2C6aT5)vpaUD-~aOU>(`+^oCl^YVxA{zAeL+wl0wJ<);d9a z0TWPIj6CLyJg50Gh-VCduGF!R14fmq<#JIs%e>TZU?L`t71rt#-|mv}L4yjEisN<<%~3quN$@zj7toj{AT89Y#cZ9v8a%u$R9HVhvc zi8Am7+KZsc7#QWdwQ^ucVnuHSb_n~_5XDwY(Y%ZE)7RlEr*`2J_)?LqbaX^Bbd%so zSrlGtq8jwQ!FYr%VRb(1!xjMZVadS$LmNOHNT41wjhs+WEI|&))F2#SWkWF09eBRz zc!6#l#11KowZIy%;EtO%wZC(kw2 zkmU&L1LPYZc@fP$VTdYeC}Dw%d<4)cfX{YumDFO8EFc2v-purMG*hCUr*9>v43rpY)> zWdzvR!T?JtcA|0UsTgcwxRQ2|7jfMkS^hZfSZ=-9^?I>pIfHJy_x!76xw+F$Ci?E5 zx;NoBgj&TpP~AnpSuLUCTSrHWrD>W@BxAEe#DsKuZh^Zp203(esAmP*4*DhHg>=9gaPTFP0?PkLR`>d%R?r7WF*p1sL@)QZfZh>KFx@ka`JMC>hfi)9KT}*)kq_ z2M4w_9UIoL-a2hPxPKal!=3tQ|0eWO>Fvo$B<$Eyu~aUr6|oWRNBfDc)hp#1EJd>) zO`Ra|Ro-+QSaCAC8N`hZztF?Pa`G3!2c#24FfUH~_VG?@de}X@__E(WJ@P`=aq9g= z7=~8Zv|%T|C;sYa5r|@?Q|)_or`Krhrz*w`E%hTO9>QqXVaW+vV(q_vB)4$C~es8)kd@W-sgcS8%g$QC$4V zd@1jR%~p_}nEPq6)7NcHwFiC73Hwt^A5Il9?qll)n>W1gW$eJ zKM3E^w08W+^I$<%s+w0<+JUEeTD2A0UO!6aLpz>Eu%;x{fw716Q1k-{e8&)!k=XG`G@s97eT0a0Bm(H4>{bOGZhlBax+kQ|{btCZo<|s9l*6`$L z{^gfZIyiPM5Q|kh%>%_S0Mu2_Ba9+g^4NRvyj0lRdHUsfuToW-)rw{$_D&<*_y0HD zy?1yX{!rH=jLw?vSFvH*O1p;n6y~s+>F>CGTQB>;Y%qR$k{l%!xsD-U!FnUKj|{^E zb4+x4Oos&C@k1;;S?I*@BinxQ-Pw`T2v4y9q#kxu3b7 zYE^f-HA!*Cb35tp7_#s6M`zDlTCgXVv5-J}S=g4^ISP}S9Z>CneZkkwSc*V@Sei+@W+i7q-I@zxY zylEM`u#MsEK>Cj~F$^x~Kh?pUL4j_TWGx+;z5cl;c;iREuRJ&ir&?MmqkCb$_vwR5 zlXe<@yzKVoiZ$BVA631;@OGVUT`?%D%h%VXKlmKvACg_7z#<_&~#JA92+J+ zx+?87B}b9J>-#1@>OWtUG%R=DYha%nMJ#^TeDPECmrAFnZ=am@7XNq_47#mWnjB9f z$JYIYBbTH~4Q3=pF}0%dj@NB3CX-(8?`5UGGcYhyQ=o}K zf2d-G#XlNFv2OH?rfZvSTMMx_J6$S2lnFYrvtxO z87YP_x2@W_-E6)&HtKUv#r(!G(alBA$5ht{!}-Z@VAc}H={`2cb))z7cX5CBCFU4Z zv+DE~O63C>KXHO#ur&PFKmOrq+jL#67{N23xp%Ou8(lv-_~ZV5bKqHqELKgCm$b<1 zhA{g)Yk9WBy0aPR$*fV+?I+(hn{_k%-QtuXaR2C@^K%ivbVTegpFMvUs5R437NbU^ zwR>t9lj+l@zZf6ZEWfT{Viamc)$c1ccy7UYWB#;Xv&t2}RP~nkEAIS1?!B=;Ywgcw zj8eJkF6uu)^UYhuqS$X7zI*cg-tMD$;M^Z;rnyX-{{7QoMLT^p(iclj8F+))B3&Gv zwPa|$z&8AYPFX2wi@Nnnew)UFRgJS10yX>j503da0k4js9vgB-(a^v@qyH7l+0!v4he%$i&(YlfMg zo;~iTN!aTx7H{9a9k7|@kJbOt>tazUpX?X;Nv{)}onn&+Z`j)3;Q~|Y*rsL6E?Cdl4mML6_dU8J(vmp&I8AGd;62Uq}y8ne5sT^Tb%xoiTyKy|>l?;8m<@?Jj;5d8p-+UD2;QkVB405^b-q|$43eXRd(H30b^oQ+dUgCfS+&)#1NH-NSLAAYx&QRv-aUV0 zSp&_eO}{X-nOfI(p9}*nsr$V^Yc}7$dGcE!P?S5J>EWZKKCv3Q11rPX31ztGz4&Z+ z&#LU0-f2|Roqu>keyqPm5k=#3zvI>$%M)zY3{LjFWBaJ zH=`dk4Wpf2_}ppK>fKM`jd4GTZkFAE@ z#3JSI7istp%|_2_-#>h^f6}xuO^w_ye^dBHxM;u#`q#yx_uXvqmFaXvSBt*2dtuzF zNKY@{{qEUsC4P(rCvz+Q=Yzrd;j5SbWjPsP6Q}4^qTdfX$DcLa?pJ^KKl{Hac&J40 z;(vMb^xMI+2Y+`I2fgsL_ipOFd(dg`)%DZEZyUd1<7ZVjmVX=#PoKN>a8|3C;q$n+ z7+fZ1E7s&Mh9{NZ9Db>>KNt;;&xhXzC0RdNB<=AZ(`LoE(4nCI3gBT+xyL7C*p(O+ zl-{e$*`qhFUt@t#VXN4`J^iJUcCc79vq4EeJnW4hENYp7^b3Kr0JvZ9v9`8$_clIm z-@Z+ug+Cnu`U~p+*eh$d0eby!3IEoeJ759I--7&4Zh--7Yj-mEe|7Go!PoA9{yTSW ztvK+p_WDcT2mOd{UAu#?zjW0l^EL z*Y5%cBo|n}8EwxVyL0nOUaRImM$UERcd@^*fglv-8 ztmO+Ew{u7Xa2?-`iV@nz|J?ZhJEn!mB>0TbhBB2;Zspdmk^2O6QD%zU`MU_m-q^_J zwkmhw26HP{mw;;lt0eH?Lzu^A{tmsiwsuQx2DS3`ws;ev_w`*LL5gqPMm$>)&J|na z@rG?w2A{8Bt22xLN0@$Y9bxo$S^Ph?`}5md>-mk`Mjokf_|0ZshXXfU&kRJ@RX40o zy`<#V1-=TW1ne7MgZlmfDqg#daPS{cvFcCy5oZtRlw{ zfz7i9XWp>6Rs28TlNZ(&xt1dn3b~-5&=xed#;`TO7i72%Av?gfw2{;GQh950eUqzO z$Z>EbvjiT#i!*qTVnG>ByKt$&%OV<$oGKWtoA5(KUI{7y!GKU)C~jt_*bXO8!K@Gl zv^@jQeKCu=A?JI(rg3T!(IR>5j5Z}nmt@E&m_YEWRo6}}@Rr;vdF(1tgTc#%s>xsw zAO`;`5{BHr2oZM9HsR@%p~m2&h64O&@j78s$U~;#E>RXFw=5$5pK>868ubZ+Z`*SU zNyR1(IrL=gBiK|J6ntdVGjPO&D^}2Dij82XvS;a?t2Z-zAWy^~U`g%)I3t%f$f%aC z;JfuMd_Az2fqL)&Lzq>OfzN0~U6z_!@qz-g!QXZ8%LsNbxQqK<$YS zouZIeg)U#wg-d8Cf)_IK?dC9b zBabCuV2mal82r4d0VS#)v#p)&8WjP`MnS5jr|Br|X zUR=Si>ut-T-cPJ$@8dNT2)4)Syn=q!>li-SheDASJmObY{e)f3>HrDvk;bq<#0xq+ z7Qub^#tRwwz`^mRRvDh(w3*HtfaDLY2w%VCx&f%p_wcW%EO?Oz9~Fa~v{}oq&<9{P zeiIv6m7D^ndH`ne|2F9wY_u`@UDs-O3Au!WHQDp{F2KzUPA*c`rhrYgF!)e-I0Slh zz!`Dq7&hD>01(5(wd^sttTx6`bR~Ev!9kA~6fX)9+D-8R#DS(+uQoNeQ6>0{ZXz72 z0wRsv2IOaqK8=C?inD|SaHBx<9B07GT!DKinQQ3P8UJoJV)hobC1FQRpy?QV6scU6 z;qUGO@Q$pziH1`~KOO|`2q%Mps|MxZ$%{yXkwJa0_^DpxiP9-;3Px*k2S*Q}R~d9_ zJ!-3i^!XlVjyT~S3x zr1J@W4$devQX;&E-ebc+22q4AfiB9Vm*IknfKpz77Z>wY0_q5xagD=hdb!iA)rXNQ z^ST9q@T*1h8{iiki4`sBTUpZs1+blT4z&-yfd-8MvST973K0UtG{yiyCEAIJCC7BVi;%zW&ja9lDG`=>JVVTR3@G<&42?WK$4Tb>bkq_okhBXuoT1qlWsu4qj+79 z5(E`t1wxNV55UPf$8 z-}eB2XgYyg)2K&aXd)RR_*7?q1ZO{Q1QA2UjDJK z2DlEEf|IaFDGXFa>~XbJZuG}(*Hz7CuR9Ow9RvLnG$=M2fHAM2VrMmQWHMg}A66$( zonb(7%8m&>&|y!ZNzi@piE=Hm6t9PY2XV+O3>2NdS=H} zfFj518VyjW8vf<6rBRO}+EF3>DLUDqtZsBv1|&m=#E_wgR%YLX0xsbg#6vZ~Ppn)f zEx?y0rBrXV+D)sfxjVJX>5gBuQinjnn+7Thwj!BpkZ}kDDk0{f9{lCC_wo0jD5I1R z$_!D0N%;e=Fd!bG7QlwzT4Ae#a9P=bA{6yb*MZqxt2b)tlf#Or1bqjO;CT#^K$?W9 z0NqRYQym$6L<6WMOGN^R>>`mz;4|j1hJas`i5MC}gf8s@+=(*up|Ls;s9JT z?n5zPq`4XYPv-_q3nB|n!!iP}DM~SH?VNiJ!#q3d+Z78w{Vdp$m<~u_nPLMzULjvw zLW9wgN1RcH2qPM7h6*BKfWtqD4B<%p&JOVw4lwW@N@K(~C^H*=dJ<+gz zijjqN9NFYjr}GGXW7RMguo^KPX2AxO#0D8=08!C!15gl#yFwOCNbJEi;6XG4F1iuf zHkg5xwz=&}wYIAueQ-rtM22+$?0P32sWT~|vuxPjpSvsRbyav00H9JTrA8Ec^1DY%n_&|}hrW8Dj^!dYgZc@i= z8=X=@dJ9B1M4_Ru;fr81I#8QRO`Vt6gdivS$Ws7Chxq|}0{78LNKVio86U3TGd4i| zV9HlQM<~PaKuCtF*iEZaJG?X^H=T~Url>gzvJ=oGjMoF#lBqgWi`*}az`Tae#=*0h z>>EKfxhK7@vs>?rkvv2oJ& z{GHh3ecwQooZ_G(N>!UMRB%KWI4BRS z_vox;XnY|wm{@{*l6ZvBjS)d-A zr>P<^0167IL<@jKSPE(1gyNE{(a6?}!2)WN;J|BI;pl8}I`<78Rt*y?){!xS7o?ElzKBR9 zSP=Z!(cvYn#{I|&`-nF}t5HyvZb6Mu(<`R0BP2sM;GHjuI^zGKxHLqb8x?0i(wq8I z(>`f7I*vKO+(YOcG*#QMJUcpl^Ys^Sy2m;uDik;cvVdhNu^{zLGz-NfA}@y+9nD9v zV%K;p;Wu>MehC@%z)5r;CvrrYh zX<}nmXtF8o=QhqQeG{gc8L$YFfNjgUSzve5vJs%@+vSdP< zAkrY8x-xZbT4_U=v_$p>^>Plu86l$URfGkZ!xUlm5Cb$7=C>*W{t=*rl_B1M-#Nwq zW1Kzzw`;+FqX~S)%lJs|BTctRv12;gdDpHi8{}y=I>zVG!;IqV}aJh$I zU=DMo=6NL;q=>UeTt;O2h?HScMnRu~f~g*@B1^UbS60LhRZ2+xQl(y@Tc-cSF(!7? z9{#>twofkScGam{2z?S2tmKf{1C_yaIiOSLgCKzuoPBmQG-$1a)E!D5K}iYRfJMcc zrs2TC@-2_ZHR`i)(}p5}27r)?if1DN-RJ~ftBTy8R@3SBqWM49p1*q1|NQcDc;v!1 zLk0ji()%>!zyynC!Ng@8;~!;PN2?17;{Q#^A2SqLBgnzXv1BEBIgKn5PT6;CjNoWw z#9<=t5Yt#$gb`@NQ?=_ENCzcraPMw(2Rkn-hs&XpzMk3WyxRh@qrym#kfRVC327|Q z+YxI*DdHC<;b{gC;_Q5E}@Uj1W2#SrzP-E>~;b$XC_6 zHQ0ancw}kD!J*>l&FVwUNmb;>kg=SD9J~+!upa`5tRh4|mgU))hMf>3w30**(cZ)j zd_D%L8WlA?M*Ken52^VIc_bDB z`_(av`lNA(iV%&!3L22ere`Z7tU(mRrxhrOv>Dr238pYia|o$29Wx$;@$%vrD+^wX z%pj8CI6-8}RYcehC4`E5ZklRk#dNC6gUb;bNG)ro#u)=0Pz6LFb675+p^WT^fD{bu zA;8C=hGj=;5E_h3+r*|<5b78zY$PI3WgU>Q#FLC>XHRF#^NUz9y)e+V*o)(F>O{@f z?rvaz`}DllHJhc9=R3Zqidz3@&{Ql>QW99-f)ZIg7kH$?K)r#q0dp@2S(gM$s3p)m zu#)>J0+n>ZfZ|rCeM3fwiXmI6r~7@+oWJyp*_k7&NUIaso@I3>gJh@M>?LONKO@$^ zQi4TVwayxv263J5Lkw&PD;B;4C2+XB0nL&KnO1(|FRXeA71I7vqi9tX{Y72tg|EExpd?Z8&W3nx;h%fkC$RH#W4Sa zjgFi;=niOaoiq`;win1Gh#Y4`QJ82-l#cpP3GHU0lw4KSRn3VLyU`g9`#bFi2WPv- zgM;+J=feOYCX0LN!{+6KnRkAEIoSpLnf>ngayGN|z*H>QdluG2F_1wjh*X50AekWS z4{TO(8s$R}C1)`pMTMCTQbr&Y6GN{-CTLBP>snQFOv4^dL(`4!Pohp3cGBT&x6`}4 zoc*sotUsDSVm6E(SJM_ET@UtNTwY#==3pKRp5Hp+6Q2M9Z) zW57xR1h-iAU0n%HrL5FjzJm}Q%amoeRjd2wrw=aE7hd!EE`dkVfo4ssFjFn`Sq45zaZ%v60oO)1WeYNu*_N}FagzWCkc<(s|QWtYIab^}pUPp6Guy%#SXn536xIOqG?46Nab-QkNXt$aa z|L?o$aOk`7(4BPMBxUf~$GvgaxwJ0Ro*VQZ%`Xm+zr#mXG6Z9KF|7-$GsL$+uxXVR z1F#ZAux_E66nz*gSgXSHg_bt}ABH@~YvVaIe&8I;yt-#QowygZyD&6^{n?X?2DWRK zle#yZyoYb2#hb~&(DLS^0q|^g_DB6e>U&Py$6zgrk!{XrHmw~Z`WQ-46EUD8yOlf| zX^NBT0xd0?*g=4Dg6F_8X$0d|FpQ&?ha_G8PSR+#58@y`dv&O`kRN1h?*7B@CVab$ zfZw6vFGqI0q8N&Oa&mm+cn-4Q$_79w^8Bey#;FEvjHDbO(r_#T`Mv~sFhg%ZMx|&t zpgm-?0D>`(E)J%HV7S+_{a&}-a{Ow|)Q#Oy2lS*5(stxE-osaGy6JWg`z>$xNyCI0 zR6Q7sm&+)wDA!R_~Pru z#ZkP7ciN3cdf+#GwQ1^BZEI&j8y*w3-SH%!Xg|0~kY?QDB{q#w>ime!e(Pozp?ETqcX>Z}#?1j>EVU1kK%9 z6h+O*b|M?9|If>!16sSazGoqD+ne^kzw6p5Zk-B31Vl=@WWK#fw*mNAF%;Jo)U|*(gEE+551! z$IGMRv2Qgj1h(pWJh0O7)Hi~;hvdyLhp zCm9%ih@^ay>IX=FiESFlyoEIltl44jAK9WDL+uA*dxz}hjb@c z;6Xni6=Wb^45n+GGc#bfs2HA4$B2J+$GgE^8%$kxT1Q9i!QWyB`lyWons#q=P?zn;Hcbf6IpB{fbADqq>NO*vbPCF=UtqFnWNWibCq;{>o zD*IU6Q6(%j``it#8MOmm9pS@17*xB>F+}UH6H1@!ejnv$r?jf71`D zST9K8B$y7ZT6=tUw0QF-8I4W?2PO|z=?tGH#F)oZ&%;(W{+lUHdTq?ZQfW9i{o?UX z4a;lD#bqUSuNmxye?kE3^tAUwU5^;@#0x&#MQV;(r>+}5cxm~`KE@$S#XNm5d-}A0 zGSI6gBo8w>$#g7QXfUwSM2ZK&aA6do>v^$^VW?C(|K{u{XmwAzTB&vz)fNoaN)r6F*(&759$+HLhNM!g)jM& zN569(9dxJl)N-)R-*Ed+9$>>6dyYR|hViW0ob(SS^*BMl0~;{xyYbm^T`$3PBDx<~ z4*DVj?lBaiwc#gjV#NvAU$K0b^+ztLR=s;pM^W`EaFO+D5yHB=ycm}Ftn2KyR;xTZIZ zJflC4e6QWZie_L*jzh^V-17-Gm{~E+FRUca0{Oda?IJbHuQYY2~r#%#COJvs=gdd0TW82Rn61qGd}=teR; zPO$c7?bj;JAR3#>!DzVWPyOk1&IX$E=ReitAF|_kPoMp_;mhTGX!Pz4r<2iWW=!@& zuj?G8HoJ1G1Ub9r}HGmKDyCDv}};pbzEvzu0eh zRjsSk{QJw6Kl%OM8|Qh1I4wqW+wvb|lZ}t_04XpB&BNcFJelr3Tt@ywu)p2w7L@&D||@0@o&4w^jy z^=QLod-CX?|M&m)&#lHIyw|j>`0%o= z)q^j4&ez?=+tC$#%xp8Tou3Py9#4*J!+mu;{1bZrAb#+$VcN$Jn^D8;4eq7!i$`w5 zPV161IrO_N#D6Q6Z6o&m$$mfW#xaZkpR$={2KpC#nnqQ*KQyWbaTq>2hkGvSa4gU3 z98DZ=FtD19I*iSGC-@THTdi|g7h1sQA^}vT>PrRDyTXhG?n=9RA*wDhggT1)*^oy>y2L#gO0OR}u zuexq`y7*P_uelN?47{nqlCz`1;P=O;LA&jR2R$s(b)2(rma+EwB-rh_{@G}k1T`z& zRmZzJ|CQg3svh^6$CocI&jwyNRa+CxJJh3t{?T;Vem6103(x!P!PCi&C5>MR@x#}h zX0tmVKKYk#E*^XENNZWMmzF-)n&tr03muCMJ6(*iZ$3Z&tq^E5!|vha;f^`=oO(Fz z`&howYGHbDF{=JL2*bH|VO{Qa}8Zp>c3 zJUE=p7yG@2I8Ov{LHcgufAe?{51Piq=~ur-8O!+VFK>dA+@)1PvAU*l>%I&*r zw~^f8qw)H;@80g75XapWfy+!Lc>`QvCYeyLTxo0}^vkVEd zbg^>vRairS0Rm;&Gq-OOb)VebM9zgflzidV`rSK}fgzV$E8f}K!qJwro!{Ij+}SR1 zxs5xw5uub@Ut3?_`~jd>mq>(A@29s*@Snein;p<665YVfPC>$ljm_J4b9aH!I&wcC z|HB8A#S}Kn2Z^!Dq>>+kY^wTMEC5J|1$AlfcB-c0BH}Y$DwvaDjV*{)}ZvhG!eEN+$fP`$0 zbf5}WD-z9Qg#Z9I`ostIz}4aELAuUfXK1ivb`Dk`c&~^Ch9}F`2K3_7C+KP;>&e4zO!)?y+#f<(9PH^#qmszXR zgV)dF_xXZRwqz}I_eW$NOZ5vY@h!E5XYA0&q4KuYclO!mlc4*vIWVY@*Ds;76*`EMY= z>bk+?^(*j%4OL7?pkY`RYnsArR>8hNm<;BWJdeeB5WuH%=oi2x>l2=hc>Mh3qilzUC`cgDRNFENgC(CMrI z1iQ<)&EPRmD^ynM08i4@tBW^l19}|O%fti365(f<;l9E6U*L-(;%|uj4-mjBYk8S? z%&H~r$_fEk9pj7Gj&NwwbX49ya{E0}>`orP+>4$^-g@LXLOa-5^XKzr&1b);jEXXx z>6?z$b5@?ge_!%2>{Y3ZQ%DQw;+^^{EP*R{v2}g5PV$EYF!~gUn_JF9174RU-Xr|%kC2QuFu&C zYbZ1Ug8x~Z4tXk4tn-Eno29;qBldjuQdSf37NBxm2A^mlsu^&0v{F1I)O7O-J~5wK z??$T-GAL*OxGGYZaSg#v==6n66>$oOJW@7+e*C9u=#TYdq6Pc?jiJFl(71rapl8V6F31FW)hp@)CVt1b4WZw}@6if|yv4L5 z9xO;y4=Xvi7Ap#3y{|5yM#vi@AD0LLI$=$)0txu+Dxq)#KC`^2jetgOv#QsMa3fQO zI^f@fucvNHB_z;5g(wgu=u`%heo_y>GX$u{+iL}$V6wXL7=urz>_0t_4HNG{vwBb~ zjkx)3Xj!z>HecKl)e=kv9VLxepdD+0+HKw*@m#|bP^$Y8TC)QrkF@k#(7qWSEY zpb`oUK8=d(Nd}qWPCz-au)ZOnPYLX&iKTi4zXJ~4vyrQLjY57C!bXEL7|dR#V{}F~ zySYXKH6k$o3MQ)`psCO?`=Ueiaq2{LiG337h}Z;88yiR$f!Sz*YbnlN#e?`m9vaF< z4z>{DO6aYO*%%^`x{agr?0;6_8sb`sQph|(%7lR()4Oy)@WEmR81Pw*8^^P%=iKQ;Grul6}w(K*V2WfM!rv zB(M_(AL^E0!7s#6xf`2&si>AbnfTAm_qM?>^dIU%&^W6~@_^5;jx!*{2&6Y4`ava8 z3J%aG9RhuZD5IFYmOVgsFsVksETdmk^IKaRd9H{sR3HKQ+bkv`0jD^}^>u_hujgdQ z00s(N%c>*-0flN^he4KcHB%HBczhxg%j#kF7(Q;mr-6VFfbs$Hn;3W%WbfZ<21Vqs zlj3el>_>Pp%wi6(Wr5VMh)BCDW>B4s32Rx?QfC6XxJJWNM*qt01S&TWVP}wJl0GN_ z66cEg9C-TOY+iezEPlVJW))sG5N)tx&K zHa0QS*xW>ZNW|nz)xgK^$2j=}zYy81A(|OZ&6^uM{jAsj-`@GXxQ%Ri{Li?L?T3C) z8$DPc=|KWXAS93wvJApT#tm+XHU@Vm-TjbEevm+Z3`v;GgvlKybGbYBvMlWG%RVgo zxa_|+`#I%y;_0?C9jD#7aHE-Y%d%A8s#B-VIaTWOtu{OEP_iml@a0g}PV`f?Q^O;1 zO?8sOq=nosf}i)xyiTf;tSgB0cfjW`jE-h^>>%{+u|?agtJ!CNeZ@xU ztlYJ#+`tkEKN9qUx2RCyU4JB<} z8ZTCzhe%`QlbUYMr#|qUj2wIPm^*v@yEZ8ujQiPHs^h6h120J(A_I;p&+(OnDGkv} zapDxH0+qpBGpC?MB#KM%e2Y`U-cuY08A%dVAPi}jWYgh?B`MZ3dq*SF3*Ug>vAVup z8HjQ)W%pRp9^-uSfYd#Fom8I!=X5t%WG$ysf)5s|A^8>}PW}K}(vk2YBJs8bq7n^~ zQL9?O^DT*hRDkZc`I~X{xY8Q8oQm1mTK3-mvj-Fad&Yqe#qdv66 zN@))a2psqVQaw}<&xYa1h7Zzq6oGMyN{Gm1jiV)zHGKstb5C|IOk`JNBPp^xIXe>; zQ+-J6FFoJHE`+IKsF{zeflH4D@qB!VBxN{8IZlWf5nU|_7zmVK8nv=4YJq@7^mGgV z%l92_U!jvq4bnAoF=FdCU#a1Q7ga&bH|ynGqcQ$7Jg1B zmlUe#(EfA`%y%^CrKDq|1C)8OEgBh&ySPLi8ekhl=`b0^E=R-E0PLA%5A012nF@a!66IuZ{?TUD^XteT*kF zCRxY_Rep&sVRUGcREHZ3);wUBCVxh9@CWx&ZFlIK%zj~r4s01Bj`9I1Ll4DPA{Le8 zpk5*s)m&c2L}NlEJT4)iklm1lhs|Ng%}1PU#4Qq)(MgsFlE6mdQyfxfNFaoZC#^I? zdpYu0`!P?=y}hh{N)jivgfkj(i48DExFB`RwXc{duOc#sdQ2j9rGH47=Y;K7jE$-- zvj<7WlEh&)i>^rH*HAY|Gon0amqsjArgb%vghSh<&~}*V-}a#0l46mLvx5 z0-~E*RP~9Hq-VtUFhZn1r2jGQm>SFvr;Gs3#lRp9v>h4C3* z!(hx6e@G38F-eGnkih9cE=Yc61UUm~oXLQ^#n>wf%lTiE>A)^JYFI<3W8f~UOtc6^ zRCWkmkl;hQ6r;craWR7aKkGqnuHhy6I^0{oQvsV_EbZJUGi{F?+n4 zwqcl)W(;dJ=%R8Q(zmphTFk{85rHuD)gePcD#5+73W>-hx={(hNIPbQ18Ip5qI<~6 zq5@=YQ3)&%8Ct~ng1^(Yhr`}(>lPY=dH$aIORce+fOB9I_=!nWW`vP1qgnL;@>h)~ zObZChaaja9ENv-v*@zCt))O(yY9De}q4?B+#O| zwqu(QQq!z0O_4d#QgJnm{#cf;sfUCxA{XfbVqx)oj53+2bBP`!jwjNAxq)`rB*H^? zN2df4Nh`^qA}z5W4D)fnj;klaO|DH3vV3`N_3v-~C1>lOBTd?$32ylUxP=Af#*ziZBcE?S^bU>PD9vMb-7&=Mwy}_+6eynv3ejRABW#^I%z!##ap!S9rvi@3!x|EhDBbl8 z5+q|dwnCUVJZ73fU?+n^GtXm`>-{kt^y2T#+70=hjJ?8eq2GYafJrHIXLLYA)<3&@ z%PKLAgn|oqBiaUIB%a3;Lq)~F=WaBz8fS)=czKVY&JUuZntE!}$HPN2 z4tnq5IoV|f)r&hWn{Q`@2UQ^cimXmT7ICC)axEb;qASE6i2DIVDSyGh2;c^i*%G`M zN+UJ1Cd;`3SG*oOWhF)Kkkk(?%D2DVvl2gcC-(4f*)qP1r3x$EDLmiRA!354Dk8(q zBOoTe6*~^wAZ?^e5Ij05R*fa24pt;*fu6vhtjG}};6KJdP{Zz#VhBhL&C(?-O7O9ihE6YF(jj;bVn7H@X`{j~WLzmj z)L}H@v$=&?3pQB1O>}m9e+qj?oIv$o^hs8+*tFA4ho#|GMRkS%myT8$9X=|49>C3y z^VFfbf@zOzd=K70mdhYFkXbQ77_?6`U37g%Xx+{|fea4O{CUKuSuPoZRb3t8>EmwK zb9;jz9C*o5GHp(S;bG;~)e<Mh@7u3B8K(gZ=7O zb}$Qj5lKU2j~+cg5W|1**xhY@wO+Q9)DMgDl#%FUeW-P0NA(lz0xVi_DpNFK3kG;A z%>|vsQeq65c5zkSsTUCBm^qtxpt|+*v(c=q9v{zU4{jfNkiiXV-}ZIOzlbfLF+)Y1 zJCWUXs_su`kA`fl+m9VX#Luh|cMznozf=K@#Q@8D5#R+AaF#5^%@QSvrxk8}BHj9M zI-FEVbH>)Z&=MUSBy2iixMo|{eODZ=0|}Gm=Kaj-O@D>=qg(KjfIUxA6dE@sb8Y-T zJR`Vz3Ap$vYZL_CV)$5JU<{i?7-ZyAW9YAj`S8wh4fTtcohAoxTe*GLtMg<9IB%Nh z?EEZAD+j%E^3XwJSc8Bs8Y2K94Jmgyh%_7%<{sZo z4u{2%Wsd1IiyoZ02m8T*oZa#8{{)K$fB`8{*Bh4+G1j zV2O@?#saiuhQyeY858j(8leRxOi!@a;YJ}~Iz58qJ~DK(zklHVItki#GBKl*L7If& z%I0fh`{B1etJohMj(+V&vM7c9wPhH>vI)K8j2!HdPjE;OP`C=%+t}n-3c;7Com(xq4Tl+*lh_$MD=k} z#7G31UY_80!?5-aCNDZh>8GrBw9~{0y2sOu*Nh)Ic3b=T0s00UahsVA!ywN`aN?!2 zXf(9+U4%KJsj{dgV-I+VI~Wl-Dd83s_LHIti{5c+rlaZ4OjwFr`aX;Pa?pI!{Rli? z1^Lhj5p@Nl1~F?8;(83*KRz)n9D(iUiOikp0cOc!Z4o|C3`smFd) zyefvbHq1*K_FwePG%z_B8>aj+(=t)dN|;A-Q}-$f`FwWz!F*L!s->D%#=Pb|KX&_n zfDiBNzda0^dk-5wVAJnBpT013BdU9yAxcq)OjC8*8qjvB0QQgt+oHxt`CeB@ZoBBo zl-L8p&#F3AQ=IbIAAl}u$M3pq#sBA@^_$v*!39FYVQP-q-ZKtI`?cr2GCEdyh)!(h|AVeSI5T>!D;Yx+GE7sJ?SNTMrt_5 z&~og1jLV1n2Jh;b81ZHvH;*@l3WU*8jf%pDwJzwM`aLhqU%f0329M$d>4R_ix7fbv ziib=Fg6|%mHYpLarNIaaUvV$DoXqR?et{$q6jlOUhuMvj`!I!~ctJCnz<}=IUm8Pq z!;=?~@>tR9rc@QkPo`|zb+v=P2GX)>dN}28g2K?qi6{Inwr4-PZ^q4Vz+#on?pJYS z>uz51CWj5O`e`-md(1C#J|Fe4G1ZTNx)%;OxQn(;>s&r;QBerDI-->%2`1c#O< zZ69kMIQhx`UVHqkG52fs6~iu->8LsO#p=-hxC?=@;Y|JLnSRnMgYyCx70|6atnOXu z03R2i%_hJ6_2m;wzYl>MRj>2gW-n_OuV8n~;8e{*9TK+NN5fLBr4~hZ1Z83O$0~Yj zHYc*p*7;#ktWH0jLXg#GU?zlmaF*tQtGDqM z@jiK(kcDM=-ZXF<25M$`b;JvI@>X8|#@}rnAkyAJU%(j8m81y(*z#`aG~fcecau3d$Us8%|}uG?K!@-Q?}dX0GsMD1lUOd z?!j!obhU#??favB$j2T$4@wUHWar6T@vj87@}|0;a{Udl?YsGY98AzVjR~Dm9=lcw zs~~#@=xM`pZ;+28Kd*+(pkKh5DAnzqHtfgpIY*5h;(ax*YP2u6E0IO@+VP`S}d4L3r9yJAq*} z;x(?Gmc87Y+)d-c4CDTIil1$Gl=aiH`5XbLG8C-oD|ogz>~w(5U!2^AM-e8&0ScLT zvo}qtKb)llo7nQ`;DenP+Tv?G*yAs$!m}Fk&^~;BZFiqIw0%(aZ;zVbW#RUo=;70Q z-xe!pHrG%OR_v3bbo4JTPY+S{j%y#jHO-Ok`-9oA>9jeExL?#f{#I;9U4v_ypH_+AC8;R@Y%0+&(@2i^RTpV<-_Rj;0J?2{if-6{|ZrC(K{PgZPa84TY>%^Ma; zbl)5N#V?XUXmlP;Uq3tBmij4t*k;PV9TxlJA0GefWPenK8LK7zcLbU*iMhUe_doru z!c&Ln&M(i0e;zzJc>(WKH+wMnY39C}CQ;(rcZP5NU~Y2_YT!=(+SK1Xb_^C^Z9jWb zrA_q=CK6cdf2itDi7_^;j2m_95<0853G0pZtzk0y%OKF5CpHG^2H@#|=%{8_F4-oi z)BXPC!O>%U)gI|YA58y-O}pY_=BR1>xl^(Z4srwO+#w%VLY?2YqJ;IA zR+N2S{^FT6cPw32&Hhc=u8zfnSNXko<~o001y}C5PR!-9RMGQFd`ugbAKAkBqJ{H{ ztoXSF%r!->0O!)0o40X!Wd*hYw64rm6^iuExJf30w}psMD&dZtdC%8Eg$}Rl#2ve+B%FcEFd$U!{Pnx@lY2 zR<(aySS!lC3@-v%apRUQt;WB(3S7olSGLsJOU15%zp?hO!k3`zQbo6O;S&6IVAhm+ z3H`j?U##^@6;f5+Zbg>R)}F4B+_hX@3%c~hwE(RtWC>>N>6%Bcq4#TN|3YXMqa z$O2{E@6}IT+tqcji|f}0w7Q@L%-Y|pAG@}zYjGD}TpQBrf)+6Af3JS-x~{IregDmM zL9Ht1J;+B+wm1Af0=o3o_5!gbkUuzGCA-b8Et#@Ez+C=%GptolotLUsoL0sB%cvjD zSCzEcwGU-}(%EKUE1vo!)DJhWC~2chA4>eBvyHGWK15jeNucj_lf7fFKE+Gp9uQ?_D%6FKKH)BPdm9- z%*LND!m5HUUcB^qW4Ox?{=V$x|1W^Apg#$JQOoQ7{h{?z znU5UT3;VvbtKz?ZV2dX=-}>J*<_p7rtowgg&uxA9!tMVE{Cf+rt)@%4OZev>=2!W! zP1xnK&#Q1=ndNV8=v-Amu;k>1FqdH#_>14m-`&Xh99Y`^C7MqYr2;q7(sdwT7=B%~ UzFz+-fv*zyDuJ&OxVi-XAFe{$Hvj+t literal 0 HcmV?d00001 diff --git a/ng/dialog.tcl b/ng/dialog.tcl index a312cedd..7741d1e3 100644 --- a/ng/dialog.tcl +++ b/ng/dialog.tcl @@ -5,30 +5,43 @@ proc meshingoptionsdialog { } { if {[winfo exists .options_dlg] == 1} { wm withdraw $w wm deiconify $w - focus $w + focus $w + } { - + toplevel $w + wm resizable $w 0 0 # global options.meshsize - tixNoteBook $w.nb -ipadx 6 -ipady 6 - - $w.nb add general -label "General" -underline 0 - $w.nb add meshsize -label "Mesh Size" -underline 0 - $w.nb add chartopt -label "STL Charts" -underline 0 - $w.nb add optimizer -label "Optimizer" -underline 0 - $w.nb add insider -label "Insider" -underline 0 - $w.nb add debug -label "Debug" -underline 0 - - - pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top + pack [ttk::notebook $w.nb] -fill both -side top + $w.nb add [ttk::frame $w.nb.general] -text "General" -underline 0 + $w.nb add [ttk::frame $w.nb.meshsize] -text "Mesh Size" -underline 0 + $w.nb add [ttk::frame $w.nb.chartopt] -text "STL Charts" -underline 0 + $w.nb add [ttk::frame $w.nb.optimizer] -text "Optimizer" -underline 0 + # $w.nb add [ttk::frame $w.nb.insider] -text "Insider" -underline 0 + $w.nb add [ttk::frame $w.nb.debug] -text "Debug" -underline 0 + + # tixNoteBook $w.nbold -ipadx 6 -ipady 6 + # $w.nbold add general -label "General" -underline 0 + # $w.nbold add meshsize -label "Mesh Size" -underline 0 + # $w.nbold add chartopt -label "STL Charts" -underline 0 + # $w.nbold add optimizer -label "Optimizer" -underline 0 + # $w.nbold add insider -label "Insider" -underline 0 + # $w.nbold add debug -label "Debug" -underline 0 + # pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top + # ############################################################ # General meshing options + # ############################################################ + + set f $w.nb.general - set f [$w.nb subwidget general] - + ttk::frame $f.f2 + pack $f.f2 -pady 10 + set f $f.f2 + set finevals { 1 2 3 4 5 6 } set finelabs(1) "very coarse" set finelabs(2) "coarse" @@ -44,7 +57,6 @@ proc meshingoptionsdialog { } { menubutton.width 15 } - foreach finev $finevals { $f.fine add command $finev -label $finelabs($finev) } @@ -52,10 +64,23 @@ proc meshingoptionsdialog { } { $f.fine config -command { setgranularity } global meshoptions.fineness # setgranularity ${meshoptions.fineness} - pack $f.fine +# pack $f.fine + + global meshoptions.fineness + ttk::frame $f.fine2 + ttk::label $f.fine2.l -text "Mesh granularity: " + ttk::menubutton $f.fine2.c -menu $f.fine2.m -text "coarse" -width 14 + + menu $f.fine2.m -tearoff 0 + foreach finev { 1 2 3 4 5 6 } { + $f.fine2.m add command -label $finelabs($finev) \ + -command "set meshoptions.fineness $finev ; setgranularity $finev; $f.fine2.c configure -text \"$finelabs($finev)\"" + } + $f.fine2.m invoke $finelabs(${meshoptions.fineness}) - + pack $f.fine2 -fill x + pack $f.fine2.c $f.fine2.l -side right set mgsteps { ag me ms os mv ov } @@ -66,30 +91,59 @@ proc meshingoptionsdialog { } { set mgsteplabel(mv) "Mesh Volume" set mgsteplabel(ov) "Optimize Volume" - - tixOptionMenu $f.first -label "First Step : " \ - -options { - label.width 19 - label.anchor e - menubutton.width 15 - } - - tixOptionMenu $f.last -label "Last Step : " \ - -options { - label.width 19 - label.anchor e - menubutton.width 15 - } - - foreach step $mgsteps { - $f.first add command $step -label $mgsteplabel($step) - $f.last add command $step -label $mgsteplabel($step) + global meshoptions.firststep + ttk::frame $f.first2 + ttk::label $f.first2.l -text "First Step: " + # ttk::menubutton $f.first2.c -menu $f.first2.m -text "Analyze Geometry" -width 12 + ttk::menubutton $f.first2.c -menu $f.first2.m -width 14 + + menu $f.first2.m -tearoff 0 + foreach i $mgsteps { + $f.first2.m add command -label $mgsteplabel($i) -command "set meshoptions.firststep $i ; $f.first2.c configure -text \"$mgsteplabel($i)\"" } + $f.first2.m invoke $mgsteplabel(${meshoptions.firststep}) + pack $f.first2 -fill x + pack $f.first2.c $f.first2.l -side right - $f.first config -variable meshoptions.firststep - $f.last config -variable meshoptions.laststep + global meshoptions.laststep + ttk::frame $f.last2 + ttk::label $f.last2.l -text "Last Step: " + ttk::menubutton $f.last2.c -menu $f.last2.m -width 14 - pack $f.first $f.last + menu $f.last2.m -tearoff 0 + + foreach i $mgsteps { + $f.last2.m add command -label $mgsteplabel($i) -command "set meshoptions.laststep $i ; $f.last2.c configure -text \"$mgsteplabel($i)\"" + } + $f.last2.m invoke $mgsteplabel(${meshoptions.laststep}) + pack $f.last2 -fill x + pack $f.last2.c $f.last2.l -side right + + + + # tixOptionMenu $f.first -label "First Step : " \ + # -options { + # label.width 19 + # label.anchor e + # menubutton.width 15 + # } + + # tixOptionMenu $f.last -label "Last Step : " \ + # -options { + # label.width 19 + # label.anchor e + # menubutton.width 15 + # } + + # foreach step $mgsteps { + # $f.first add command $step -label $mgsteplabel($step) + # $f.last add command $step -label $mgsteplabel($step) + # } + + # $f.first config -variable meshoptions.firststep + # $f.last config -variable meshoptions.laststep + + # pack $f.first $f.last @@ -109,107 +163,157 @@ proc meshingoptionsdialog { } { menubutton.width 15 } - foreach step {0 1 2 3 4 5 } { - $f.msg add command $step -label $msg($step) + foreach step {0 1 2 3 4 5 } { + $f.msg add command $step -label $msg($step) } - $f.msg config -variable options.printmsg - pack $f.msg - + # pack $f.msg + + global options.printmsg + ttk::frame $f.msg2 + ttk::label $f.msg2.l -text "Print Messages: " + menu $f.msg2.m -tearoff 0 + ttk::menubutton $f.msg2.c -menu $f.msg2.m -width 14 + foreach step {0 1 2 3 4 5 } { + $f.msg2.m add command -label $msg($step) -command "set options.printmsg $step ; $f.msg2.c configure -text $msg($step)" + # if { ${options.printmsg} == $step } { $f.msg2.c configure -text $msg($step) } + } + $f.msg2.m invoke ${options.printmsg} + pack $f.msg2 -fill x + pack $f.msg2.c $f.msg2.l -side right + + + set f $w.nb.general + + ttk::frame $f.bts + pack $f.bts -side top -pady 10 - - - - - - checkbutton $f.parthread -text "Parallel meshing thread" \ + ttk::checkbutton $f.bts.parthread -text "Parallel meshing thread" \ -variable options.parthread - checkbutton $f.second -text "Second order elements" \ + ttk::checkbutton $f.bts.second -text "Second order elements" \ -variable options.secondorder - checkbutton $f.quad -text "Quad dominated" \ + ttk::checkbutton $f.bts.quad -text "Quad dominated" \ -variable options.quad -command { if { ${options.quad} } { set meshoptions.laststep os } } - checkbutton $f.invtets -text "Invert volume elements" \ + ttk::checkbutton $f.bts.invtets -text "Invert volume elements" \ -variable options.inverttets - checkbutton $f.invtrigs -text "Invert surface elements" \ + ttk::checkbutton $f.bts.invtrigs -text "Invert surface elements" \ -variable options.inverttrigs - checkbutton $f.azref -text "Automatic Z-refinement" \ + ttk::checkbutton $f.bts.azref -text "Automatic Z-refinement" \ -variable options.autozrefine - pack $f.parthread $f.second $f.quad $f.invtets $f.invtrigs $f.azref + pack $f.bts.parthread $f.bts.second $f.bts.quad $f.bts.invtets $f.bts.invtrigs $f.bts.azref -fill x + + # tixControl $f.elementorder -label "Element order: " -integer true \ + # -variable options.elementorder -min 1 -max 20 \ + # -options { + # entry.width 2 + # label.width 20 + # label.anchor e + # } + # pack $f.elementorder - tixControl $f.elementorder -label "Element order: " -integer true \ - -variable options.elementorder -min 1 -max 20 \ - -options { - entry.width 2 - label.width 20 - label.anchor e - } - - pack $f.elementorder + ttk::frame $f.sbox + pack $f.sbox + ttk::label $f.sbox.l -text "Element order: " + ttk::spinbox $f.sbox.elementorder2 -from 1 -to 20 -textvariable options.elementorder -width 2 + pack $f.sbox.l $f.sbox.elementorder2 -side left + -# tixControl $f.memory -label "Large Memory \[MB\]: " -integer true \ -\# -variable options.memory -min 0 -max 2000 \ -\# -options { -# entry.width 5 -# label.width 20 -# label.anchor e -# } + # ############################################################ + # Mesh - Size options + # ############################################################ -# global userlevel -# if { $userlevel >= 3} { pack $f.memory } + set f $w.nb.meshsize + ttk::frame $f.f2 + pack $f.f2 -pady 10 - # Mesh - Size options - set f [$w.nb subwidget meshsize] + # # ttk::style configure Tframe -background red + # puts "********************" + # puts "found these themes:" + # puts [ttk::themes] + # ttk::setTheme classic + # ttk::setTheme aqua + # puts "style Tframe foreground = " + # puts [ttk::style lookup Tframe -foreground] + # puts "f2 style:" + # puts [$f.f2 cget -style] + # puts [winfo class $f.f2] + # puts "style element names gives:" + # puts [ttk::style element names] - tixControl $f.meshsize -label "max mesh-size: " -integer false \ - -variable options.meshsize -min 1e-9 -max 1e6 \ - -options { - entry.width 6 - label.width 25 - label.anchor e - } + + set f $f.f2 + + ttk::frame $f.meshsize + ttk::label $f.meshsize.l -text "max mesh-size" + ttk::spinbox $f.meshsize.s -from 1e-9 -to 1e9 -textvariable options.meshsize -width 5 + pack $f.meshsize -fill x + pack $f.meshsize.s $f.meshsize.l -side right - tixControl $f.minmeshsize -label "min mesh-size: " -integer false \ - -variable options.minmeshsize -min 0 -max 1e6 \ - -options { - entry.width 6 - label.width 25 - label.anchor e - } + ttk::frame $f.minmeshsize + ttk::label $f.minmeshsize.l -text "min mesh-size" + ttk::spinbox $f.minmeshsize.s -from 0 -to 1e9 -textvariable options.minmeshsize -width 5 + pack $f.minmeshsize -fill x + pack $f.minmeshsize.s $f.minmeshsize.l -side right - tixControl $f.grading -label "mesh-size grading: " -integer false \ - -variable options.grading -min 0.1 -max 1 -step 0.1 \ - -options { - entry.width 6 - label.width 25 - label.anchor e - } + ttk::frame $f.grading + ttk::label $f.grading.l -text "mesh-size grading" + ttk::spinbox $f.grading.s -from 0.1 -to 1.0 -textvariable options.grading -width 5 -increment 0.1 + pack $f.grading -fill x + pack $f.grading.s $f.grading.l -side right + + + # tixControl $f.meshsize -label "max mesh-size: " -integer false \ + # -variable options.meshsize -min 1e-9 -max 1e6 \ + # -options { + # entry.width 6 + # label.width 25 + # label.anchor e + # } + + # tixControl $f.minmeshsize -label "min mesh-size: " -integer false \ + # -variable options.minmeshsize -min 0 -max 1e6 \ + # -options { + # entry.width 6 + # label.width 25 + # label.anchor e + # } + + # tixControl $f.grading -label "mesh-size grading: " -integer false \ + # -variable options.grading -min 0.1 -max 1 -step 0.1 \ + # -options { + # entry.width 6 + # label.width 25 + # label.anchor e + # } - pack $f.meshsize $f.minmeshsize $f.grading + # pack $f.meshsize $f.minmeshsize $f.grading + set f $w.nb.meshsize - - frame $f.msf + ttk::labelframe $f.msf -text "mesh-size file:" pack $f.msf - tixLabelEntry $f.msf.ent -label "mesh-size file: " \ - -labelside top \ - -options { - entry.textVariable options.meshsizefilename - entry.width 35 - label.width 25 - label.anchor w - } - button $f.msf.btn -text "Browse" -command { + # tixLabelEntry $f.msf.ent -label "mesh-size file: " \ + # -labelside top \ + # -options { + # entry.textVariable options.meshsizefilename + # entry.width 35 + # label.width 25 + # label.anchor w + # } + + ttk::entry $f.msf.ent -textvariable options.meshsizefilename -width 30 + ttk::button $f.msf.btn -text "Browse" -command { global options.meshsizefilename set types { {"Meshsize file" {.msz} } } @@ -224,86 +328,93 @@ proc meshingoptionsdialog { } { #csg-meshsize options - frame $f.csg -relief groove -borderwidth 3 + ttk::labelframe $f.csg -relief groove -borderwidth 3 -text "CSG mesh-size" pack $f.csg -fill x - - frame $f.csg.curv - pack $f.csg.curv -anchor w - - scale $f.csg.curv.sc -orient horizontal -length 200 -from 0.2 -to 5 \ - -resolution 0.1 -variable options.curvaturesafety - label $f.csg.curv.la -text "Elements per curvature radius" - pack $f.csg.curv.sc $f.csg.curv.la -side left - - frame $f.csg.elen - pack $f.csg.elen -anchor w - scale $f.csg.elen.sc -orient horizontal -length 200 -from 0.2 -to 5 \ - -resolution 0.1 -variable options.segmentsperedge - label $f.csg.elen.la -text "Elements per edge" - pack $f.csg.elen.sc $f.csg.elen.la -side left + ttk::frame $f.csg.curv + pack $f.csg.curv -fill x + ttk::scale $f.csg.curv.sc -orient horizontal -length 150 -from 0.2 -to 5 \ + -variable options.curvaturesafety + # -resolution 0.1 + ttk::entry $f.csg.curv.e -textvariable options.curvaturesafety -width 3 + ttk::label $f.csg.curv.la -text "Elements per curvature radius" + pack $f.csg.curv.sc $f.csg.curv.e $f.csg.curv.la -side left -padx 4 + + ttk::frame $f.csg.elen + pack $f.csg.elen -fill x + ttk::scale $f.csg.elen.sc -orient horizontal -length 150 -from 0.2 -to 5 \ + -variable options.segmentsperedge + # -resolution 0.1 + ttk::entry $f.csg.elen.e -textvariable options.segmentsperedge -width 3 + ttk::label $f.csg.elen.la -text "Elements per edge" + pack $f.csg.elen.sc $f.csg.elen.e $f.csg.elen.la -side left -padx 4 #stl-meshsize options + ttk::labelframe $f.stl -relief groove -borderwidth 3 -text "STL mesh-size" + pack $f.stl - frame $f.stl -relief groove -borderwidth 3 - pack $f.stl -fill x - - frame $f.stl.r2 - pack $f.stl.r2 -anchor w - scale $f.stl.r2.sc -orient horizontal -length 200 -from 0.2 -to 5 \ - -resolution 0.1 -variable stloptions.resthchartdistfac - checkbutton $f.stl.r2.bu -text "STL - chart distance" \ + ttk::frame $f.stl.r2 + pack $f.stl.r2 -fill x + ttk::scale $f.stl.r2.sc -orient horizontal -length 150 -from 0.2 -to 5 \ + -variable stloptions.resthchartdistfac + ttk::entry $f.stl.r2.e -textvariable stloptions.resthchartdistfac -width 3 + ttk::checkbutton $f.stl.r2.bu -text "STL - chart distance" \ -variable stloptions.resthchartdistenable - pack $f.stl.r2.sc $f.stl.r2.bu -side left + pack $f.stl.r2.sc $f.stl.r2.e $f.stl.r2.bu -side left -padx 4 - frame $f.stl.r6 + ttk::frame $f.stl.r6 pack $f.stl.r6 -anchor w - scale $f.stl.r6.sc -orient horizontal -length 200 -from 0.2 -to 5 \ - -resolution 0.1 -variable stloptions.resthlinelengthfac - checkbutton $f.stl.r6.bu -text "STL - line length" \ + ttk::scale $f.stl.r6.sc -orient horizontal -length 150 -from 0.2 -to 5 \ + -variable stloptions.resthlinelengthfac + ttk::entry $f.stl.r6.e -textvariable stloptions.resthlinelengthfac -width 3 + ttk::checkbutton $f.stl.r6.bu -text "STL - line length" \ -variable stloptions.resthlinelengthenable - pack $f.stl.r6.sc $f.stl.r6.bu -side left + pack $f.stl.r6.sc $f.stl.r6.e $f.stl.r6.bu -side left -padx 4 - frame $f.stl.r3 + ttk::frame $f.stl.r3 pack $f.stl.r3 -anchor w - scale $f.stl.r3.sc -orient horizontal -length 200 -from 0.2 -to 8 \ - -resolution 0.1 -variable stloptions.resthcloseedgefac - checkbutton $f.stl.r3.bu -text "STL/IGES/STEP - close edges" \ + ttk::scale $f.stl.r3.sc -orient horizontal -length 150 -from 0.2 -to 8 \ + -variable stloptions.resthcloseedgefac + ttk::entry $f.stl.r3.e -textvariable stloptions.resthcloseedgefac -width 3 + ttk::checkbutton $f.stl.r3.bu -text "STL/IGES/STEP - close edges" \ -variable stloptions.resthcloseedgeenable - pack $f.stl.r3.sc $f.stl.r3.bu -side left + pack $f.stl.r3.sc $f.stl.r3.e $f.stl.r3.bu -side left -padx 4 - frame $f.stl.r1 + ttk::frame $f.stl.r1 pack $f.stl.r1 -anchor w - scale $f.stl.r1.sc -orient horizontal -length 200 -from 0.2 -to 5 \ - -resolution 0.1 -variable stloptions.resthsurfcurvfac - checkbutton $f.stl.r1.bu -text "STL - surface curvature" \ + ttk::scale $f.stl.r1.sc -orient horizontal -length 150 -from 0.2 -to 5 \ + -variable stloptions.resthsurfcurvfac + ttk::entry $f.stl.r1.e -textvariable stloptions.resthsurfcurvfac -width 3 + ttk::checkbutton $f.stl.r1.bu -text "STL - surface curvature" \ -variable stloptions.resthsurfcurvenable - pack $f.stl.r1.sc $f.stl.r1.bu -side left + pack $f.stl.r1.sc $f.stl.r1.e $f.stl.r1.bu -side left -padx 4 - frame $f.stl.r3b + ttk::frame $f.stl.r3b pack $f.stl.r3b -anchor w - scale $f.stl.r3b.sc -orient horizontal -length 200 -from 0.2 -to 5 \ - -resolution 0.1 -variable stloptions.resthedgeanglefac - checkbutton $f.stl.r3b.bu -text "STL - edge angle" \ - -variable stloptions.resthedgeangleenable - pack $f.stl.r3b.sc $f.stl.r3b.bu -side left + ttk::scale $f.stl.r3b.sc -orient horizontal -length 150 -from 0.2 -to 5 \ + -variable stloptions.resthedgeanglefac + ttk::entry $f.stl.r3b.e -textvariable stloptions.resthedgeanglefac -width 3 + ttk::checkbutton $f.stl.r3b.bu -text "STL - edge angle" \ + -variable stloptions.resthedgeangleenable + pack $f.stl.r3b.sc $f.stl.r3b.e $f.stl.r3b.bu -side left -padx 4 - frame $f.stl.r5 + ttk::frame $f.stl.r5 pack $f.stl.r5 -anchor w - scale $f.stl.r5.sc -orient horizontal -length 200 -from 0.2 -to 5 \ - -resolution 0.1 -variable stloptions.resthsurfmeshcurvfac - checkbutton $f.stl.r5.bu -text "STL - surface mesh curv" \ + ttk::scale $f.stl.r5.sc -orient horizontal -length 150 -from 0.2 -to 5 \ + -variable stloptions.resthsurfmeshcurvfac + ttk::entry $f.stl.r5.e -textvariable stloptions.resthsurfmeshcurvfac -width 3 + ttk::checkbutton $f.stl.r5.bu -text "STL - surface mesh curv" \ -variable stloptions.resthsurfmeshcurvenable - pack $f.stl.r5.sc $f.stl.r5.bu -side left + pack $f.stl.r5.sc $f.stl.r5.e $f.stl.r5.bu -side left -padx 4 - checkbutton $f.stl.recalch -text "STL - Recalc mesh size for surface optimization" \ + ttk::checkbutton $f.stl.recalch -text "STL - Recalc mesh size for surface optimization" \ -variable stloptions.recalchopt pack $f.stl.recalch - button $f.stl.calch -text "Calc New H" -command { redraw; Ng_STLCalcLocalH } + ttk::button $f.stl.calch -text "Calc New H" -command { redraw; Ng_STLCalcLocalH } pack $f.stl.calch @@ -311,10 +422,11 @@ proc meshingoptionsdialog { } { - set f [$w.nb subwidget chartopt] - - - label $f.lab1 -text "Yellow Edges Angle ()" + # set f [$w.nb subwidget chartopt] + set f $w.nb.chartopt + + label $f.lab1 -text "Yellow Edges Angle ()" -bg [ttk::style lookup TNotebook -background] + # scale $f.scale1 -orient horizontal -length 300 \ -from 0 -to 90 -resolution 1 -tickinterval 10 \ -variable stloptions.yangle @@ -344,8 +456,8 @@ proc meshingoptionsdialog { } { # Optimization options - set f [$w.nb subwidget optimizer] - + # set f [$w.nb subwidget optimizer] + set f $w.nb.optimizer @@ -383,8 +495,9 @@ proc meshingoptionsdialog { } { pack $f.os2d $f.os3d $f.elw $f.wem - frame $f.badellimit - pack $f.badellimit -fill x + ttk::frame $f.badellimit + pack $f.badellimit + # -fill x label $f.badellimit.lab -text "bad element criterion"; scale $f.badellimit.scale -orient horizontal -length 150 \ -from 160 -to 180 -resolution 1 \ @@ -393,64 +506,68 @@ proc meshingoptionsdialog { } { # insider options - set f [$w.nb subwidget insider] - - - - checkbutton $f.localh -text "Use Local Meshsize" \ + # set f [$w.nb subwidget insider] + set f $w.nb.debug + ttk::frame $f.f2 + pack $f.f2 + set f $f.f2 + ttk::checkbutton $f.localh -text "Use Local Meshsize" \ -variable options.localh - checkbutton $f.delauney -text "Use Delaunay" \ + ttk::checkbutton $f.delauney -text "Use Delaunay" \ -variable options.delaunay - checkbutton $f.checkoverlap -text "Check Overlapping" \ + ttk::checkbutton $f.checkoverlap -text "Check Overlapping" \ -variable options.checkoverlap - checkbutton $f.checkcb -text "Check Chart Boundary" \ + ttk::checkbutton $f.checkcb -text "Check Chart Boundary" \ -variable options.checkchartboundary - checkbutton $f.blockfill -text "Do Blockfilling" \ + ttk::checkbutton $f.blockfill -text "Do Blockfilling" \ -variable options.blockfill - pack $f.localh $f.delauney $f.checkoverlap $f.blockfill $f.checkcb -anchor w - - + # pack $f.localh $f.delauney $f.checkoverlap $f.blockfill $f.checkcb -anchor w + grid $f.localh $f.delauney -sticky nw + grid $f.checkoverlap $f.blockfill -sticky nw + grid $f.checkcb -sticky nw # debugging options - set f [$w.nb subwidget debug] + # set f [$w.nb subwidget debug] + set f $w.nb.debug - frame $f.cb + ttk::frame $f.cb pack $f.cb -side top - checkbutton $f.cb.slowchecks -text "Slow checks" \ + ttk::checkbutton $f.cb.slowchecks -text "Slow checks" \ -variable debug.slowchecks -command { Ng_SetDebugParameters } - checkbutton $f.cb.debugoutput -text "Debugging outout" \ + ttk::checkbutton $f.cb.debugoutput -text "Debugging outout" \ -variable debug.debugoutput -command { Ng_SetDebugParameters } - checkbutton $f.cb.haltexline -text "Halt on exising line" \ + ttk::checkbutton $f.cb.haltexline -text "Halt on exising line" \ -variable debug.haltexistingline -command { Ng_SetDebugParameters } - checkbutton $f.cb.haltoverlap -text "Halt on Overlap" \ + ttk::checkbutton $f.cb.haltoverlap -text "Halt on Overlap" \ -variable debug.haltoverlap -command { Ng_SetDebugParameters } - checkbutton $f.cb.haltsuc -text "Halt on success" \ + ttk::checkbutton $f.cb.haltsuc -text "Halt on success" \ -variable debug.haltsuccess -command { Ng_SetDebugParameters } - checkbutton $f.cb.haltnosuc -text "Halt on no success" \ + ttk::checkbutton $f.cb.haltnosuc -text "Halt on no success" \ -variable debug.haltnosuccess -command { Ng_SetDebugParameters } - checkbutton $f.cb.haltlargequal -text "Halt on large quality class" \ + ttk::checkbutton $f.cb.haltlargequal -text "Halt on large quality class" \ -variable debug.haltlargequalclass -command { Ng_SetDebugParameters } - checkbutton $f.cb.haltseg -text "Halt on Segment:" \ + ttk::checkbutton $f.cb.haltseg -text "Halt on Segment:" \ -variable debug.haltsegment -command { Ng_SetDebugParameters } - checkbutton $f.cb.haltnode -text "Halt on Node:" \ + ttk::checkbutton $f.cb.haltnode -text "Halt on Node:" \ -variable debug.haltnode -command { Ng_SetDebugParameters } - pack $f.cb.slowchecks $f.cb.debugoutput $f.cb.haltexline $f.cb.haltoverlap $f.cb.haltsuc $f.cb.haltnosuc $f.cb.haltlargequal $f.cb.haltseg $f.cb.haltnode + pack $f.cb.slowchecks $f.cb.debugoutput $f.cb.haltexline $f.cb.haltoverlap + pack $f.cb.haltsuc $f.cb.haltnosuc $f.cb.haltlargequal $f.cb.haltseg $f.cb.haltnode - frame $f.cb.hf + ttk::frame $f.cb.hf pack $f.cb.hf -pady 5 - checkbutton $f.cb.hf.cb -text "Halt on Face:" \ + ttk::checkbutton $f.cb.hf.cb -text "Halt on Face:" \ -variable debug.haltface -command { Ng_SetDebugParameters } - entry $f.cb.hf.ent -textvariable debug.haltfacenr -width 5 + ttk::entry $f.cb.hf.ent -textvariable debug.haltfacenr -width 5 pack $f.cb.hf.cb $f.cb.hf.ent -side left - checkbutton $f.cb.showactivechart -text "Show Active Meshing-Chart" \ + ttk::checkbutton $f.cb.showactivechart -text "Show Active Meshing-Chart" \ -variable stloptions.showactivechart -command { Ng_SetVisParameters; redraw } @@ -459,31 +576,31 @@ proc meshingoptionsdialog { } { pack $f.cb.showactivechart - frame $f.segs + ttk::frame $f.segs pack $f.segs -pady 5 - label $f.segs.lab1 -text "P1:"; - entry $f.segs.ent1 -width 8 -relief sunken \ + ttk::label $f.segs.lab1 -text "P1:"; + ttk::entry $f.segs.ent1 -width 8 \ -textvariable debug.haltsegmentp1 - label $f.segs.lab2 -text "P2:"; - entry $f.segs.ent2 -width 8 -relief sunken \ + ttk::label $f.segs.lab2 -text "P2:"; + ttk::entry $f.segs.ent2 -width 8 \ -textvariable debug.haltsegmentp2 pack $f.segs.lab1 $f.segs.ent1 $f.segs.lab2 $f.segs.ent2 -side left - frame $f.cont -relief groove -borderwidth 3 + ttk::frame $f.cont -relief groove -borderwidth 3 pack $f.cont #-fill x - checkbutton $f.cont.multidrawing -text "Draw Meshing" \ + ttk::checkbutton $f.cont.multidrawing -text "Draw Meshing" \ -variable multithread_drawing pack $f.cont.multidrawing - checkbutton $f.cont.multitestmode -text "Meshing Testmode" \ + ttk::checkbutton $f.cont.multitestmode -text "Meshing Testmode" \ -variable multithread_testmode pack $f.cont.multitestmode - button $f.cont.goon -text "Go On" -command { set multithread_pause 0 } + ttk::button $f.cont.goon -text "Go On" -command { set multithread_pause 0 } pack $f.cont.multidrawing $f.cont.multitestmode $f.cont.goon -side left -expand yes @@ -526,28 +643,28 @@ proc meshingoptionsdialog { } { # pack $w.bbox -side bottom -fill x - frame $w.bu - pack $w.bu -fill x -ipady 3 + ttk::frame $w.bu + pack $w.bu -fill x -ipady 3 - button $w.bu.apl -text "Apply" -command { - [.options_dlg.nb subwidget meshsize].meshsize invoke - [.options_dlg.nb subwidget meshsize].grading invoke - [.options_dlg.nb subwidget optimizer].os2d invoke - [.options_dlg.nb subwidget optimizer].os3d invoke - [.options_dlg.nb subwidget optimizer].elw invoke - [.options_dlg.nb subwidget optimizer].wem invoke + ttk::button $w.bu.apl -text "Apply" -command { + # .options_dlg.nb.meshsize.meshsize invoke + # .options_dlg.nb.meshsize.grading invoke + .options_dlg.nb.optimizer.os2d invoke + .options_dlg.nb.optimizer.os3d invoke + .options_dlg.nb.optimizer.elw invoke + .options_dlg.nb.optimizer.wem invoke Ng_SetMeshingParameters Ng_SetDebugParameters } - button $w.bu.ok -text "Done" -command { - [.options_dlg.nb subwidget meshsize].meshsize invoke - [.options_dlg.nb subwidget meshsize].grading invoke - [.options_dlg.nb subwidget optimizer].os2d invoke - [.options_dlg.nb subwidget optimizer].os3d invoke - [.options_dlg.nb subwidget optimizer].elw invoke - [.options_dlg.nb subwidget optimizer].wem invoke + ttk::button $w.bu.ok -text "Done" -command { + # .options_dlg.nb.meshsize.meshsize invoke + # .options_dlg.nb.meshsize.grading invoke + .options_dlg.nb.optimizer.os2d invoke + .options_dlg.nb.optimizer.os3d invoke + .options_dlg.nb.optimizer.elw invoke + .options_dlg.nb.optimizer.wem invoke Ng_SetMeshingParameters Ng_SetDebugParameters @@ -595,43 +712,51 @@ proc viewingoptionsdialog { } { focus $w } { toplevel $w + wm resizable $w 0 0 + + pack [ttk::notebook $w.nb] -fill both -fill both -side top + $w.nb add [ttk::frame $w.nb.general] -text "General" -underline 0 + $w.nb add [ttk::frame $w.nb.stl] -text "STL" -underline 0 + $w.nb add [ttk::frame $w.nb.occ] -text "IGES/STEP" -underline 0 + $w.nb add [ttk::frame $w.nb.mesh] -text "Mesh" -underline 0 + $w.nb add [ttk::frame $w.nb.light] -text "Light" -underline 0 + $w.nb add [ttk::frame $w.nb.edges] -text "Edges" -underline 0 + $w.nb add [ttk::frame $w.nb.misc] -text "Misc." -underline 3 + - - - tixNoteBook $w.nb -ipadx 6 -ipady 6 + # tixNoteBook $w.nb -ipadx 6 -ipady 6 - $w.nb add general -label "General" -underline 0 - $w.nb add stl -label "STL" -underline 0 - $w.nb add occ -label "IGES/STEP" -underline 0 - $w.nb add mesh -label "Mesh" -underline 0 - $w.nb add light -label "Light" -underline 0 - $w.nb add edges -label "Edges" -underline 0 - $w.nb add misc -label "Misc." -underline 3 + # $w.nb add general -label "General" -underline 0 + # $w.nb add stl -label "STL" -underline 0 + # $w.nb add occ -label "IGES/STEP" -underline 0 + # $w.nb add mesh -label "Mesh" -underline 0 + # $w.nb add light -label "Light" -underline 0 + # $w.nb add edges -label "Edges" -underline 0 + # $w.nb add misc -label "Misc." -underline 3 - - pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top + # pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top # general - set f [$w.nb subwidget general] + set f $w.nb.general - checkbutton $f.backcol -text "White Background" \ + ttk::checkbutton $f.backcol -text "White Background" \ -variable viewoptions.whitebackground \ -command { Ng_SetVisParameters; redraw } - checkbutton $f.cross -text "Draw Coordinate Cross" \ + ttk::checkbutton $f.cross -text "Draw Coordinate Cross" \ -variable viewoptions.drawcoordinatecross \ -command { Ng_SetVisParameters; redraw } - checkbutton $f.color -text "Draw Color-bar" \ + ttk::checkbutton $f.color -text "Draw Color-bar" \ -variable viewoptions.drawcolorbar \ -command { Ng_SetVisParameters; redraw } - checkbutton $f.netgen -text "Draw Netgen-logo" \ + ttk::checkbutton $f.netgen -text "Draw Netgen-logo" \ -variable viewoptions.drawnetgenlogo \ -command { Ng_SetVisParameters; redraw } @@ -642,8 +767,19 @@ proc viewingoptionsdialog { } { # -command { Ng_SetVisParameters; redraw } # pack $f.stereo + + menu $f.stylemenu + ttk::menubutton $f.style -menu $f.stylemenu + # -text [ttk::getTheme] + pack $f.style + + foreach theme [ttk::themes] { + $f.stylemenu add command -label $theme \ + -command " $f.style configure -text $theme; puts $theme ; ttk::setTheme $theme" + } + # stl geometry - set f [$w.nb subwidget stl] + set f $w.nb.stl frame $f.show -relief groove -borderwidth 3 pack $f.show @@ -747,7 +883,7 @@ proc viewingoptionsdialog { } { # IGES/STEP - set f [$w.nb subwidget occ] + set f $w.nb.occ checkbutton $f.occshowsurfaces -text "Show surfaces " \ -variable occoptions.showsurfaces \ @@ -809,7 +945,7 @@ proc viewingoptionsdialog { } { # mesh options - set f [$w.nb subwidget mesh] + set f $w.nb.mesh checkbutton $f.showcolor -text "Colored Meshsize Visualization" \ -variable viewoptions.colormeshsize \ @@ -960,7 +1096,7 @@ proc viewingoptionsdialog { } { # light options - set f [$w.nb subwidget light] + set f $w.nb.light label $f.lab1 -text "Ambient Light" scale $f.scale1 -orient horizontal -length 300 -from 0 -to 1 \ @@ -990,7 +1126,7 @@ proc viewingoptionsdialog { } { # edges options - set f [$w.nb subwidget edges] + set f $w.nb.edges checkbutton $f.showedges -text "Show Edges" \ -variable viewoptions.drawededges \ @@ -1030,7 +1166,7 @@ proc viewingoptionsdialog { } { # misc options - set f [$w.nb subwidget misc] + set f $w.nb.misc frame $f.point -relief groove -borderwidth 3 @@ -1070,16 +1206,16 @@ proc viewingoptionsdialog { } { - frame $w.bu + ttk::frame $w.bu pack $w.bu -fill x -ipady 3 - button $w.bu.done -text "Done" -command { + ttk::button $w.bu.done -text "Done" -command { Ng_SetVisParameters; redraw destroy .viewopts_dlg } - button $w.bu.apply -text "Apply" -command { + ttk::button $w.bu.apply -text "Apply" -command { Ng_SetVisParameters; redraw } @@ -1677,7 +1813,8 @@ proc stloptionsdialog { } { } { toplevel $w - tixNoteBook $w.nb -ipadx 6 -ipady 6 + pack [ttk::notebook $w.nb] -fill both -fill both -side top + # tixNoteBook $w.nb -ipadx 6 -ipady 6 # $w config -bg gray # $w.nb subwidget nbframe config -backpagecolor gray @@ -1772,22 +1909,25 @@ proc stldoctordialog { } { toplevel $wd - tixNoteBook $wd.nb -ipadx 6 -ipady 6 - - $wd.nb add general -label "General" -underline 0 - $wd.nb add topology -label "Edit Topology" -underline 5 - $wd.nb add edges -label "Edit Edges" -underline 5 - $wd.nb add normals -label "Edit Normals" -underline 5 - $wd.nb add advanced -label "Advanced" -underline 0 - - - pack $wd.nb -expand yes -fill both -padx 5 -pady 5 -side top + pack [ttk::notebook $wd.nb] -fill both -fill both -side top + $wd.nb add [ttk::frame $wd.nb.general] -text "General" -underline 0 + $wd.nb add [ttk::frame $wd.nb.topology] -text "Edit Topology" -underline 5 + $wd.nb add [ttk::frame $wd.nb.edges] -text "Edit Edges" -underline 5 + $wd.nb add [ttk::frame $wd.nb.normals] -text "Edit Normals" -underline 5 + $wd.nb add [ttk::frame $wd.nb.advanced] -text "Advanced" -underline 0 + + # tixNoteBook $wd.nb -ipadx 6 -ipady 6 + # $wd.nb add general -label "General" -underline 0 + # $wd.nb add topology -label "Edit Topology" -underline 5 + # $wd.nb add edges -label "Edit Edges" -underline 5 + # $wd.nb add normals -label "Edit Normals" -underline 5 + # $wd.nb add advanced -label "Advanced" -underline 0 + # pack $wd.nb -expand yes -fill both -padx 5 -pady 5 -side top # GENERAL ***************************** - set f [$wd.nb subwidget general] - + set f $wd.nb.general frame $f.show pack $f.show -fill x @@ -1858,7 +1998,7 @@ proc stldoctordialog { } { pack $f.ge.cancle -expand yes # TOPOLOGY ******************** - set f [$wd.nb subwidget topology] + set f $wd.nb.topology frame $f.oc -relief groove -borderwidth 3 pack $f.oc -fill x @@ -1878,7 +2018,7 @@ proc stldoctordialog { } { # EDGES *********************** - set f [$wd.nb subwidget edges] + set f $wd.nb.edges frame $f.be -relief groove -borderwidth 3 @@ -2030,7 +2170,7 @@ proc stldoctordialog { } { # NORMALS *********************** - set f [$wd.nb subwidget normals] + set f $wd.nb.normals frame $f.dt -relief groove -borderwidth 3 pack $f.dt -fill x @@ -2077,7 +2217,7 @@ proc stldoctordialog { } { # ADVANCED ************************** - set f [$wd.nb subwidget advanced] + set f $wd.nb.advanced frame $f.sc @@ -2101,7 +2241,7 @@ proc stldoctordialog { } { pack $f.gtol button $f.adap -text "Apply" -command { - [.stldoctor_dlg.nb subwidget advanced].gtol invoke + .stldoctor_dlg.nb.advanced.gtol invoke Ng_STLDoctor; } pack $f.adap -expand yes diff --git a/ng/drawing.tcl b/ng/drawing.tcl index bb34b59e..7aa36a3d 100644 --- a/ng/drawing.tcl +++ b/ng/drawing.tcl @@ -9,12 +9,41 @@ set oldmousey 0 # if { 1 } { # use this one for Togl 2.0 -# if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false -create init -display draw -reshape reshape }] } { +#if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } { -if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } { puts "no OpenGL" +# if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false -create init -display draw -reshape reshape }] } { +# puts "no OpenGL" +# } { + +puts "********* query toglversion *******" +set toglversion [Ng_GetToglVersion] +puts "togl-version : $toglversion" + +set toglok 0 +if { [Ng_GetToglVersion] == 2 } { + # Togl 2.x + if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false -create init -display draw -reshape reshape }] } { + puts "no OpenGL" + } { + # puts "have Togl 2.1" + set toglok 1 + } } { + # Togl 1.7 + if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } { + puts "no OpenGL" + } { + # puts "have Togl 1.7" + set toglok 1 + } +} + +if { $toglok == 1} { + puts "***** togl is ok ********" + # pack .ndraw -expand true -fill both -padx 10 -pady 10 + catch { tkdnd::drop_target register .ndraw DND_Files } # bind .ndraw { set oldmousex %x; set oldmousey %y; @@ -115,3 +144,52 @@ bind . \ bind . { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw } + + +# Drop callbacks: +bind .ndraw <> { + #tk_messageBox -message "Dropped files: \"[join %D {, }]\"" + #%W state !active + set index [string first . %D end-6] + #tk_messageBox -message $index + set type [string range %D $index+1 end] + # tk_messageBox -message $type + set ispde [string match -nocase $type "pde"] + set isgeo [expr max([string match -nocase $type "geo"],[string match -nocase $type "in2d"])] + set ismesh [expr max([string match -nocase $type "vol"],[string match -nocase $type "vol.gz"])] + set ispy [string match -nocase $type "py"] + if {$ispde == 1} { + AddRecentNGSFile %D; + NGS_LoadPDE %D; + SetNumProcHelpMenu + set selectvisual mesh; + Ng_SetVisParameters + } + if {$ispy == 1} { + AddRecentPYNGSFile %D; + NGS_LoadPy %D; + } + if {$isgeo == 1} { + AddRecentFile %D; + Ng_LoadGeometry %D; + Ng_ParseGeometry + set selectvisual geometry + Ng_SetVisParameters + redraw + wm title . [concat "$progname - " %D] + set dirname [file dirname %D] + set basefilename [file tail [file rootname %D]] + } + if {$ismesh == 1} { + AddRecentMeshFile %D; + Ng_LoadMesh %D; + set selectvisual mesh + Ng_SetVisParameters + redraw + Ng_ReadStatus; + wm title . [concat "$progname - " %D] + set dirname [file dirname %D] + set basefilename [file tail [file rootname %D]] + } + return %A +} diff --git a/ng/drawing_togl17.tcl b/ng/drawing_togl17.tcl new file mode 100644 index 00000000..be52dfab --- /dev/null +++ b/ng/drawing_togl17.tcl @@ -0,0 +1,166 @@ +# +# Creates a drawing frame, and binds mouse events +# +set oldmousex 0 +set oldmousey 0 +# + + +# if { 1 } { + + +if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } { + puts "no OpenGL" +} { + # + pack .ndraw -expand true -fill both -padx 10 -pady 10 + catch { tkdnd::drop_target register .ndraw DND_Files } + # + bind .ndraw { + set oldmousex %x; set oldmousey %y; + } + bind .ndraw { + set oldmousex %x; set oldmousey %y; + } + bind .ndraw { + set oldmousex %x; set oldmousey %y; + } + bind .ndraw { + Ng_MouseMove $oldmousex $oldmousey %x %y $drawmode + .ndraw render + set oldmousex %x; set oldmousey %y; + } + + bind .ndraw { + Ng_MouseDblClick %x %y + .ndraw render + if { [winfo exists .bcprop_dlg] } { bcpropdialog } + if { [winfo exists .surfacemeshsize_dlg] } { surfacemeshsizedialog } + if { [winfo exists .fieldlines_dlg] } { fieldlinesdialog } + } + + bind .ndraw { + Ng_MouseMove $oldmousex $oldmousey %x %y move + .ndraw render + set oldmousex %x; set oldmousey %y; + } + + bind .ndraw { + if { $tcl_platform(os) == "Darwin" } { + Ng_MouseMove $oldmousex $oldmousey %x %y move + } { + Ng_MouseMove $oldmousex $oldmousey %x %y zoom + } + .ndraw render + set oldmousex %x; set oldmousey %y; + } +} + + +proc popupcheckredraw { vari { x 0 } } { + upvar $vari varname + if { $varname == 1 } { + set varname 0 + } { + # puts "popup-redraw $vari" + Ng_Vis_Set parameters + redraw + } +} +proc popupcheckredraw2 { vari boolvar { x 0 } } { + upvar $vari varname + if { $varname == 1 } { + set varname 0 + } { + Ng_SetVisParameters + Ng_Vis_Set parameters + if { $boolvar == 1 } { redraw } + Ng_SetVisParameters + } +} +proc popupcheckredraw3 { vari { x 0 } } { + upvar $vari varname + if { $varname == 1 } { + set varname 0 + } { + Ng_Vis_Set parameters + } +} + + + + +proc redraw { {x 0} } { + if {[winfo exists .ndraw]} { .ndraw render } +} + + + +bind . { Ng_MouseMove 0 0 -10 0 rotate; redraw } +bind . { Ng_MouseMove 0 0 10 0 rotate; redraw } +bind . { Ng_MouseMove 0 0 0 -10 rotate; redraw } +bind . { Ng_MouseMove 0 0 0 10 rotate; redraw } +bind . { Ng_MouseMove 0 0 -10 0 move; redraw } +bind . { Ng_MouseMove 0 0 10 0 move; redraw } +bind . { Ng_MouseMove 0 0 0 -10 move; redraw } +bind . { Ng_MouseMove 0 0 0 10 move; redraw } +bind . { Ng_MouseMove 0 0 0 -10 zoom; redraw } +bind . { Ng_MouseMove 0 0 0 10 zoom; redraw } + +bind . \ + {event generate [focus -displayof %W] -delta 120} + +bind . \ + {event generate [focus -displayof %W] -delta -120} + +bind . { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw } + + + +# Drop callbacks: +bind .ndraw <> { + #tk_messageBox -message "Dropped files: \"[join %D {, }]\"" + #%W state !active + set index [string first . %D end-6] + #tk_messageBox -message $index + set type [string range %D $index+1 end] + # tk_messageBox -message $type + set ispde [string match -nocase $type "pde"] + set isgeo [expr max([string match -nocase $type "geo"],[string match -nocase $type "in2d"])] + set ismesh [expr max([string match -nocase $type "vol"],[string match -nocase $type "vol.gz"])] + set ispy [string match -nocase $type "py"] + if {$ispde == 1} { + AddRecentNGSFile %D; + NGS_LoadPDE %D; + SetNumProcHelpMenu + set selectvisual mesh; + Ng_SetVisParameters + } + if {$ispy == 1} { + AddRecentPYNGSFile %D; + NGS_LoadPy %D; + } + if {$isgeo == 1} { + AddRecentFile %D; + Ng_LoadGeometry %D; + Ng_ParseGeometry + set selectvisual geometry + Ng_SetVisParameters + redraw + wm title . [concat "$progname - " %D] + set dirname [file dirname %D] + set basefilename [file tail [file rootname %D]] + } + if {$ismesh == 1} { + AddRecentMeshFile %D; + Ng_LoadMesh %D; + set selectvisual mesh + Ng_SetVisParameters + redraw + Ng_ReadStatus; + wm title . [concat "$progname - " %D] + set dirname [file dirname %D] + set basefilename [file tail [file rootname %D]] + } + return %A +} diff --git a/ng/fonts.hpp b/ng/fonts.hpp new file mode 100644 index 00000000..8b28ba26 --- /dev/null +++ b/ng/fonts.hpp @@ -0,0 +1,2357 @@ +#define font12_width 591 +#define font12_height 12 +static unsigned char font12_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x20, 0x01, 0x00, 0x00, 0x00, 0xA1, 0x28, 0x84, 0x44, 0x10, 0x88, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x0E, 0xE1, 0x38, 0xD0, 0xE7, 0x7C, 0x8E, 0x03, + 0x00, 0x00, 0x00, 0x38, 0x8E, 0xF3, 0x38, 0xC7, 0xF7, 0x39, 0x91, 0xC3, + 0x45, 0x41, 0x14, 0x39, 0x8F, 0xF3, 0x38, 0x5F, 0x14, 0x45, 0x51, 0xF4, + 0x39, 0x82, 0xA3, 0x00, 0x00, 0x10, 0x00, 0x10, 0x80, 0x01, 0x01, 0x01, + 0x09, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x84, 0x51, 0x01, 0x00, 0x00, 0x00, 0xA1, 0x28, 0x4E, 0xA5, 0x10, + 0x04, 0x01, 0x00, 0x00, 0x00, 0x40, 0x91, 0x11, 0x45, 0x58, 0x10, 0x40, + 0x51, 0x04, 0x00, 0x10, 0x20, 0x44, 0x51, 0x14, 0x45, 0x49, 0x10, 0x44, + 0x11, 0x81, 0x24, 0xC1, 0x16, 0x45, 0x51, 0x14, 0x45, 0x44, 0x14, 0x45, + 0x51, 0x04, 0x09, 0x02, 0x12, 0x01, 0x00, 0x10, 0x00, 0x10, 0x40, 0x00, + 0x01, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x04, 0x92, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7C, 0x95, + 0xA2, 0x00, 0x02, 0xA2, 0x10, 0x00, 0x00, 0x20, 0x19, 0x11, 0x41, 0x54, + 0x10, 0x40, 0x51, 0x44, 0x10, 0xC8, 0x47, 0x44, 0x59, 0x14, 0x05, 0x51, + 0x10, 0x04, 0x11, 0x81, 0x14, 0x41, 0x35, 0x45, 0x51, 0x14, 0x05, 0x44, + 0x14, 0x45, 0x8A, 0x82, 0x08, 0x04, 0x02, 0x00, 0x80, 0xF3, 0x38, 0x9E, + 0xE3, 0x78, 0x8F, 0x81, 0x49, 0xC4, 0xF3, 0x38, 0x8F, 0xD7, 0x79, 0x4E, + 0x14, 0x45, 0x51, 0xF4, 0x11, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x28, 0x05, 0x42, 0x00, 0x02, 0x42, 0x10, 0x00, 0x00, 0x20, 0x15, 0x01, + 0x31, 0xD2, 0xF3, 0x20, 0x4E, 0x44, 0x10, 0x04, 0x80, 0x20, 0x55, 0xF4, + 0x04, 0xD1, 0xF3, 0x04, 0x1F, 0x81, 0x0C, 0x41, 0x55, 0x45, 0x51, 0x14, + 0x39, 0x44, 0xA4, 0x44, 0x84, 0x42, 0x08, 0x04, 0x02, 0x00, 0x00, 0x14, + 0x45, 0x51, 0x44, 0x44, 0x11, 0x01, 0x29, 0x44, 0x15, 0x45, 0x51, 0x34, + 0x04, 0x44, 0x14, 0x45, 0x4A, 0x84, 0x08, 0x04, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x28, 0x0E, 0x61, 0x01, 0x02, 0xF2, 0x7D, 0xC0, 0x07, 0x10, + 0x13, 0x81, 0x40, 0x11, 0x14, 0x21, 0x91, 0x07, 0x00, 0x02, 0x00, 0x11, + 0xD5, 0x17, 0x05, 0x51, 0x10, 0x74, 0x11, 0x81, 0x0C, 0x41, 0x94, 0x45, + 0x4F, 0xF4, 0x40, 0x44, 0xA4, 0x54, 0x04, 0x21, 0x08, 0x08, 0x02, 0x00, + 0x80, 0x17, 0x05, 0xD1, 0x47, 0x44, 0x11, 0x01, 0x19, 0x44, 0x15, 0x45, + 0x51, 0x14, 0x38, 0x44, 0xA4, 0x54, 0x44, 0x44, 0x10, 0x04, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7C, 0x14, 0x95, 0x00, 0x02, 0x42, 0x10, 0x00, + 0x00, 0x10, 0x11, 0x41, 0x40, 0x1F, 0x14, 0x11, 0x11, 0x04, 0x00, 0xC4, + 0x87, 0x00, 0x59, 0x14, 0x05, 0x51, 0x10, 0x44, 0x11, 0x91, 0x14, 0x41, + 0x14, 0x45, 0x41, 0x54, 0x40, 0x44, 0xA4, 0x54, 0x0A, 0x11, 0x08, 0x08, + 0x02, 0x00, 0x40, 0x14, 0x05, 0x51, 0x40, 0x44, 0x11, 0x01, 0x19, 0x44, + 0x15, 0x45, 0x51, 0x14, 0x40, 0x44, 0xA4, 0x54, 0x44, 0x24, 0x10, 0x04, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, 0x95, 0x9A, 0x00, 0x04, 0xA1, + 0x10, 0x04, 0x40, 0x08, 0x11, 0x21, 0x44, 0x50, 0x14, 0x11, 0x11, 0x44, + 0x10, 0x08, 0x40, 0x10, 0x41, 0x14, 0x45, 0x49, 0x10, 0x44, 0x11, 0x91, + 0x24, 0x41, 0x14, 0x45, 0x41, 0x95, 0x44, 0x44, 0x44, 0x6C, 0x11, 0x11, + 0x08, 0x10, 0x02, 0x00, 0x40, 0x14, 0x45, 0x51, 0x40, 0x44, 0x11, 0x01, + 0x29, 0x44, 0x15, 0x45, 0x51, 0x14, 0x40, 0x44, 0x44, 0x54, 0x4A, 0x14, + 0x10, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, 0x8E, 0x64, 0x01, + 0x88, 0x00, 0x00, 0x04, 0x40, 0x08, 0x8E, 0xF3, 0x39, 0x90, 0xE3, 0x10, + 0x8E, 0x43, 0x10, 0x10, 0x20, 0x10, 0x5E, 0xF4, 0x38, 0xC7, 0x17, 0x38, + 0x91, 0x63, 0x44, 0x5F, 0x14, 0x39, 0x81, 0x13, 0x39, 0x84, 0x43, 0x44, + 0x11, 0xF1, 0x39, 0x90, 0x03, 0x00, 0x80, 0xF7, 0x38, 0x9E, 0x47, 0x78, + 0x91, 0x03, 0x49, 0x4E, 0x15, 0x39, 0x8F, 0x17, 0x3C, 0x98, 0x47, 0x38, + 0x91, 0xF7, 0x61, 0x84, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; +#define font14_width 789 +#define font14_height 14 +static unsigned char font14_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x08, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x36, 0x08, 0x66, + 0x1C, 0x18, 0x30, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3E, 0x18, + 0x3E, 0x3E, 0x60, 0x7F, 0x3C, 0x7F, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3E, 0x3E, 0x3E, 0x3F, 0x3E, 0x1F, 0x7F, 0x7F, 0x3E, 0x63, 0x3C, + 0x78, 0x63, 0x03, 0x41, 0x63, 0x3E, 0x3F, 0x3E, 0x3F, 0x3E, 0xFF, 0x63, + 0x63, 0x63, 0x63, 0xC3, 0x7F, 0x3C, 0x06, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x60, 0x00, 0x78, 0x00, 0x03, 0x18, 0x60, 0x03, 0x1C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x18, 0x0E, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, + 0x36, 0x3E, 0x6B, 0x36, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x63, 0x1C, 0x63, 0x63, 0x70, 0x03, 0x06, 0x60, 0x63, 0x63, 0x00, + 0x00, 0x60, 0x00, 0x06, 0x63, 0x63, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, + 0x63, 0x63, 0x18, 0x30, 0x63, 0x03, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, + 0x63, 0x18, 0x63, 0x63, 0x63, 0x63, 0xC3, 0x60, 0x0C, 0x06, 0x30, 0x66, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x03, 0x18, 0x60, + 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x73, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x36, 0x6B, 0x36, 0x36, 0x00, 0x0C, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x63, 0x1E, 0x63, 0x63, 0x78, 0x03, 0x03, 0x60, + 0x63, 0x63, 0x00, 0x00, 0x30, 0x00, 0x0C, 0x63, 0x73, 0x63, 0x63, 0x63, + 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x33, 0x03, 0x77, 0x63, 0x63, + 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, 0x66, 0x60, 0x0C, + 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, + 0x03, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7F, 0x0B, 0x30, 0x1C, 0x00, 0x0C, + 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x30, 0x73, 0x18, 0x60, 0x60, 0x6C, + 0x03, 0x03, 0x30, 0x63, 0x63, 0x18, 0x18, 0x18, 0x7F, 0x18, 0x63, 0x6B, + 0x63, 0x63, 0x03, 0x63, 0x03, 0x03, 0x03, 0x63, 0x18, 0x30, 0x1B, 0x03, + 0x7F, 0x67, 0x63, 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, + 0x66, 0x30, 0x0C, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x3F, 0x3E, 0x7E, + 0x3E, 0x3F, 0x7E, 0x3F, 0x1C, 0x70, 0x63, 0x18, 0x3F, 0x3F, 0x3E, 0x3F, + 0x7E, 0x7B, 0x7E, 0x3F, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7F, 0x0C, 0x18, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x0B, 0x18, + 0x6E, 0x00, 0x0C, 0x30, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x7B, 0x18, + 0x30, 0x3C, 0x66, 0x3F, 0x3F, 0x30, 0x3E, 0x63, 0x18, 0x18, 0x0C, 0x00, + 0x30, 0x30, 0x6B, 0x63, 0x3F, 0x03, 0x63, 0x1F, 0x1F, 0x03, 0x7F, 0x18, + 0x30, 0x0F, 0x03, 0x6B, 0x6F, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x18, 0x63, + 0x63, 0x63, 0x1C, 0x3C, 0x18, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x63, 0x63, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, + 0x63, 0x63, 0x63, 0x63, 0x0F, 0x03, 0x0C, 0x63, 0x63, 0x63, 0x63, 0x63, + 0x30, 0x06, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x36, 0x3E, 0x18, 0x3B, 0x00, 0x0C, 0x30, 0x7F, 0x7E, 0x00, 0x7F, 0x00, + 0x18, 0x6F, 0x18, 0x18, 0x60, 0x63, 0x60, 0x63, 0x18, 0x63, 0x7E, 0x00, + 0x00, 0x06, 0x00, 0x60, 0x18, 0x6B, 0x7F, 0x63, 0x03, 0x63, 0x03, 0x03, + 0x7B, 0x63, 0x18, 0x30, 0x0F, 0x03, 0x63, 0x7B, 0x63, 0x3F, 0x63, 0x3F, + 0x60, 0x18, 0x63, 0x36, 0x6B, 0x1C, 0x18, 0x0C, 0x0C, 0x18, 0x30, 0x00, + 0x00, 0x00, 0x7E, 0x63, 0x03, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, + 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x07, 0x03, 0x0C, 0x63, 0x63, + 0x6B, 0x36, 0x63, 0x18, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x7F, 0x68, 0x0C, 0x33, 0x00, 0x0C, 0x30, 0x1C, 0x18, + 0x00, 0x00, 0x00, 0x0C, 0x67, 0x18, 0x0C, 0x60, 0x7F, 0x60, 0x63, 0x18, + 0x63, 0x60, 0x00, 0x00, 0x0C, 0x7F, 0x30, 0x18, 0x6B, 0x63, 0x63, 0x03, + 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x1B, 0x03, 0x63, 0x73, 0x63, + 0x03, 0x63, 0x0F, 0x60, 0x18, 0x63, 0x36, 0x7F, 0x36, 0x18, 0x06, 0x0C, + 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, 0x7F, 0x0C, 0x63, + 0x63, 0x18, 0x60, 0x0F, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x3E, + 0x0C, 0x63, 0x36, 0x6B, 0x1C, 0x63, 0x0C, 0x0C, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x68, 0x6C, 0x33, 0x00, 0x0C, + 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x63, 0x18, 0x06, 0x63, 0x60, + 0x60, 0x63, 0x0C, 0x63, 0x60, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x73, + 0x63, 0x63, 0x63, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x33, 0x33, 0x03, + 0x63, 0x63, 0x63, 0x03, 0x63, 0x1B, 0x63, 0x18, 0x63, 0x36, 0x77, 0x36, + 0x18, 0x03, 0x0C, 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, + 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, + 0x63, 0x03, 0x60, 0x0C, 0x63, 0x36, 0x6B, 0x36, 0x63, 0x06, 0x0C, 0x18, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x6B, 0xD6, + 0x3B, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00, 0x18, 0x06, 0x63, 0x18, + 0x03, 0x63, 0x60, 0x63, 0x63, 0x0C, 0x63, 0x30, 0x18, 0x18, 0x30, 0x00, + 0x0C, 0x18, 0x03, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, 0x63, 0x63, 0x18, + 0x33, 0x63, 0x03, 0x63, 0x63, 0x63, 0x03, 0x7B, 0x33, 0x63, 0x18, 0x63, + 0x1C, 0x63, 0x63, 0x18, 0x03, 0x0C, 0x60, 0x30, 0x00, 0x00, 0x00, 0x63, + 0x63, 0x63, 0x63, 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, + 0x63, 0x63, 0x63, 0x63, 0x03, 0x60, 0x0C, 0x63, 0x1C, 0x6B, 0x63, 0x63, + 0x03, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x36, 0x3E, 0x66, 0x6E, 0x00, 0x30, 0x0C, 0x00, 0x00, 0x18, 0x00, 0x18, + 0x06, 0x3E, 0x7E, 0x7F, 0x3E, 0x60, 0x3E, 0x3E, 0x0C, 0x3E, 0x1E, 0x18, + 0x18, 0x60, 0x00, 0x06, 0x18, 0x7E, 0x63, 0x3F, 0x3E, 0x1F, 0x7F, 0x03, + 0x3E, 0x63, 0x3C, 0x1E, 0x63, 0x7F, 0x63, 0x63, 0x3E, 0x03, 0x3E, 0x63, + 0x3E, 0x18, 0x3E, 0x1C, 0x41, 0x63, 0x18, 0x7F, 0x3C, 0x60, 0x3C, 0x00, + 0x00, 0x00, 0x7E, 0x3F, 0x3E, 0x7E, 0x3E, 0x0C, 0x7E, 0x63, 0x3C, 0x66, + 0x63, 0x3C, 0x6B, 0x63, 0x3E, 0x3F, 0x7E, 0x03, 0x3F, 0x78, 0x7E, 0x1C, + 0x3E, 0x63, 0x7E, 0x7F, 0x38, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3E, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +#define font16_width 789 +#define font16_height 16 +static unsigned char font16_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x08, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x36, 0x08, 0x66, + 0x1C, 0x18, 0x30, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3E, 0x18, + 0x3E, 0x3E, 0x60, 0x7F, 0x3C, 0x7F, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3E, 0x3E, 0x3E, 0x3F, 0x3E, 0x1F, 0x7F, 0x7F, 0x3E, 0x63, 0x3C, + 0x78, 0x63, 0x03, 0x41, 0x63, 0x3E, 0x3F, 0x3E, 0x3F, 0x3E, 0xFF, 0x63, + 0x63, 0x63, 0x63, 0xC3, 0x7F, 0x3C, 0x06, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x60, 0x00, 0x78, 0x00, 0x03, 0x18, 0x60, 0x03, 0x1C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x18, 0x0E, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, + 0x36, 0x3E, 0x6B, 0x36, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x63, 0x1C, 0x63, 0x63, 0x70, 0x03, 0x06, 0x60, 0x63, 0x63, 0x00, + 0x00, 0x60, 0x00, 0x06, 0x63, 0x63, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, + 0x63, 0x63, 0x18, 0x30, 0x63, 0x03, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, + 0x63, 0x18, 0x63, 0x63, 0x63, 0x63, 0xC3, 0x60, 0x0C, 0x06, 0x30, 0x66, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x03, 0x18, 0x60, + 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x73, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x36, 0x6B, 0x36, 0x36, 0x00, 0x0C, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x63, 0x1E, 0x63, 0x63, 0x78, 0x03, 0x03, 0x60, + 0x63, 0x63, 0x00, 0x00, 0x30, 0x00, 0x0C, 0x63, 0x73, 0x63, 0x63, 0x63, + 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x33, 0x03, 0x77, 0x63, 0x63, + 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, 0x66, 0x60, 0x0C, + 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, + 0x03, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7F, 0x0B, 0x30, 0x1C, 0x00, 0x0C, + 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x30, 0x73, 0x18, 0x60, 0x60, 0x6C, + 0x03, 0x03, 0x30, 0x63, 0x63, 0x18, 0x18, 0x18, 0x7F, 0x18, 0x63, 0x6B, + 0x63, 0x63, 0x03, 0x63, 0x03, 0x03, 0x03, 0x63, 0x18, 0x30, 0x1B, 0x03, + 0x7F, 0x67, 0x63, 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, + 0x66, 0x30, 0x0C, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x3F, 0x3E, 0x7E, + 0x3E, 0x3F, 0x7E, 0x3F, 0x1C, 0x70, 0x63, 0x18, 0x3F, 0x3F, 0x3E, 0x3F, + 0x7E, 0x7B, 0x7E, 0x3F, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7F, 0x0C, 0x18, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x0B, 0x18, + 0x6E, 0x00, 0x0C, 0x30, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x7B, 0x18, + 0x30, 0x3C, 0x66, 0x3F, 0x3F, 0x30, 0x3E, 0x63, 0x18, 0x18, 0x0C, 0x00, + 0x30, 0x30, 0x6B, 0x63, 0x3F, 0x03, 0x63, 0x1F, 0x1F, 0x03, 0x7F, 0x18, + 0x30, 0x0F, 0x03, 0x6B, 0x6F, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x18, 0x63, + 0x63, 0x63, 0x1C, 0x3C, 0x18, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x63, 0x63, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, + 0x63, 0x63, 0x63, 0x63, 0x0F, 0x03, 0x0C, 0x63, 0x63, 0x63, 0x63, 0x63, + 0x30, 0x06, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x36, 0x3E, 0x18, 0x3B, 0x00, 0x0C, 0x30, 0x7F, 0x7E, 0x00, 0x7F, 0x00, + 0x18, 0x6F, 0x18, 0x18, 0x60, 0x63, 0x60, 0x63, 0x18, 0x63, 0x7E, 0x00, + 0x00, 0x06, 0x00, 0x60, 0x18, 0x6B, 0x7F, 0x63, 0x03, 0x63, 0x03, 0x03, + 0x7B, 0x63, 0x18, 0x30, 0x0F, 0x03, 0x63, 0x7B, 0x63, 0x3F, 0x63, 0x3F, + 0x60, 0x18, 0x63, 0x36, 0x6B, 0x1C, 0x18, 0x0C, 0x0C, 0x18, 0x30, 0x00, + 0x00, 0x00, 0x7E, 0x63, 0x03, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, + 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x07, 0x03, 0x0C, 0x63, 0x63, + 0x6B, 0x36, 0x63, 0x18, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x7F, 0x68, 0x0C, 0x33, 0x00, 0x0C, 0x30, 0x1C, 0x18, + 0x00, 0x00, 0x00, 0x0C, 0x67, 0x18, 0x0C, 0x60, 0x7F, 0x60, 0x63, 0x18, + 0x63, 0x60, 0x00, 0x00, 0x0C, 0x7F, 0x30, 0x18, 0x6B, 0x63, 0x63, 0x03, + 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x1B, 0x03, 0x63, 0x73, 0x63, + 0x03, 0x63, 0x0F, 0x60, 0x18, 0x63, 0x36, 0x7F, 0x36, 0x18, 0x06, 0x0C, + 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, 0x7F, 0x0C, 0x63, + 0x63, 0x18, 0x60, 0x0F, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x3E, + 0x0C, 0x63, 0x36, 0x6B, 0x1C, 0x63, 0x0C, 0x0C, 0x18, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x68, 0x6C, 0x33, 0x00, 0x0C, + 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x63, 0x18, 0x06, 0x63, 0x60, + 0x60, 0x63, 0x0C, 0x63, 0x60, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x73, + 0x63, 0x63, 0x63, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x33, 0x33, 0x03, + 0x63, 0x63, 0x63, 0x03, 0x63, 0x1B, 0x63, 0x18, 0x63, 0x36, 0x77, 0x36, + 0x18, 0x03, 0x0C, 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, + 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, + 0x63, 0x03, 0x60, 0x0C, 0x63, 0x36, 0x6B, 0x36, 0x63, 0x06, 0x0C, 0x18, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x6B, 0xD6, + 0x3B, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00, 0x18, 0x06, 0x63, 0x18, + 0x03, 0x63, 0x60, 0x63, 0x63, 0x0C, 0x63, 0x30, 0x18, 0x18, 0x30, 0x00, + 0x0C, 0x18, 0x03, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, 0x63, 0x63, 0x18, + 0x33, 0x63, 0x03, 0x63, 0x63, 0x63, 0x03, 0x7B, 0x33, 0x63, 0x18, 0x63, + 0x1C, 0x63, 0x63, 0x18, 0x03, 0x0C, 0x60, 0x30, 0x00, 0x00, 0x00, 0x63, + 0x63, 0x63, 0x63, 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, + 0x63, 0x63, 0x63, 0x63, 0x03, 0x60, 0x0C, 0x63, 0x1C, 0x6B, 0x63, 0x63, + 0x03, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x36, 0x3E, 0x66, 0x6E, 0x00, 0x30, 0x0C, 0x00, 0x00, 0x18, 0x00, 0x18, + 0x06, 0x3E, 0x7E, 0x7F, 0x3E, 0x60, 0x3E, 0x3E, 0x0C, 0x3E, 0x1E, 0x18, + 0x18, 0x60, 0x00, 0x06, 0x18, 0x7E, 0x63, 0x3F, 0x3E, 0x1F, 0x7F, 0x03, + 0x3E, 0x63, 0x3C, 0x1E, 0x63, 0x7F, 0x63, 0x63, 0x3E, 0x03, 0x3E, 0x63, + 0x3E, 0x18, 0x3E, 0x1C, 0x41, 0x63, 0x18, 0x7F, 0x3C, 0x60, 0x3C, 0x00, + 0x00, 0x00, 0x7E, 0x3F, 0x3E, 0x7E, 0x3E, 0x0C, 0x7E, 0x63, 0x3C, 0x60, + 0x63, 0x3C, 0x6B, 0x63, 0x3E, 0x3F, 0x7E, 0x03, 0x3F, 0x78, 0x7E, 0x1C, + 0x3E, 0x63, 0x7E, 0x7F, 0x38, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; +#define font18_width 987 +#define font18_height 18 +static unsigned char font18_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0x30, 0x38, 0xC3, 0x03, 0x0C, 0x60, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xFC, 0xC0, 0xC0, 0x0F, + 0x3F, 0x80, 0xF9, 0x87, 0x8F, 0x7F, 0xFC, 0xF0, 0x03, 0x00, 0x00, 0xC0, + 0x00, 0x60, 0x00, 0x1E, 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0x7E, 0xF8, 0xE7, + 0x1F, 0x3F, 0x86, 0xE1, 0x01, 0x9E, 0x61, 0x06, 0x04, 0x64, 0x18, 0x3F, + 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0xFE, 0x19, 0x66, 0xD8, 0x60, 0x86, 0x19, + 0xE6, 0x1F, 0x1E, 0x06, 0xE0, 0xC1, 0x0C, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x1E, 0x00, 0x06, 0xC0, 0x00, 0x8C, 0x01, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x70, 0x60, 0x1B, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0xFC, 0x28, 0x63, + 0x06, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x86, 0xE1, 0x60, 0x98, 0x61, 0xC0, 0x19, 0xC0, 0x80, 0x61, 0x86, 0x19, + 0x06, 0x00, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x33, 0x83, 0x19, 0x66, 0x98, + 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x61, 0x06, + 0x0C, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x61, 0x30, 0x18, 0x66, + 0xD8, 0x60, 0x86, 0x19, 0x06, 0x18, 0x06, 0x06, 0x80, 0x61, 0x18, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0xC0, + 0x00, 0x8C, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, + 0xC0, 0x60, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x33, 0xB6, 0xB9, 0x61, 0x06, 0x00, 0x30, 0xC0, 0x60, 0x0C, 0x0C, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x86, 0xF1, 0x60, 0x98, 0x61, 0xE0, 0x19, 0x60, + 0x80, 0x61, 0x86, 0x19, 0x06, 0x00, 0x00, 0x30, 0x00, 0x80, 0x81, 0x61, + 0x83, 0x19, 0x66, 0x98, 0x61, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x31, 0x06, 0x1C, 0x67, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, + 0x61, 0x30, 0x18, 0x66, 0xD8, 0x60, 0xCC, 0x18, 0x06, 0x18, 0x06, 0x0C, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x03, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x80, 0x7F, 0x36, 0x80, 0x61, 0x06, 0x00, 0x18, 0x80, + 0xC1, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC6, 0xC1, 0x60, 0x18, + 0x60, 0xB0, 0x19, 0x60, 0x00, 0x60, 0x86, 0x19, 0x06, 0x03, 0x0C, 0x18, + 0xF8, 0x07, 0x83, 0x61, 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, + 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x06, 0xBC, 0xE7, 0x98, 0x61, + 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0x66, 0xD8, 0x60, 0xCC, 0x30, + 0x03, 0x0C, 0x06, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0xF0, 0xE3, 0x0F, + 0x3F, 0xFC, 0xF1, 0xC3, 0x0F, 0x7F, 0xFE, 0xE0, 0x00, 0x8E, 0x61, 0x30, + 0xF8, 0xE3, 0x0F, 0x3F, 0xFE, 0xF0, 0x67, 0x1F, 0x3F, 0x7E, 0x18, 0x66, + 0x98, 0x61, 0x86, 0x19, 0xE6, 0x1F, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0x36, 0xC0, 0xC0, + 0x03, 0x00, 0x18, 0x80, 0x81, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, + 0xE6, 0xC1, 0x00, 0x18, 0x60, 0x98, 0x19, 0x60, 0x00, 0x30, 0x86, 0x19, + 0x06, 0x03, 0x0C, 0x0C, 0x00, 0x00, 0x06, 0x60, 0x9B, 0x19, 0x66, 0x98, + 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x06, + 0xEC, 0xE6, 0x99, 0x61, 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0xC6, + 0xCC, 0x60, 0x78, 0x30, 0x03, 0x06, 0x06, 0x18, 0x80, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x81, + 0x61, 0x18, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x18, 0x0C, 0x30, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x33, 0x36, 0xC0, 0xC0, 0x19, 0x00, 0x18, 0x80, 0xF1, 0x9F, 0x7F, 0x00, + 0xF8, 0x07, 0x00, 0x0C, 0xB6, 0xC1, 0x00, 0x0C, 0x3E, 0x8C, 0xF9, 0xE3, + 0x0F, 0x30, 0xFC, 0x18, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x30, + 0x9B, 0x19, 0xE6, 0x8F, 0x01, 0x86, 0xF9, 0xE1, 0x87, 0x01, 0xFE, 0xC1, + 0x00, 0x8C, 0x07, 0x06, 0x4C, 0x66, 0x9B, 0x61, 0x86, 0x19, 0x66, 0x18, + 0x3F, 0x30, 0x18, 0xC6, 0xCC, 0x60, 0x30, 0xE0, 0x01, 0x03, 0x06, 0x18, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x66, 0x98, 0x01, 0x86, 0x19, 0x06, + 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x30, 0xD8, 0x66, 0x98, 0x61, + 0x86, 0x19, 0xE6, 0x80, 0x01, 0x18, 0x18, 0x66, 0x98, 0x61, 0xCC, 0x18, + 0x06, 0x0C, 0x07, 0x30, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x33, 0xFC, 0x60, 0x60, 0x1B, 0x00, 0x18, 0x80, + 0x81, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, 0x9E, 0xC1, 0x00, 0x06, + 0x60, 0x86, 0x01, 0x66, 0x18, 0x18, 0x86, 0xF1, 0x07, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x0C, 0x18, 0x9B, 0xF9, 0x67, 0x98, 0x01, 0x86, 0x19, 0x60, + 0x80, 0x79, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x06, 0x0C, 0x66, 0x9E, 0x61, + 0xFE, 0x18, 0xE6, 0x0F, 0x60, 0x30, 0x18, 0xC6, 0xCC, 0x64, 0x30, 0xC0, + 0x80, 0x01, 0x06, 0x30, 0x80, 0x01, 0x00, 0x00, 0x00, 0xF0, 0x67, 0x98, + 0x01, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x30, + 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x80, 0x01, 0x18, 0x18, 0xC6, + 0x8C, 0x6D, 0x78, 0x18, 0x06, 0x06, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB0, 0x61, 0x30, + 0x0E, 0x00, 0x18, 0x80, 0xC1, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x8E, 0xC1, 0x00, 0x03, 0x60, 0x86, 0x01, 0x66, 0x18, 0x18, 0x86, 0x01, + 0x06, 0x00, 0x00, 0x0C, 0xF8, 0x07, 0x06, 0x0C, 0x9B, 0x19, 0x66, 0x98, + 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x06, + 0x0C, 0x66, 0x9C, 0x61, 0x06, 0x18, 0xE6, 0x01, 0x60, 0x30, 0x18, 0xC6, + 0xCC, 0x6E, 0x78, 0xC0, 0xC0, 0x00, 0x06, 0x30, 0x80, 0x01, 0x00, 0x00, + 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0xF9, 0x07, 0x83, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x07, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, + 0x3F, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x30, 0x18, 0x06, 0x03, 0x0C, 0x30, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x7F, 0xB0, 0x31, 0x30, 0x0C, 0x00, 0x18, 0x80, 0x61, 0x0C, 0x0C, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x86, 0xC1, 0x80, 0x01, 0x60, 0xFE, 0x01, 0x66, + 0x18, 0x0C, 0x86, 0x01, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x0C, + 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, + 0x60, 0x8C, 0x19, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x18, 0x66, 0x03, + 0x60, 0x30, 0x18, 0x86, 0xC7, 0x7B, 0xCC, 0xC0, 0x60, 0x00, 0x06, 0x60, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0x19, 0x00, + 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x30, 0xD8, 0x66, 0x98, 0x61, + 0x86, 0x19, 0x66, 0x00, 0x60, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x78, 0x18, + 0x86, 0x01, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x33, 0xB0, 0xB1, 0x33, 0x0C, 0x00, 0x30, 0xC0, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x86, 0xC1, 0xC0, 0x80, + 0x61, 0x80, 0x19, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x06, 0x03, 0x0C, 0x30, + 0x00, 0x80, 0x01, 0x00, 0x03, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x60, + 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x31, 0x06, 0x0C, 0x66, 0x98, 0x61, + 0x06, 0x18, 0x66, 0x86, 0x61, 0x30, 0x18, 0x86, 0xC7, 0x71, 0xCC, 0xC0, + 0x60, 0x00, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, + 0x01, 0x86, 0x19, 0x00, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x30, + 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x60, 0x18, 0x18, 0x86, + 0x87, 0x6D, 0xCC, 0x18, 0xC6, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB6, 0x99, 0x62, + 0x1E, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x83, 0x01, + 0x86, 0xC1, 0x60, 0x80, 0x61, 0x80, 0x19, 0x66, 0x18, 0x0C, 0x86, 0x01, + 0x03, 0x03, 0x0C, 0x60, 0x00, 0xC0, 0x00, 0x0C, 0x03, 0x18, 0x66, 0x98, + 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x61, 0x06, + 0x0C, 0x66, 0x98, 0x61, 0x06, 0x98, 0x67, 0x8C, 0x61, 0x30, 0x18, 0x06, + 0xC3, 0x60, 0x86, 0xC1, 0x60, 0x00, 0x06, 0xC0, 0x80, 0x01, 0x00, 0x00, + 0x00, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x80, + 0x61, 0x18, 0x18, 0x06, 0x83, 0x6D, 0x86, 0x19, 0x66, 0x00, 0x0C, 0x30, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x33, 0xFC, 0x98, 0xC3, 0x1B, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x83, 0x01, 0xFC, 0xF0, 0xE3, 0x1F, 0x3F, 0x80, 0xF1, 0xC3, + 0x0F, 0x0C, 0xFC, 0xF0, 0x01, 0x00, 0x0C, 0xC0, 0x00, 0x60, 0x00, 0x0C, + 0xFE, 0x19, 0xE6, 0x0F, 0x3F, 0x7E, 0xF8, 0x67, 0x00, 0x3F, 0x86, 0xE1, + 0xC1, 0x87, 0x61, 0xFE, 0x0D, 0x66, 0x18, 0x3F, 0x06, 0xF0, 0x63, 0x18, + 0x3F, 0x30, 0xF0, 0x03, 0x43, 0x40, 0x86, 0xC1, 0xE0, 0x1F, 0x1E, 0xC0, + 0xE0, 0x01, 0x00, 0x00, 0x00, 0xF0, 0xE7, 0x0F, 0x3F, 0xFC, 0xF1, 0x03, + 0x03, 0x7F, 0x86, 0xE1, 0x01, 0x8C, 0x61, 0x78, 0xD8, 0x66, 0x18, 0x3F, + 0xFE, 0xF0, 0x67, 0x00, 0x3F, 0xF0, 0xF0, 0x07, 0x03, 0x3F, 0x86, 0xF1, + 0xE7, 0x1F, 0x38, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; +#define font20_width 987 +#define font20_height 20 +static unsigned char font20_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0x30, 0x00, 0xC0, 0x03, 0x0C, 0x60, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xC0, 0xC0, 0x0F, + 0x3F, 0x80, 0xF9, 0x87, 0x8F, 0x7F, 0xFC, 0xF0, 0x03, 0x00, 0x00, 0x80, + 0x01, 0x60, 0x00, 0x1E, 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0x7E, 0xF8, 0xE7, + 0x1F, 0x3F, 0x86, 0xE1, 0x01, 0x9E, 0x61, 0x06, 0x04, 0x64, 0x18, 0x3F, + 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0xFE, 0x19, 0x66, 0xD8, 0x60, 0x86, 0x19, + 0xE6, 0x1F, 0x1E, 0x00, 0xE0, 0xC1, 0x0C, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x1E, 0x00, 0x06, 0xC0, 0x00, 0x8C, 0x01, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x70, 0x60, 0x1B, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0xFC, 0x38, 0x63, + 0x06, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x86, 0xE1, 0x60, 0x98, 0x61, 0xC0, 0x19, 0xC0, 0x80, 0x61, 0x86, 0x19, + 0x06, 0x00, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x33, 0x83, 0x19, 0x66, 0x98, + 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x61, 0x06, + 0x0C, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x61, 0x30, 0x18, 0x66, + 0xD8, 0x60, 0x86, 0x19, 0x06, 0x18, 0x06, 0x06, 0x80, 0x61, 0x18, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0xC0, + 0x00, 0x8C, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, + 0xC0, 0x60, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x33, 0xB6, 0x29, 0x63, 0x06, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x86, 0xF1, 0x60, 0x98, 0x61, 0xE0, 0x19, 0x60, + 0x80, 0x61, 0x86, 0x19, 0x06, 0x00, 0x00, 0x60, 0x00, 0x80, 0x81, 0x61, + 0x83, 0x19, 0x66, 0x98, 0x61, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x31, 0x06, 0x1C, 0x67, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, + 0x61, 0x30, 0x18, 0x66, 0xD8, 0x60, 0x86, 0x19, 0x06, 0x18, 0x06, 0x06, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x03, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x33, 0x36, 0xB8, 0x61, 0x06, 0x00, 0x18, 0x80, + 0x61, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x86, 0xC1, 0x60, 0x18, + 0x60, 0xB0, 0x19, 0x60, 0x00, 0x60, 0x86, 0x19, 0x06, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x83, 0x61, 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, + 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x06, 0xBC, 0x67, 0x98, 0x61, + 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0x66, 0xD8, 0x60, 0xCC, 0x30, + 0x03, 0x18, 0x06, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0x7F, 0x36, 0x80, 0xC1, + 0x03, 0x00, 0x18, 0x80, 0xC1, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, + 0xC6, 0xC1, 0x00, 0x18, 0x60, 0x98, 0x19, 0x60, 0x00, 0x30, 0x86, 0x19, + 0x06, 0x03, 0x0C, 0x18, 0xF8, 0x07, 0x06, 0x60, 0x9B, 0x19, 0x66, 0x98, + 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x06, + 0xEC, 0xE6, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0x66, + 0xD8, 0x60, 0xCC, 0x30, 0x03, 0x0C, 0x06, 0x0C, 0x80, 0x01, 0x00, 0x00, + 0x00, 0xF0, 0xE3, 0x0F, 0x3F, 0xFC, 0xF1, 0xC3, 0x0F, 0x7F, 0xFE, 0xE0, + 0x00, 0x8E, 0x61, 0x30, 0xF8, 0xE3, 0x0F, 0x3F, 0xFE, 0xF0, 0x67, 0x1F, + 0x3F, 0x7E, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x1F, 0x0C, 0x30, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x33, 0x36, 0xC0, 0x80, 0x01, 0x00, 0x18, 0x80, 0x81, 0x03, 0x0C, 0x00, + 0x00, 0x00, 0x00, 0x0C, 0xE6, 0xC1, 0x00, 0x18, 0x60, 0x8C, 0xF9, 0xE3, + 0x0F, 0x30, 0x86, 0x19, 0x06, 0x03, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x30, + 0x9B, 0x19, 0xE6, 0x8F, 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, + 0x00, 0x8C, 0x07, 0x06, 0x4C, 0xE6, 0x99, 0x61, 0x86, 0x19, 0x66, 0x98, + 0x01, 0x30, 0x18, 0xC6, 0xCC, 0x60, 0x78, 0x30, 0x03, 0x06, 0x06, 0x18, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, + 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, + 0x86, 0x19, 0xE6, 0x81, 0x61, 0x18, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, + 0x06, 0x18, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x33, 0xFC, 0xC0, 0xC0, 0x19, 0x00, 0x18, 0x80, + 0xF1, 0x9F, 0x7F, 0x00, 0xF8, 0x07, 0x00, 0x0C, 0xB6, 0xC1, 0x00, 0x0C, + 0x3E, 0x86, 0x01, 0x66, 0x18, 0x18, 0xFC, 0x18, 0x06, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x18, 0x18, 0x9B, 0xF9, 0x67, 0x98, 0x01, 0x86, 0xF9, 0xE1, + 0x87, 0x79, 0xFE, 0xC1, 0x00, 0x8C, 0x03, 0x06, 0x0C, 0x66, 0x9B, 0x61, + 0xFE, 0x18, 0xE6, 0x0F, 0x3F, 0x30, 0x18, 0xC6, 0xCC, 0x60, 0x30, 0xE0, + 0x01, 0x03, 0x06, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x66, 0x98, + 0x01, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x30, + 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x80, 0x01, 0x18, 0x18, 0x66, + 0x98, 0x61, 0xCC, 0x18, 0x06, 0x0C, 0x07, 0x30, 0x80, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB0, 0x61, 0x60, + 0x1B, 0x00, 0x18, 0x80, 0x81, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x9E, 0xC1, 0x00, 0x06, 0x60, 0x86, 0x01, 0x66, 0x18, 0x18, 0x86, 0xF1, + 0x07, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x9B, 0x19, 0x66, 0x98, + 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x06, + 0x0C, 0x66, 0x9E, 0x61, 0x06, 0x18, 0xE6, 0x01, 0x60, 0x30, 0x18, 0xC6, + 0xCC, 0x64, 0x78, 0xC0, 0x80, 0x01, 0x06, 0x30, 0x80, 0x01, 0x00, 0x00, + 0x00, 0xF0, 0x67, 0x98, 0x01, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x0D, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x80, + 0x01, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x78, 0x18, 0x06, 0x06, 0x0C, 0x30, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, + 0x7F, 0xB0, 0x61, 0x30, 0x0E, 0x00, 0x18, 0x80, 0xC1, 0x06, 0x0C, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x8E, 0xC1, 0x00, 0x03, 0x60, 0x86, 0x01, 0x66, + 0x18, 0x0C, 0x86, 0x01, 0x06, 0x00, 0x00, 0x18, 0xF8, 0x07, 0x06, 0x0C, + 0x9B, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x0D, 0x06, 0x0C, 0x66, 0x9C, 0x61, 0x06, 0x18, 0x66, 0x03, + 0x60, 0x30, 0x18, 0xC6, 0xCC, 0x6E, 0xCC, 0xC0, 0xC0, 0x00, 0x06, 0x30, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0xF9, 0x07, + 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x30, 0xD8, 0x66, 0x98, 0x61, + 0x86, 0x19, 0x66, 0x00, 0x3F, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x30, 0x18, + 0x06, 0x03, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x33, 0xB0, 0x31, 0x30, 0x0C, 0x00, 0x18, 0x80, + 0x61, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x03, 0x86, 0xC1, 0x80, 0x01, + 0x60, 0xFE, 0x01, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x06, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x03, 0x00, 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, + 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x19, 0x06, 0x0C, 0x66, 0x98, 0x61, + 0x06, 0x18, 0x66, 0x06, 0x60, 0x30, 0x18, 0x86, 0xC7, 0x7B, 0xCC, 0xC0, + 0x60, 0x00, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, + 0x01, 0x86, 0x19, 0x00, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x30, + 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x60, 0x18, 0x18, 0xC6, + 0x8C, 0x6D, 0x78, 0x18, 0x86, 0x01, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0xB6, 0xB1, 0x33, + 0x0C, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, + 0x86, 0xC1, 0xC0, 0x80, 0x61, 0x80, 0x19, 0x66, 0x18, 0x0C, 0x86, 0x01, + 0x06, 0x03, 0x0C, 0x60, 0x00, 0x80, 0x01, 0x00, 0x03, 0x18, 0x66, 0x98, + 0x61, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x31, 0x06, + 0x0C, 0x66, 0x98, 0x61, 0x06, 0x18, 0x66, 0x8C, 0x61, 0x30, 0x18, 0x86, + 0xC7, 0x71, 0x86, 0xC1, 0x60, 0x00, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, + 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0x19, 0x00, 0x83, 0x61, 0x86, 0xC1, + 0x00, 0x8C, 0x19, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, + 0x60, 0x18, 0x18, 0x86, 0x87, 0x6D, 0xCC, 0x18, 0xC6, 0x00, 0x0C, 0x30, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x33, 0xFC, 0x98, 0x62, 0x1E, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x83, 0x01, 0x86, 0xC1, 0x60, 0x80, 0x61, 0x80, 0x19, 0x66, + 0x18, 0x0C, 0x86, 0x01, 0x03, 0x03, 0x0C, 0xC0, 0x00, 0xC0, 0x00, 0x0C, + 0x03, 0x18, 0x66, 0x98, 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, + 0x60, 0x8C, 0x61, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x98, 0x67, 0x98, + 0x61, 0x30, 0x18, 0x06, 0xC3, 0x60, 0x86, 0xC1, 0x60, 0x00, 0x06, 0xC0, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, + 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, + 0x86, 0x19, 0x66, 0x80, 0x61, 0x18, 0x18, 0x06, 0x83, 0x6D, 0x86, 0x19, + 0x66, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x33, 0x30, 0x98, 0xC3, 0x1B, 0x00, 0x60, 0x60, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x83, 0x01, 0xFC, 0xF0, 0xE3, 0x1F, + 0x3F, 0x80, 0xF1, 0xC3, 0x0F, 0x0C, 0xFC, 0xF0, 0x01, 0x00, 0x0C, 0x80, + 0x01, 0x60, 0x00, 0x0C, 0xFE, 0x19, 0xE6, 0x0F, 0x3F, 0x7E, 0xF8, 0x67, + 0x00, 0x3F, 0x86, 0xE1, 0xC1, 0x87, 0x61, 0xFE, 0x0D, 0x66, 0x18, 0x3F, + 0x06, 0xF0, 0x63, 0x18, 0x3F, 0x30, 0xF0, 0x03, 0x43, 0x40, 0x86, 0xC1, + 0xE0, 0x1F, 0x1E, 0xC0, 0xE0, 0x01, 0x00, 0x00, 0x00, 0xF0, 0xE7, 0x0F, + 0x3F, 0xFC, 0xF1, 0x03, 0x03, 0x7F, 0x86, 0xE1, 0x01, 0x8C, 0x61, 0x78, + 0xD8, 0x66, 0x18, 0x3F, 0xFE, 0xF0, 0x67, 0x00, 0x3F, 0xF0, 0xF0, 0x07, + 0x03, 0x3F, 0x86, 0xF1, 0xE7, 0x1F, 0x38, 0x30, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +#define font22_width 1086 +#define font22_height 22 +static unsigned char font22_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x70, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x01, 0x33, 0x98, 0x01, 0x03, 0xC7, 0xF0, 0x01, 0x06, 0xC0, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xF8, 0x00, + 0x03, 0x3E, 0xF0, 0x01, 0x30, 0xFF, 0xE1, 0xC7, 0x7F, 0xF8, 0xC0, 0x07, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1F, 0xFC, 0xC0, 0x87, 0x3F, + 0xF0, 0xE1, 0x0F, 0xFF, 0xF9, 0x0F, 0x1F, 0x06, 0xE3, 0x07, 0xF8, 0x0D, + 0x66, 0x80, 0x00, 0x19, 0x0C, 0x1F, 0xFE, 0xC0, 0x87, 0x3F, 0xF0, 0xF1, + 0x3F, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x1B, 0x98, 0xFF, 0xF0, 0x61, 0x00, + 0x7C, 0x60, 0x03, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x30, 0x00, + 0x80, 0x0F, 0x00, 0x06, 0x00, 0x03, 0x60, 0x18, 0x80, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x03, 0x0E, 0x98, 0x0D, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x33, 0x98, 0xC1, 0x8F, 0xCD, + 0x18, 0x03, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x8C, 0x81, 0x03, 0x63, 0x18, 0x03, 0x38, 0x03, 0x30, 0xC0, + 0x60, 0x8C, 0x61, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x30, 0x80, 0x31, + 0x86, 0x61, 0x8C, 0x61, 0x18, 0x63, 0x18, 0x03, 0x18, 0x80, 0x31, 0x06, + 0x83, 0x01, 0x60, 0x0C, 0x66, 0x80, 0x81, 0x19, 0x8C, 0x31, 0x86, 0x61, + 0x8C, 0x61, 0x18, 0x03, 0x03, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x1B, 0x18, + 0xC0, 0x30, 0x60, 0x00, 0x60, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, + 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x06, 0x00, 0x03, 0x60, 0x18, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x03, + 0x18, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x33, + 0x98, 0x61, 0x9B, 0x6D, 0x18, 0x03, 0x06, 0x30, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0xC3, 0x83, 0xC1, 0x0C, 0x06, + 0x3C, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x33, 0x18, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x60, 0xC0, 0x60, 0x03, 0x33, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, + 0x18, 0xC0, 0x60, 0x06, 0x83, 0x01, 0x60, 0x0C, 0x63, 0x80, 0xC3, 0x19, + 0xCC, 0x60, 0x06, 0x33, 0x98, 0xC1, 0x0C, 0x06, 0x03, 0x83, 0x19, 0x6C, + 0x60, 0x8C, 0x31, 0x0C, 0xC0, 0x30, 0xC0, 0x00, 0x60, 0x18, 0x0C, 0x00, + 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x06, + 0x00, 0x03, 0x60, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x98, 0x31, 0x33, 0x67, 0x18, 0x03, 0x00, 0x30, + 0x00, 0x83, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x63, + 0x83, 0xC1, 0x00, 0x06, 0x36, 0x03, 0x18, 0x00, 0x60, 0x06, 0x33, 0x18, + 0x0C, 0x60, 0x00, 0x03, 0x00, 0xC0, 0xC0, 0x60, 0xE3, 0x33, 0x98, 0xC1, + 0x0C, 0x66, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x01, 0x60, 0x8C, + 0x61, 0x80, 0xE7, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0xC1, 0x0C, 0x00, + 0x03, 0x83, 0x19, 0x6C, 0x60, 0x8C, 0x31, 0x0C, 0xC0, 0x30, 0xC0, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x30, 0x00, + 0xC0, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xFE, 0x37, 0x03, 0x30, + 0xB0, 0x01, 0x00, 0x18, 0x00, 0x06, 0x33, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0C, 0x86, 0x03, 0x83, 0xC1, 0x00, 0x06, 0x33, 0x03, 0x18, 0x00, + 0x30, 0x06, 0x33, 0x18, 0x0C, 0x60, 0x80, 0x01, 0xFF, 0x81, 0x01, 0x60, + 0x33, 0x33, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x00, 0x06, + 0x83, 0x01, 0x60, 0xCC, 0x60, 0x80, 0xBD, 0x39, 0xCC, 0x60, 0x06, 0x33, + 0x98, 0xC1, 0x0C, 0x00, 0x03, 0x83, 0x19, 0x6C, 0x60, 0xD8, 0x60, 0x06, + 0x60, 0x30, 0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x87, 0x3F, + 0xF0, 0x81, 0x3F, 0x7C, 0xF8, 0x07, 0x7F, 0xFE, 0xC0, 0x03, 0x78, 0x18, + 0x06, 0x86, 0x7F, 0xF8, 0x03, 0x1F, 0xFE, 0xC0, 0x9F, 0xF9, 0xF8, 0xE3, + 0x1F, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x33, 0x98, 0xFF, 0x60, 0x00, 0x03, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x98, 0x31, 0x03, 0x30, 0xE0, 0x00, 0x00, 0x18, 0x00, 0x06, 0x1E, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x03, 0x03, 0xC0, 0x00, 0x83, + 0x31, 0x7F, 0xF8, 0x03, 0x30, 0x8C, 0x31, 0x18, 0x0C, 0x60, 0xC0, 0x00, + 0x00, 0x00, 0x03, 0x30, 0x1B, 0x33, 0x98, 0x61, 0x0C, 0x60, 0x30, 0x03, + 0x18, 0xC0, 0x00, 0x06, 0x83, 0x01, 0x60, 0x6C, 0x60, 0x80, 0x99, 0x79, + 0xCC, 0x60, 0x06, 0x33, 0x98, 0xC1, 0x18, 0x00, 0x03, 0x83, 0x31, 0x66, + 0x60, 0xD8, 0x60, 0x06, 0x30, 0x30, 0x80, 0x01, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x8C, 0x61, 0x18, 0xC3, 0x30, 0xC6, 0xC0, 0x80, 0x61, 0x86, + 0x01, 0x03, 0x60, 0x18, 0x03, 0x86, 0xD9, 0x18, 0x86, 0x31, 0x86, 0x61, + 0x98, 0x0D, 0x0C, 0x06, 0x03, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x33, 0x18, + 0xC0, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x98, 0x61, 0x03, 0x18, 0xF0, 0x00, 0x00, 0x18, + 0x00, 0x06, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0x03, + 0x03, 0x60, 0xE0, 0xC1, 0x30, 0xC0, 0x18, 0x06, 0x18, 0xF8, 0x30, 0x18, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x18, 0x1B, 0x33, 0x98, 0x3F, + 0x0C, 0x60, 0x30, 0x7F, 0xF8, 0xC3, 0x00, 0xFE, 0x83, 0x01, 0x60, 0x3C, + 0x60, 0x80, 0x81, 0xD9, 0xCC, 0x60, 0x86, 0x31, 0x98, 0x61, 0xF0, 0x01, + 0x03, 0x83, 0x31, 0x66, 0x60, 0x70, 0xC0, 0x03, 0x18, 0x30, 0x00, 0x03, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x83, + 0xC1, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0x98, 0x01, 0x86, 0x99, 0x19, + 0xCC, 0x60, 0x06, 0x33, 0x98, 0x07, 0x0C, 0x00, 0x03, 0x83, 0x19, 0x6C, + 0x60, 0x8C, 0x31, 0x18, 0x60, 0x38, 0x00, 0x03, 0xE0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0xC1, 0x0F, 0x18, + 0x98, 0x0D, 0x00, 0x18, 0x00, 0xC6, 0xFF, 0xFE, 0x07, 0x00, 0xFF, 0x01, + 0x00, 0x06, 0x36, 0x03, 0x03, 0x30, 0x00, 0x63, 0x30, 0x80, 0x19, 0x0C, + 0x18, 0x8C, 0x61, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x0C, + 0x1B, 0xF3, 0x9F, 0x61, 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x7C, 0x06, + 0x83, 0x01, 0x60, 0x3C, 0x60, 0x80, 0x81, 0x99, 0xCD, 0x60, 0xFE, 0x30, + 0x98, 0x3F, 0x00, 0x03, 0x03, 0x83, 0x31, 0x66, 0x66, 0x70, 0xC0, 0x03, + 0x0C, 0x30, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xC1, + 0x0C, 0x60, 0x30, 0x83, 0xC1, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0xD8, + 0x00, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x03, 0x0C, 0x00, + 0x03, 0x83, 0x31, 0x66, 0x66, 0xD8, 0x30, 0x18, 0x30, 0x60, 0x00, 0x03, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x98, 0x01, 0x1B, 0x0C, 0x0C, 0x0F, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1E, 0x03, 0x03, 0x18, 0x00, 0x66, + 0x30, 0x80, 0x19, 0x0C, 0x0C, 0x06, 0xC3, 0x1F, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x03, 0x0C, 0x1B, 0x33, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, + 0x18, 0xC0, 0x60, 0x06, 0x83, 0x01, 0x60, 0x6C, 0x60, 0x80, 0x81, 0x19, + 0xCF, 0x60, 0x06, 0x30, 0x98, 0x07, 0x00, 0x06, 0x03, 0x83, 0x31, 0x66, + 0x66, 0xD8, 0x80, 0x01, 0x06, 0x30, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, + 0x00, 0xE0, 0x9F, 0xC1, 0x0C, 0x60, 0x30, 0xFF, 0xC1, 0xC0, 0x60, 0x06, + 0x03, 0x03, 0x60, 0x78, 0x00, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, + 0x98, 0x01, 0xF8, 0x03, 0x03, 0x83, 0x31, 0x66, 0x66, 0x70, 0x30, 0x18, + 0x18, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFE, 0x07, 0x33, 0x0C, 0x0C, 0x06, 0x00, 0x18, + 0x00, 0x06, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x03, + 0x03, 0x0C, 0x00, 0x66, 0x30, 0x80, 0x19, 0x0C, 0x0C, 0x06, 0x03, 0x18, + 0x00, 0x00, 0x80, 0x01, 0xFF, 0x81, 0x01, 0x00, 0x33, 0x33, 0x98, 0xC1, + 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x81, 0x61, 0xCC, + 0x60, 0x80, 0x81, 0x19, 0xCE, 0x60, 0x06, 0x30, 0x98, 0x0D, 0x00, 0x06, + 0x03, 0x83, 0x61, 0x63, 0x6F, 0xD8, 0x80, 0x01, 0x03, 0x30, 0x00, 0x06, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, + 0xC0, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0x78, 0x00, 0x86, 0x99, 0x19, + 0xCC, 0x60, 0x06, 0x33, 0x98, 0x01, 0x00, 0x06, 0x03, 0x83, 0x31, 0x66, + 0x66, 0x70, 0x30, 0x18, 0x0C, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x01, 0x33, 0xE6, + 0x0C, 0x06, 0x00, 0x30, 0x00, 0x03, 0x33, 0x60, 0x00, 0x03, 0x00, 0x00, + 0x80, 0x01, 0x06, 0x03, 0x03, 0x06, 0x00, 0xE6, 0x3F, 0x83, 0x19, 0x0C, + 0x06, 0x06, 0x03, 0x18, 0x0C, 0x60, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, + 0xE3, 0x33, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, + 0x83, 0x81, 0x61, 0x8C, 0x61, 0x80, 0x81, 0x19, 0xCC, 0x60, 0x06, 0x30, + 0x98, 0x19, 0x00, 0x06, 0x03, 0x83, 0x61, 0xE3, 0x79, 0x8C, 0x81, 0x81, + 0x01, 0x30, 0x00, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x98, 0xC1, + 0x0C, 0x60, 0x30, 0x03, 0xC0, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0xD8, + 0x00, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x01, 0x00, 0x06, + 0x03, 0x83, 0x61, 0x63, 0x66, 0xD8, 0x30, 0x18, 0x06, 0x60, 0x00, 0x03, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x98, 0x31, 0x33, 0xB6, 0x0D, 0x06, 0x00, 0x30, 0x00, 0x83, 0x61, 0x60, + 0x00, 0x03, 0x00, 0xC0, 0x80, 0x01, 0x06, 0x03, 0x03, 0x03, 0x0C, 0x06, + 0x30, 0x83, 0x19, 0x0C, 0x06, 0x06, 0x03, 0x18, 0x0C, 0x60, 0x00, 0x06, + 0x00, 0x60, 0x00, 0x0C, 0x03, 0x30, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, + 0x18, 0xC0, 0x60, 0x06, 0x83, 0x81, 0x61, 0x0C, 0x63, 0x80, 0x81, 0x19, + 0xCC, 0x60, 0x06, 0x30, 0x98, 0x31, 0x0C, 0x06, 0x03, 0x83, 0xC1, 0xE1, + 0x70, 0x8C, 0x81, 0x81, 0x01, 0x30, 0x00, 0x0C, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, 0xC0, 0xC0, 0x60, 0x06, + 0x03, 0x03, 0x60, 0x98, 0x01, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, + 0x98, 0x01, 0x00, 0x06, 0x03, 0x83, 0x61, 0x63, 0x66, 0x8C, 0x31, 0x18, + 0x03, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x98, 0x61, 0x1B, 0xB3, 0x19, 0x0F, 0x00, 0x60, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0xC0, 0xC0, 0x00, 0x8C, 0x01, + 0x83, 0x01, 0x18, 0x03, 0x30, 0xC6, 0x30, 0x06, 0x06, 0x8C, 0x01, 0x0C, + 0x0C, 0x60, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x0C, 0x06, 0x30, 0x98, 0x61, + 0x18, 0x63, 0x18, 0x03, 0x18, 0x80, 0x31, 0x06, 0x83, 0x01, 0x33, 0x0C, + 0x66, 0x80, 0x81, 0x19, 0x8C, 0x31, 0x06, 0x60, 0x8F, 0x61, 0x18, 0x03, + 0x03, 0xC6, 0xC0, 0x61, 0x60, 0x06, 0x83, 0x81, 0x01, 0x30, 0x00, 0x18, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x98, 0x61, 0x18, 0xC3, 0x30, 0x86, + 0xC1, 0x80, 0x61, 0x06, 0x03, 0x03, 0x60, 0x18, 0x03, 0x86, 0x99, 0x19, + 0x8C, 0x31, 0x86, 0x61, 0x98, 0x01, 0x0C, 0x06, 0x03, 0x86, 0xC1, 0x61, + 0x66, 0x06, 0x63, 0x98, 0x01, 0xC0, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0xC1, 0x0F, 0xE3, + 0xF0, 0x0D, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xC0, + 0xC0, 0x00, 0xF8, 0xE0, 0x9F, 0xFF, 0xF0, 0x01, 0x30, 0x7C, 0xE0, 0x03, + 0x06, 0xF8, 0xE0, 0x07, 0x00, 0x60, 0x00, 0x18, 0x00, 0x18, 0x00, 0x0C, + 0xFC, 0x33, 0x98, 0x3F, 0xF0, 0xE1, 0x0F, 0xFF, 0x19, 0x00, 0x1F, 0x06, + 0xE3, 0x07, 0x1E, 0x0C, 0xE6, 0xBF, 0x81, 0x19, 0x0C, 0x1F, 0x06, 0xC0, + 0x87, 0xC1, 0xF0, 0x01, 0x03, 0x7C, 0xC0, 0x21, 0x40, 0x06, 0x83, 0x81, + 0xFF, 0xF0, 0x01, 0x18, 0x7C, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x9F, 0x3F, + 0xF0, 0x81, 0x3F, 0xFC, 0xC0, 0x00, 0x7F, 0x06, 0xC3, 0x0F, 0x60, 0x18, + 0x86, 0x9F, 0x99, 0x19, 0x0C, 0x1F, 0xFE, 0xC0, 0x9F, 0x01, 0xF8, 0x03, + 0x3E, 0xFC, 0xC1, 0xC1, 0x3F, 0x06, 0xC3, 0x9F, 0xFF, 0x80, 0x03, 0x03, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, + 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; +#define font24_width 1185 +#define font24_height 24 +static unsigned char font24_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x01, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x98, + 0x81, 0x19, 0x60, 0x00, 0x00, 0x70, 0x00, 0x06, 0xC0, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x06, 0xF8, + 0x81, 0x1F, 0x00, 0xE6, 0x7F, 0xF8, 0xE3, 0x7F, 0xF8, 0x81, 0x1F, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x80, 0x1F, 0xFC, 0x81, 0x1F, 0xFE, + 0x81, 0x1F, 0xFE, 0xE1, 0x7F, 0xFE, 0x87, 0x1F, 0x06, 0x86, 0x1F, 0xC0, + 0x6F, 0x60, 0x06, 0x10, 0x40, 0x06, 0x86, 0x1F, 0xFE, 0x81, 0x1F, 0xFE, + 0x81, 0x1F, 0xFE, 0x67, 0x60, 0x06, 0x36, 0x60, 0x06, 0x66, 0x60, 0xFE, + 0x87, 0x0F, 0x00, 0x80, 0x0F, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, + 0xC3, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1C, 0x60, 0xC0, 0x01, 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x98, 0x81, 0x19, 0xF8, 0xC1, 0x31, 0xD8, 0x00, + 0x06, 0x60, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x0C, 0x03, 0x07, 0x0C, 0xC3, 0x30, 0x00, 0x67, 0x00, 0x0C, 0x60, + 0x60, 0x0C, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0C, 0xC0, + 0x30, 0x06, 0xC3, 0x30, 0x06, 0xC3, 0x30, 0x06, 0x63, 0x00, 0x06, 0xC0, + 0x30, 0x06, 0x06, 0x06, 0x00, 0x63, 0x30, 0x06, 0x30, 0x60, 0x06, 0xC6, + 0x30, 0x06, 0xC3, 0x30, 0x06, 0xC3, 0x30, 0x60, 0x60, 0x60, 0x06, 0x36, + 0x60, 0x06, 0x66, 0x60, 0x00, 0x86, 0x01, 0x0C, 0x00, 0x0C, 0x0C, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, + 0x00, 0x06, 0x00, 0x06, 0x00, 0xC3, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x03, 0xC6, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x98, 0x81, 0x19, + 0x6C, 0x63, 0x33, 0x8C, 0x01, 0x06, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x86, 0x07, 0x06, 0x66, 0x60, + 0x80, 0x67, 0x00, 0x06, 0x60, 0x60, 0x06, 0x66, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x18, 0x60, 0x60, 0x03, 0x66, 0x60, 0x06, 0x66, 0x60, + 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0x63, 0x18, + 0x06, 0x70, 0x70, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, + 0x60, 0x60, 0x60, 0x06, 0x36, 0x60, 0x0C, 0xC3, 0x30, 0x00, 0x86, 0x01, + 0x0C, 0x00, 0x0C, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xC3, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x80, 0x19, 0x66, 0x66, 0x1B, 0x8C, 0x01, 0x00, 0x30, + 0x00, 0x06, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, + 0xC6, 0x06, 0x06, 0x06, 0x60, 0xC0, 0x66, 0x00, 0x06, 0x00, 0x60, 0x06, + 0x66, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x30, 0x60, 0x60, 0xC3, + 0x67, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, + 0x06, 0x06, 0x00, 0x63, 0x0C, 0x06, 0xF0, 0x78, 0x06, 0x66, 0x60, 0x06, + 0x66, 0x60, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x06, 0x36, 0x60, 0x0C, + 0xC3, 0x30, 0x00, 0x86, 0x01, 0x18, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0xE0, 0x7F, 0x66, 0xC0, + 0x19, 0x8C, 0x01, 0x00, 0x18, 0x00, 0x0C, 0x8C, 0x01, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x06, 0x07, 0x06, 0x06, 0x06, 0x60, 0x60, 0x66, + 0x00, 0x06, 0x00, 0x30, 0x06, 0x66, 0x60, 0x60, 0x00, 0x06, 0x30, 0x00, + 0x00, 0x60, 0x60, 0x60, 0x63, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, + 0x00, 0x06, 0x60, 0x00, 0x06, 0x06, 0x06, 0x00, 0x63, 0x06, 0x06, 0xB0, + 0x6D, 0x0E, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x60, 0x60, + 0x60, 0x0C, 0x33, 0x60, 0x98, 0x81, 0x19, 0x00, 0x83, 0x01, 0x18, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0xFE, 0x81, 0x1F, 0xF8, 0x87, + 0x1F, 0xFC, 0x83, 0x7F, 0xFE, 0x81, 0x07, 0xC0, 0xC3, 0x60, 0x60, 0xE0, + 0x1F, 0xFE, 0x81, 0x1F, 0xFE, 0x81, 0x7F, 0xE6, 0xC7, 0x3F, 0xFE, 0x61, + 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0xFE, 0x07, 0x03, 0x60, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x80, 0x19, 0x66, 0x00, 0x0C, 0xD8, 0x00, 0x00, 0x18, 0x00, 0x0C, + 0xD8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x86, 0x07, 0x06, + 0x00, 0x06, 0x60, 0x30, 0x66, 0x00, 0x06, 0x00, 0x30, 0x06, 0x66, 0x60, + 0x60, 0x00, 0x06, 0x18, 0xE0, 0x7F, 0xC0, 0x00, 0x30, 0x33, 0x66, 0x60, + 0x06, 0x63, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x00, 0x06, 0x06, 0x06, + 0x00, 0x63, 0x03, 0x06, 0x30, 0x67, 0x1E, 0x66, 0x60, 0x06, 0x66, 0x60, + 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x0C, 0x33, 0x60, 0x98, 0x81, 0x19, + 0x80, 0x81, 0x01, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x06, 0xC3, 0x30, 0x0C, 0xC6, 0x30, 0x60, 0xC0, 0x60, 0x06, 0x03, 0x06, + 0x00, 0xC3, 0x30, 0x60, 0x60, 0x36, 0x06, 0xC3, 0x30, 0x06, 0xC3, 0x60, + 0x36, 0x60, 0x60, 0x30, 0x60, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, + 0x00, 0x06, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x6C, 0x00, 0x0C, 0x70, + 0x00, 0x00, 0x18, 0x00, 0x0C, 0x70, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0C, 0xC6, 0x06, 0x06, 0x00, 0x03, 0x30, 0x18, 0xE6, 0x1F, 0xFE, + 0x01, 0x18, 0x0C, 0x63, 0x60, 0x60, 0x00, 0x06, 0x0C, 0x00, 0x00, 0x80, + 0x01, 0x18, 0x33, 0x66, 0x60, 0xFE, 0x61, 0x00, 0x06, 0x66, 0x00, 0x06, + 0x60, 0x00, 0x06, 0x06, 0x06, 0x00, 0xE3, 0x01, 0x06, 0x30, 0x62, 0x36, + 0x66, 0x60, 0x06, 0x63, 0x60, 0x06, 0xC3, 0x00, 0x60, 0x60, 0x60, 0x0C, + 0x33, 0x60, 0xF0, 0x00, 0x0F, 0xC0, 0x80, 0x01, 0x30, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x60, + 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x18, 0x60, 0x60, 0x66, 0x06, + 0x66, 0x60, 0x06, 0x66, 0x60, 0x1E, 0x60, 0x00, 0x30, 0x60, 0x60, 0x06, + 0x66, 0x60, 0x0C, 0x63, 0x60, 0x00, 0x03, 0x03, 0x60, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, + 0x19, 0xF8, 0x01, 0x06, 0x78, 0x06, 0x00, 0x18, 0x00, 0x0C, 0xFF, 0xE7, + 0x7F, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x06, 0x66, 0x06, 0x06, 0x80, 0x01, + 0x1F, 0x0C, 0x06, 0x30, 0x06, 0x03, 0x18, 0xF8, 0xC1, 0x60, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x33, 0x66, 0x60, 0x06, 0x63, + 0x00, 0x06, 0xE6, 0x1F, 0xFE, 0x61, 0x7C, 0xFE, 0x07, 0x06, 0x00, 0xE3, + 0x00, 0x06, 0x30, 0x60, 0x66, 0x66, 0x60, 0xFE, 0x61, 0x60, 0xFE, 0x81, + 0x1F, 0x60, 0x60, 0x60, 0x0C, 0x33, 0x60, 0x60, 0x00, 0x0F, 0x60, 0x80, + 0x01, 0x60, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x66, + 0x00, 0x06, 0x66, 0x60, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, + 0x0C, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x0E, 0x60, + 0x00, 0x30, 0x60, 0x60, 0x0C, 0x63, 0x60, 0x98, 0x61, 0x60, 0x80, 0xC1, + 0x01, 0x60, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x60, 0x03, 0x06, 0xCC, 0x06, 0x00, + 0x18, 0x00, 0x0C, 0x70, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x36, 0x06, 0x06, 0xC0, 0x00, 0x30, 0x06, 0x06, 0x60, 0x06, 0x06, 0x0C, + 0x0C, 0x83, 0x7F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x80, 0x01, 0x06, + 0x33, 0xE6, 0x7F, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, + 0x06, 0x06, 0x06, 0x00, 0xE3, 0x01, 0x06, 0x30, 0x60, 0xC6, 0x66, 0x60, + 0x06, 0x60, 0x60, 0x1E, 0x00, 0x30, 0x60, 0x60, 0x60, 0x98, 0x31, 0x62, + 0xF0, 0x00, 0x06, 0x30, 0x80, 0x01, 0x60, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x7F, 0x06, 0x66, 0x00, 0x06, 0x66, 0x60, 0x60, 0x60, 0x60, + 0x06, 0x06, 0x06, 0x00, 0xC3, 0x06, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, + 0x06, 0x66, 0x60, 0x06, 0x60, 0x00, 0x30, 0x60, 0x60, 0x0C, 0x63, 0x66, + 0xF0, 0x60, 0x60, 0xC0, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x60, + 0x06, 0x03, 0x86, 0x03, 0x00, 0x18, 0x00, 0x0C, 0xD8, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x1E, 0x06, 0x06, 0x60, 0x00, 0x60, 0x06, + 0x06, 0x60, 0x06, 0x06, 0x0C, 0x06, 0x06, 0x60, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0xC0, 0x00, 0x06, 0x33, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, + 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0x63, 0x03, 0x06, + 0x30, 0x60, 0x86, 0x67, 0x60, 0x06, 0x60, 0x60, 0x36, 0x00, 0x60, 0x60, + 0x60, 0x60, 0x98, 0x31, 0x67, 0x98, 0x01, 0x06, 0x18, 0x80, 0x01, 0xC0, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x06, 0x66, 0x00, 0x06, + 0xE6, 0x7F, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x03, 0x60, + 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0xC0, 0x3F, 0x30, + 0x60, 0x60, 0x98, 0x61, 0x66, 0x60, 0x60, 0x60, 0x60, 0x00, 0x03, 0x60, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x7F, 0x60, 0x06, 0x03, 0x06, 0x03, 0x00, 0x18, 0x00, + 0x0C, 0x8C, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x06, + 0x06, 0x30, 0x00, 0x60, 0x06, 0x06, 0x60, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x60, 0x00, 0x00, 0x00, 0x30, 0xE0, 0x7F, 0x60, 0x00, 0x00, 0x63, 0x66, + 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, + 0x06, 0x06, 0x63, 0x06, 0x06, 0x30, 0x60, 0x06, 0x67, 0x60, 0x06, 0x60, + 0x60, 0x66, 0x00, 0x60, 0x60, 0x60, 0x60, 0x98, 0xB1, 0x6D, 0x98, 0x01, + 0x06, 0x0C, 0x80, 0x01, 0xC0, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x06, 0x06, + 0x06, 0x00, 0xC3, 0x06, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, + 0x60, 0x06, 0x00, 0x60, 0x30, 0x60, 0x60, 0x98, 0x61, 0x66, 0xF0, 0x60, + 0x60, 0x30, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x66, 0x86, 0x39, + 0x06, 0x03, 0x00, 0x30, 0x00, 0x06, 0x06, 0x03, 0x06, 0x60, 0x00, 0x00, + 0x00, 0x80, 0x01, 0x06, 0x06, 0x06, 0x18, 0x00, 0x60, 0xFE, 0x07, 0x60, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x60, 0x60, 0x00, 0x06, 0x60, 0x00, 0x00, + 0x30, 0x00, 0x00, 0xC3, 0x67, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, + 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x06, 0x63, 0x0C, 0x06, 0x30, 0x60, + 0x06, 0x66, 0x60, 0x06, 0x60, 0x60, 0xC6, 0x00, 0x60, 0x60, 0x60, 0x60, + 0xF0, 0xF0, 0x78, 0x0C, 0x03, 0x06, 0x06, 0x80, 0x01, 0x80, 0x01, 0x0C, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, + 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x0C, 0x60, 0x60, 0x66, + 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x00, 0x60, 0x30, 0x60, 0x60, + 0xF0, 0x60, 0x66, 0x98, 0x61, 0x60, 0x18, 0x00, 0x03, 0x60, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x80, 0x19, 0x6C, 0x83, 0x6D, 0x86, 0x03, 0x00, 0x30, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x80, 0x01, 0x06, 0x06, 0x06, 0x0C, + 0x60, 0x60, 0x00, 0x66, 0x60, 0x06, 0x06, 0x06, 0x06, 0x06, 0x60, 0x60, + 0x00, 0x06, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x06, 0x03, 0x60, 0x60, 0x06, + 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x06, + 0x63, 0x18, 0x06, 0x30, 0x60, 0x06, 0x66, 0x60, 0x06, 0x60, 0x66, 0x86, + 0x61, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x70, 0x70, 0x0C, 0x03, 0x06, 0x06, + 0x80, 0x01, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x06, + 0x66, 0x60, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, + 0xC3, 0x18, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, + 0x00, 0x60, 0x30, 0x60, 0x60, 0xF0, 0x60, 0x66, 0x0C, 0x63, 0x60, 0x0C, + 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0xF8, 0xC1, 0x6C, 0xCC, 0x06, + 0x00, 0x60, 0x00, 0x03, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0xC0, + 0x00, 0x0C, 0x03, 0x06, 0x06, 0xC0, 0x30, 0x00, 0xC6, 0x30, 0x0C, 0x03, + 0x06, 0x0C, 0x03, 0x30, 0x60, 0x00, 0x06, 0x80, 0x01, 0x00, 0x0C, 0x00, + 0x06, 0x06, 0x60, 0x60, 0x06, 0xC3, 0x30, 0x06, 0x63, 0x00, 0x06, 0xC0, + 0x30, 0x06, 0x06, 0x06, 0x8C, 0x61, 0x30, 0x06, 0x30, 0x60, 0x06, 0xC6, + 0x30, 0x06, 0xC0, 0x3C, 0x06, 0xC3, 0x30, 0x60, 0xC0, 0x30, 0x60, 0x30, + 0x60, 0x06, 0x06, 0x06, 0x06, 0x80, 0x01, 0x00, 0x03, 0x0C, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x60, 0x06, 0xC3, 0x30, 0x0C, 0xC6, 0x60, 0x60, 0xC0, + 0x70, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x30, 0x60, 0x60, 0x66, 0x06, 0xC6, + 0x30, 0x06, 0xC3, 0x60, 0x06, 0x60, 0x60, 0x30, 0xC0, 0x60, 0x60, 0x60, + 0x66, 0x06, 0xC6, 0x70, 0x06, 0x00, 0x06, 0x60, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, + 0x60, 0xC0, 0x38, 0x78, 0x06, 0x00, 0xC0, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x60, 0xC0, 0x00, 0xF8, 0xC1, 0x3F, 0xFE, 0x87, 0x1F, + 0x00, 0x86, 0x1F, 0xF8, 0x01, 0x06, 0xF8, 0xC1, 0x1F, 0x00, 0x00, 0x06, + 0x00, 0x03, 0x00, 0x06, 0x00, 0x06, 0xFC, 0x67, 0x60, 0xFE, 0x81, 0x1F, + 0xFE, 0xE1, 0x7F, 0x06, 0x80, 0x1F, 0x06, 0x86, 0x1F, 0xF8, 0x60, 0x60, + 0xFE, 0x37, 0x60, 0x06, 0x86, 0x1F, 0x06, 0x80, 0x1F, 0x06, 0x86, 0x1F, + 0x60, 0x80, 0x1F, 0x60, 0x10, 0x40, 0x06, 0x06, 0x06, 0xFE, 0x87, 0x0F, + 0x00, 0x83, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0xFE, 0x81, 0x1F, + 0xF8, 0x87, 0x3F, 0x60, 0x80, 0x7F, 0x06, 0x86, 0x1F, 0x00, 0xC3, 0x60, + 0xF8, 0x61, 0x66, 0x06, 0x86, 0x1F, 0xFE, 0x81, 0x7F, 0x06, 0xC0, 0x3F, + 0xE0, 0x83, 0x7F, 0x60, 0xC0, 0x3F, 0x06, 0x86, 0x7F, 0xFE, 0x07, 0x1C, + 0x60, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; +#define font28_width 1383 +#define font28_height 28 +static unsigned char font28_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x31, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC3, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, + 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, + 0x31, 0x60, 0x0C, 0xC0, 0x00, 0x0F, 0x03, 0x0F, 0x00, 0x03, 0x80, 0x01, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0xF8, 0x03, 0x30, 0x80, 0x3F, 0xE0, 0x0F, 0x00, 0x8C, 0xFF, 0x83, 0x7F, + 0xF8, 0x3F, 0xF8, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x0F, 0xF8, 0x07, 0xFE, 0xE0, 0x3F, 0xE0, 0x0F, 0xFE, + 0x80, 0xFF, 0xE3, 0xFF, 0xE0, 0x0F, 0x06, 0x0C, 0xFC, 0x00, 0xF8, 0x19, + 0x30, 0x06, 0x80, 0x01, 0x66, 0xC0, 0xE0, 0x0F, 0xFE, 0x03, 0xFE, 0xE0, + 0x3F, 0xE0, 0x0F, 0xFE, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x06, 0x8C, + 0x01, 0xE6, 0xFF, 0xC0, 0x0F, 0x0C, 0x00, 0xFC, 0x00, 0x1F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFC, + 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x60, 0x30, 0x00, 0xF0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0E, 0xC0, 0x00, 0x0E, 0x60, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x80, 0x31, 0x60, 0x0C, 0xF8, 0x87, 0x1F, 0x83, + 0x1F, 0x00, 0x03, 0xC0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0xFC, 0x07, 0x38, 0xC0, 0x7F, 0xF0, 0x1F, + 0x00, 0x8E, 0xFF, 0xC3, 0x7F, 0xF8, 0x3F, 0xFC, 0x07, 0xFF, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0xF0, 0x1F, 0xFC, 0x0F, 0xFF, + 0xE1, 0x7F, 0xF0, 0x1F, 0xFE, 0x83, 0xFF, 0xE3, 0xFF, 0xF0, 0x1F, 0x06, + 0x0C, 0xFC, 0x00, 0xF8, 0x19, 0x38, 0x06, 0x80, 0x01, 0x66, 0xC0, 0xF0, + 0x1F, 0xFE, 0x07, 0xFF, 0xE1, 0x7F, 0xF0, 0x1F, 0xFE, 0x9F, 0x01, 0x63, + 0xC0, 0x18, 0x60, 0x06, 0x8C, 0x01, 0xE6, 0xFF, 0xC0, 0x0F, 0x0C, 0x00, + 0xFC, 0x80, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x60, + 0x30, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xC0, 0x00, 0x1E, 0x60, 0xFC, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x31, 0x60, + 0x0C, 0xFC, 0x8F, 0x99, 0xC1, 0x39, 0x00, 0x03, 0x60, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x0E, + 0x3C, 0xE0, 0xE0, 0x38, 0x38, 0x00, 0x8F, 0x01, 0xE0, 0x00, 0x18, 0x30, + 0x0E, 0x8E, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0xC0, 0x01, + 0x38, 0x38, 0x0E, 0x9C, 0x83, 0x63, 0xE0, 0x38, 0x38, 0x06, 0x87, 0x01, + 0x60, 0x00, 0x38, 0x38, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x1C, 0x06, + 0x80, 0x03, 0x67, 0xC0, 0x38, 0x38, 0x06, 0x8E, 0x83, 0x63, 0xE0, 0x38, + 0x38, 0xC0, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x0C, 0x06, 0x03, 0x03, + 0xC0, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0xC0, 0x71, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x30, 0x00, 0x60, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xC0, + 0x00, 0x38, 0x60, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x80, 0x31, 0x60, 0x0C, 0xCE, 0x9C, 0x9F, 0xC1, 0x30, 0x00, + 0x03, 0x60, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x06, 0x0C, 0x3E, 0x60, 0xC0, 0x18, 0x30, 0x80, 0x8F, + 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x03, 0x00, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x80, 0x03, 0x18, 0x30, 0x06, 0x98, 0x01, 0x63, 0xC0, + 0x18, 0x30, 0x06, 0x86, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, + 0x00, 0x60, 0x18, 0x0E, 0x06, 0x80, 0x87, 0x67, 0xC0, 0x18, 0x30, 0x06, + 0x8C, 0x01, 0x63, 0xC0, 0x18, 0x30, 0xC0, 0x80, 0x01, 0x63, 0xC0, 0x18, + 0x60, 0x0C, 0x06, 0x03, 0x03, 0xC0, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0xE0, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x3F, 0xC6, + 0x18, 0xCF, 0xC0, 0x30, 0x00, 0x00, 0x30, 0x00, 0x60, 0xC0, 0x71, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x06, 0x0E, 0x30, 0x60, + 0xC0, 0x00, 0x30, 0xC0, 0x8D, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x8C, + 0x01, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x07, 0x18, 0x30, + 0x86, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x60, 0x00, + 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x07, 0x06, 0x80, 0xCF, + 0xE7, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, 0x18, 0x00, 0xC0, + 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0x18, 0x03, 0x86, 0x01, 0xE0, 0xC0, + 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0xF8, 0x3F, 0xC6, 0x00, 0xC0, 0xC0, 0x39, 0x00, 0x00, 0x30, + 0x00, 0x60, 0x80, 0x3B, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0C, 0x06, 0x0F, 0x30, 0x60, 0xC0, 0x00, 0x30, 0xE0, 0x8C, 0x01, 0x60, + 0x00, 0x00, 0x18, 0x06, 0x8C, 0x01, 0x03, 0x0C, 0x00, 0x03, 0xE0, 0x80, + 0xFF, 0x03, 0x0E, 0x18, 0x30, 0xC6, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x00, + 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x30, 0x00, 0x60, + 0x98, 0x03, 0x06, 0x80, 0xFD, 0xE6, 0xC1, 0x18, 0x30, 0x06, 0x8C, 0x01, + 0x63, 0xC0, 0x18, 0x00, 0xC0, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0x18, + 0x03, 0x86, 0x01, 0x70, 0xC0, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFE, 0xE0, 0x3F, 0xE0, 0x0F, 0xF8, 0x0F, 0xFE, 0xC0, + 0x3F, 0xE0, 0x3F, 0xFE, 0x03, 0x3C, 0x00, 0x78, 0x30, 0x38, 0xC0, 0x80, + 0xFF, 0xE1, 0x3F, 0xE0, 0x0F, 0xFE, 0x03, 0xFE, 0x63, 0xFE, 0xE0, 0x0F, + 0xFC, 0x83, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x06, 0x8C, 0x01, 0xE3, 0xFF, + 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xC6, 0x00, 0x60, + 0x80, 0x1F, 0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x1F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x86, 0x0F, 0x30, 0x00, 0xC0, 0x00, + 0x30, 0x70, 0x8C, 0x01, 0x60, 0x00, 0x00, 0x18, 0x06, 0x8C, 0x01, 0x03, + 0x0C, 0x00, 0x03, 0x70, 0x80, 0xFF, 0x03, 0x1C, 0x00, 0x38, 0xE6, 0x98, + 0x01, 0x63, 0x60, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x00, + 0x06, 0x0C, 0x30, 0x00, 0x60, 0xD8, 0x01, 0x06, 0x80, 0x79, 0xE6, 0xC3, + 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, 0x18, 0x00, 0xC0, 0x80, 0x01, + 0xC3, 0x60, 0x18, 0x60, 0xB0, 0x01, 0xCC, 0x00, 0x38, 0xC0, 0x00, 0x60, + 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xE1, 0x7F, 0xF0, + 0x1F, 0xFC, 0x0F, 0xFF, 0xC1, 0x3F, 0xF0, 0x3F, 0xFE, 0x07, 0x3C, 0x00, + 0x78, 0x30, 0x1C, 0xC0, 0x80, 0xFF, 0xE3, 0x7F, 0xF0, 0x1F, 0xFE, 0x07, + 0xFF, 0x63, 0xFF, 0xF0, 0x1F, 0xFC, 0x83, 0x01, 0x63, 0xC0, 0x18, 0x60, + 0x06, 0x8C, 0x01, 0xE3, 0xFF, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x60, 0x0C, 0xCE, 0x00, 0x60, 0x00, 0x0F, 0x00, 0x00, 0x30, 0x00, 0x60, + 0x00, 0x0E, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xC6, + 0x0D, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x38, 0x8C, 0xFF, 0xE0, 0x3F, 0x00, + 0x0C, 0x0E, 0x8E, 0x01, 0x03, 0x0C, 0x00, 0x03, 0x38, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x1C, 0x66, 0x98, 0x01, 0xE3, 0x3F, 0x18, 0x00, 0x06, 0x8C, + 0x01, 0x60, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF8, 0x00, + 0x06, 0x80, 0x31, 0x66, 0xC7, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, + 0x38, 0x00, 0xC0, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0xB0, 0x01, 0xCC, + 0x00, 0x1C, 0xC0, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x63, 0xE0, 0x38, 0x38, 0x0E, 0x8C, 0x83, 0x03, 0x06, 0x38, + 0x30, 0x06, 0x0E, 0x30, 0x00, 0x60, 0x30, 0x0E, 0xC0, 0x80, 0x31, 0x67, + 0xE0, 0x38, 0x38, 0x06, 0x8E, 0x03, 0xE3, 0x03, 0x38, 0x38, 0x60, 0x80, + 0x01, 0x63, 0xC0, 0x18, 0x60, 0x0E, 0x8E, 0x01, 0x03, 0xE0, 0x80, 0x01, + 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xFC, 0x07, 0x30, 0x00, 0x07, + 0x00, 0x00, 0x30, 0x00, 0x60, 0xE0, 0xFF, 0xF8, 0x7F, 0x00, 0x80, 0xFF, + 0x03, 0x00, 0x00, 0x03, 0xE6, 0x0C, 0x30, 0x00, 0x70, 0xC0, 0x1F, 0x1C, + 0x8C, 0xFF, 0xE1, 0x7F, 0x00, 0x0C, 0xFC, 0x87, 0x03, 0x03, 0x0C, 0x00, + 0x03, 0x1C, 0x00, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x66, 0x98, 0x01, 0xE3, + 0x3F, 0x18, 0x00, 0x06, 0x8C, 0x7F, 0xE0, 0x1F, 0x18, 0x3F, 0xFE, 0x0F, + 0x30, 0x00, 0x60, 0x78, 0x00, 0x06, 0x80, 0x01, 0x66, 0xCE, 0x18, 0x30, + 0x06, 0x8E, 0x01, 0x63, 0xE0, 0xF0, 0x0F, 0xC0, 0x80, 0x01, 0x83, 0x31, + 0x18, 0x60, 0xE0, 0x00, 0x78, 0x00, 0x0E, 0xC0, 0x00, 0xC0, 0x00, 0xC0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0xC0, 0x18, 0x00, 0x06, + 0x8C, 0x01, 0x03, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x30, + 0x07, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0xE3, + 0x01, 0x18, 0x00, 0x60, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0x1C, 0x87, + 0x01, 0x03, 0x70, 0xE0, 0x00, 0xC0, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, + 0xF8, 0x0F, 0x30, 0x80, 0x8F, 0x01, 0x00, 0x30, 0x00, 0x60, 0xE0, 0xFF, + 0xF8, 0x7F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x00, 0x03, 0x76, 0x0C, 0x30, + 0x00, 0x38, 0xC0, 0x1F, 0x0E, 0x0C, 0x80, 0x63, 0xE0, 0x00, 0x06, 0xFC, + 0x07, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xE0, 0x00, + 0x07, 0x66, 0x98, 0xFF, 0x63, 0x60, 0x18, 0x00, 0x06, 0x8C, 0x7F, 0xE0, + 0x1F, 0x18, 0x3F, 0xFE, 0x0F, 0x30, 0x00, 0x60, 0x78, 0x00, 0x06, 0x80, + 0x01, 0x66, 0xDC, 0x18, 0x30, 0xFE, 0x87, 0x01, 0xE3, 0x7F, 0xE0, 0x1F, + 0xC0, 0x80, 0x01, 0x83, 0x31, 0x18, 0x60, 0xE0, 0x00, 0x78, 0x00, 0x07, + 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, + 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x03, 0x06, 0x18, 0x30, 0x06, + 0x0C, 0x30, 0x00, 0x60, 0xB0, 0x03, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, + 0x30, 0x06, 0x8C, 0x01, 0xE3, 0x00, 0x38, 0x00, 0x60, 0x80, 0x01, 0xC3, + 0x60, 0x18, 0x63, 0xB8, 0x83, 0x01, 0x03, 0x38, 0xE0, 0x00, 0xC0, 0x00, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x60, 0x0C, 0xC0, 0x1C, 0x18, 0xC0, 0xDD, 0x01, 0x00, + 0x30, 0x00, 0x60, 0x00, 0x0E, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x01, 0x3E, 0x0C, 0x30, 0x00, 0x1C, 0x00, 0x38, 0x06, 0x0C, 0x00, + 0x63, 0xC0, 0x00, 0x06, 0x0E, 0x0E, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x1C, + 0x00, 0x00, 0x00, 0x70, 0x00, 0x03, 0x66, 0x98, 0xFF, 0x63, 0xC0, 0x18, + 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, + 0x60, 0xF8, 0x00, 0x06, 0x80, 0x01, 0x66, 0xF8, 0x18, 0x30, 0xFE, 0x83, + 0x01, 0xE3, 0x3F, 0x00, 0x38, 0xC0, 0x80, 0x01, 0x83, 0x31, 0x18, 0x63, + 0xB0, 0x01, 0x30, 0x80, 0x03, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0xFF, + 0x03, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF0, 0x01, 0xC0, + 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0xF0, + 0x0F, 0x60, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x63, 0xF0, 0x81, 0x01, 0x03, + 0x1C, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xC0, 0x18, + 0x18, 0xE0, 0xF8, 0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x1F, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x1E, 0x0C, 0x30, 0x00, 0x0E, + 0x00, 0x30, 0x06, 0x0C, 0x00, 0x63, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x38, 0x80, 0xFF, 0x03, 0x38, 0x00, 0x03, 0xE6, + 0x98, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, + 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xD8, 0x01, 0x06, 0x80, 0x01, 0x66, + 0xF0, 0x18, 0x30, 0x06, 0x80, 0x01, 0xE3, 0x03, 0x00, 0x30, 0xC0, 0x80, + 0x01, 0x83, 0x31, 0x98, 0x67, 0xB0, 0x01, 0x30, 0xC0, 0x01, 0xC0, 0x00, + 0x80, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x63, 0xC0, + 0x18, 0x00, 0x06, 0x8C, 0xFF, 0x03, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, + 0x00, 0x60, 0xF0, 0x00, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, + 0x8C, 0x01, 0x63, 0x00, 0xE0, 0x1F, 0x60, 0x80, 0x01, 0x83, 0x31, 0x18, + 0x63, 0xE0, 0x80, 0x01, 0x03, 0x0E, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xF8, 0x3F, 0xC0, 0x18, 0x0C, 0x60, 0x70, 0x00, 0x00, 0x30, 0x00, + 0x60, 0x80, 0x3B, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x0E, 0x0C, 0x30, 0x00, 0x07, 0x00, 0x30, 0xFE, 0x0F, 0x00, 0x63, 0xC0, + 0x00, 0x03, 0x06, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x70, 0x80, 0xFF, + 0x03, 0x1C, 0x00, 0x00, 0xC6, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, + 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x60, 0x60, 0x98, + 0x03, 0x06, 0x80, 0x01, 0x66, 0xE0, 0x18, 0x30, 0x06, 0x80, 0x01, 0x63, + 0x07, 0x00, 0x30, 0xC0, 0x80, 0x01, 0x03, 0x1B, 0xD8, 0x6F, 0x18, 0x03, + 0x30, 0xE0, 0x00, 0xC0, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x00, 0x06, + 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF0, 0x01, 0xC0, 0x80, 0x31, + 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0x00, 0x38, 0x60, + 0x80, 0x01, 0x83, 0x31, 0x18, 0x63, 0xF0, 0x81, 0x01, 0x03, 0x07, 0x80, + 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0xC6, 0x18, 0xCC, 0x63, + 0x70, 0x00, 0x00, 0x30, 0x00, 0x60, 0xC0, 0x71, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x06, 0x0C, 0x30, 0x80, 0x03, 0x00, 0x30, + 0xFE, 0x0F, 0x00, 0x63, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x00, 0x03, 0x00, + 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x86, 0x97, 0x01, + 0x63, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, + 0x0C, 0x30, 0x60, 0x60, 0x18, 0x07, 0x06, 0x80, 0x01, 0x66, 0xC0, 0x18, + 0x30, 0x06, 0x80, 0x01, 0x63, 0x0E, 0x00, 0x30, 0xC0, 0x80, 0x01, 0x03, + 0x1B, 0xF8, 0x7C, 0x18, 0x03, 0x30, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x03, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x00, + 0x06, 0x8C, 0x01, 0x00, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, + 0xB0, 0x03, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, + 0x63, 0x00, 0x00, 0x30, 0x60, 0x80, 0x01, 0x83, 0x31, 0x18, 0x63, 0xB8, + 0x83, 0x01, 0x83, 0x03, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, + 0x0C, 0xCE, 0x1C, 0xE6, 0x67, 0x70, 0x00, 0x00, 0x60, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x0C, 0x60, 0x00, 0x06, 0x0C, + 0x30, 0xC0, 0x01, 0x18, 0x30, 0x00, 0x8C, 0x01, 0x63, 0xC0, 0x00, 0x03, + 0x06, 0x0C, 0x00, 0x03, 0x0C, 0x00, 0x03, 0xC0, 0x01, 0x00, 0x00, 0x07, + 0x00, 0x03, 0x06, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x30, 0x06, 0x86, 0x01, + 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x60, 0x60, 0x18, 0x0E, 0x06, + 0x80, 0x01, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x80, 0x71, 0x63, 0x1C, 0x18, + 0x30, 0xC0, 0x80, 0x01, 0x03, 0x1B, 0x78, 0x78, 0x0C, 0x06, 0x30, 0x60, + 0x00, 0xC0, 0x00, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x00, 0x06, 0x18, 0x30, + 0x06, 0x0C, 0x30, 0x00, 0x60, 0x30, 0x07, 0xC0, 0x80, 0x31, 0x66, 0xC0, + 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0x00, 0x30, 0x60, 0x80, 0x01, + 0x03, 0x1B, 0x18, 0x63, 0x1C, 0x87, 0x01, 0xC3, 0x01, 0x80, 0x01, 0xC0, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xFC, 0x0F, 0x66, 0xE6, 0xF8, 0x00, + 0x00, 0x60, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, + 0x0C, 0x60, 0x00, 0x0E, 0x0E, 0x30, 0xE0, 0x00, 0x38, 0x38, 0x00, 0x8C, + 0x83, 0xE3, 0xE0, 0x00, 0x03, 0x0E, 0x0E, 0x80, 0x03, 0x0C, 0x00, 0x03, + 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x03, 0x0E, 0x80, 0x01, 0x63, 0xE0, + 0x38, 0x38, 0x06, 0x87, 0x01, 0x60, 0x00, 0x38, 0x38, 0x06, 0x0C, 0x30, + 0xE0, 0x70, 0x18, 0x1C, 0x06, 0x80, 0x01, 0x66, 0xC0, 0x38, 0x38, 0x06, + 0x80, 0xE3, 0x63, 0x38, 0x38, 0x38, 0xC0, 0x80, 0x83, 0x03, 0x0E, 0x38, + 0x70, 0x0C, 0x06, 0x30, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x06, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x63, 0xE0, 0x38, 0x38, 0x0E, 0x8C, + 0x83, 0x03, 0x06, 0x38, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x30, 0x0E, + 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x38, 0x38, 0x06, 0x8E, 0x03, 0x63, 0x00, + 0x38, 0x38, 0x60, 0x80, 0x03, 0x03, 0x1B, 0x38, 0x73, 0x0E, 0x8E, 0x03, + 0xE3, 0x00, 0x80, 0x03, 0xC0, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xF8, + 0x07, 0xE3, 0xC7, 0xDF, 0x01, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x00, 0x0C, 0x30, 0x00, 0xFC, 0x07, 0xFE, 0xE1, + 0xFF, 0xF0, 0x1F, 0x00, 0x0C, 0xFF, 0xC1, 0x7F, 0x00, 0x03, 0xFC, 0x07, + 0xFF, 0x01, 0x0C, 0x00, 0x03, 0x00, 0x07, 0x00, 0xC0, 0x01, 0x00, 0x03, + 0xFC, 0x9F, 0x01, 0xE3, 0x7F, 0xF0, 0x1F, 0xFE, 0x83, 0xFF, 0x63, 0x00, + 0xF0, 0x1F, 0x06, 0x0C, 0xFC, 0xC0, 0x3F, 0x18, 0x38, 0xFE, 0x8F, 0x01, + 0x66, 0xC0, 0xF0, 0x1F, 0x06, 0x00, 0xFF, 0x61, 0x70, 0xF0, 0x1F, 0xC0, + 0x00, 0xFF, 0x01, 0x0E, 0x18, 0x60, 0x06, 0x0C, 0x30, 0xE0, 0xFF, 0xC0, + 0x0F, 0x00, 0x0C, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE3, + 0x7F, 0xF0, 0x1F, 0xFC, 0x0F, 0xFF, 0x01, 0x06, 0xF0, 0x3F, 0x06, 0x0C, + 0xFC, 0x00, 0x60, 0x30, 0x1C, 0xF0, 0x83, 0x31, 0x66, 0xC0, 0xF0, 0x1F, + 0xFE, 0x07, 0xFF, 0x63, 0x00, 0xF0, 0x1F, 0xE0, 0x07, 0xFF, 0x03, 0x0E, + 0xF0, 0x3F, 0x06, 0x0C, 0xFF, 0xE3, 0xFF, 0x00, 0x0F, 0xC0, 0x00, 0x1E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x60, 0x0C, 0xC0, 0x00, 0xC3, 0x83, 0x8F, 0x01, 0x00, 0x80, + 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x0C, 0x30, + 0x00, 0xF8, 0x03, 0xFE, 0xE1, 0xFF, 0xE0, 0x0F, 0x00, 0x0C, 0xFE, 0x80, + 0x3F, 0x00, 0x03, 0xF8, 0x03, 0xFF, 0x00, 0x0C, 0x00, 0x03, 0x00, 0x0E, + 0x00, 0xE0, 0x00, 0x00, 0x03, 0xF8, 0x9F, 0x01, 0xE3, 0x3F, 0xE0, 0x0F, + 0xFE, 0x80, 0xFF, 0x63, 0x00, 0xE0, 0x0F, 0x06, 0x0C, 0xFC, 0x80, 0x1F, + 0x18, 0x30, 0xFE, 0x8F, 0x01, 0x66, 0xC0, 0xE0, 0x0F, 0x06, 0x00, 0xFE, + 0x61, 0xE0, 0xE0, 0x0F, 0xC0, 0x00, 0xFE, 0x00, 0x0E, 0x18, 0x60, 0x06, + 0x0C, 0x30, 0xE0, 0xFF, 0xC0, 0x0F, 0x00, 0x0C, 0xFC, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFE, 0xE3, 0x3F, 0xE0, 0x0F, 0xF8, 0x0F, 0xFE, 0x00, + 0x06, 0xE0, 0x3F, 0x06, 0x0C, 0xFC, 0x00, 0x60, 0x30, 0x38, 0xF0, 0x83, + 0x31, 0x66, 0xC0, 0xE0, 0x0F, 0xFE, 0x03, 0xFE, 0x63, 0x00, 0xE0, 0x0F, + 0xC0, 0x07, 0xFE, 0x03, 0x0E, 0xE0, 0x1F, 0x06, 0x0C, 0xFE, 0xE3, 0xFF, + 0x00, 0x0E, 0xC0, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xC0, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x1F, 0x00, + 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +#define font32_width 1581 +#define font32_height 32 +static unsigned char font32_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, 0x38, 0x0E, 0xC0, 0x01, 0xF8, 0x38, + 0xF0, 0x03, 0xC0, 0x01, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xF8, 0x0F, 0xC0, 0x01, + 0xF8, 0x0F, 0xF8, 0x0F, 0x00, 0x38, 0xFE, 0x3F, 0xF8, 0x1F, 0xFE, 0x3F, + 0xF8, 0x0F, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, + 0x1C, 0x00, 0xF8, 0x0F, 0xF8, 0x1F, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x0F, + 0xFE, 0x03, 0xFE, 0x3F, 0xFE, 0x3F, 0xF8, 0x0F, 0x0E, 0x38, 0xF0, 0x07, + 0x00, 0x7F, 0x0E, 0x30, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0xF8, 0x0F, + 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x3F, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0xFE, 0x3F, 0xF0, 0x0F, + 0x1C, 0x00, 0xF0, 0x0F, 0x70, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, + 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0xF0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x0F, 0xC0, 0x01, 0x7C, 0x00, 0xEE, 0x39, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, + 0x38, 0x0E, 0xF8, 0x0F, 0xFC, 0x39, 0xF8, 0x07, 0xC0, 0x01, 0x80, 0x03, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x38, 0xFC, 0x1F, 0xE0, 0x01, 0xFC, 0x1F, 0xFC, 0x1F, 0x00, 0x3C, + 0xFE, 0x3F, 0xFC, 0x1F, 0xFE, 0x3F, 0xFC, 0x1F, 0xFC, 0x1F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x38, 0x00, 0xFC, 0x1F, 0xFC, 0x3F, + 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x0F, 0xFE, 0x3F, 0xFE, 0x3F, + 0xFC, 0x1F, 0x0E, 0x38, 0xF0, 0x07, 0x00, 0x7F, 0x0E, 0x38, 0x0E, 0x00, + 0x0E, 0x70, 0x0E, 0x38, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x1F, + 0xFC, 0x1F, 0xFE, 0x3F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x0E, 0x38, + 0x0E, 0x38, 0xFE, 0x3F, 0xF0, 0x0F, 0x1C, 0x00, 0xF0, 0x0F, 0x38, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, + 0x1C, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0xC0, 0x01, + 0xFC, 0x00, 0xCE, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, 0x38, 0x0E, 0xFC, 0x1F, 0xDC, 0x1D, + 0x1C, 0x0E, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1E, 0x3C, 0xF0, 0x01, + 0x1E, 0x3C, 0x1E, 0x3C, 0x00, 0x3E, 0x0E, 0x00, 0x1E, 0x00, 0x0E, 0x38, + 0x1E, 0x3C, 0x1E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, + 0x70, 0x00, 0x1E, 0x3C, 0x1E, 0x70, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x3C, + 0x0E, 0x1E, 0x0E, 0x00, 0x0E, 0x00, 0x1E, 0x3C, 0x0E, 0x38, 0xC0, 0x01, + 0x00, 0x1C, 0x0E, 0x1C, 0x0E, 0x00, 0x1E, 0x78, 0x0E, 0x38, 0x1E, 0x3C, + 0x0E, 0x3C, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x3C, 0xC0, 0x01, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x70, 0x1C, 0x1C, 0x0E, 0x38, 0x00, 0x38, 0x70, 0x00, + 0x38, 0x00, 0x00, 0x0E, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, + 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x01, 0xC0, 0x01, 0xE0, 0x01, 0x8E, 0x1F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, + 0x38, 0x0E, 0xDE, 0x3D, 0xDC, 0x1D, 0x1C, 0x0E, 0xC0, 0x01, 0xE0, 0x00, + 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1C, 0x0E, 0x38, 0xF8, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x3F, + 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xE0, 0x00, 0x0E, 0x38, 0x0E, 0x60, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x0E, 0x0E, 0x0E, 0x00, + 0x3E, 0x7C, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x1C, 0x1C, + 0x1C, 0x1C, 0x00, 0x38, 0x70, 0x00, 0x38, 0x00, 0x00, 0x0E, 0x0E, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, + 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x01, + 0xC0, 0x01, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xCE, 0x39, 0xFC, 0x0F, + 0x1C, 0x0E, 0x00, 0x00, 0xE0, 0x00, 0x80, 0x03, 0x1C, 0x1C, 0xC0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x38, 0xF8, 0x01, + 0x0E, 0x38, 0x0E, 0x38, 0x80, 0x3B, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, + 0xC0, 0x01, 0x0E, 0x38, 0x8E, 0x7F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, + 0x00, 0x1C, 0x0E, 0x07, 0x0E, 0x00, 0x7E, 0x7E, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x70, 0x38, 0x0E, 0x1C, 0x1C, 0x00, 0x38, 0x70, 0x00, + 0x70, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0xFE, 0x3F, 0xCE, 0x01, 0xF8, 0x0E, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x07, 0x38, 0x0E, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0E, 0x0E, 0x3C, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0xC0, 0x39, + 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x1C, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x0E, 0x38, 0xCE, 0x7F, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, + 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x8E, 0x03, 0x0E, 0x00, + 0x7E, 0x7E, 0x1E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0x38, 0x0E, + 0x38, 0x0E, 0x00, 0x1C, 0x70, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xFE, 0x3F, 0xCE, 0x01, 0x00, 0x07, + 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0x70, 0x07, 0xC0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0E, 0x3E, 0xC0, 0x01, + 0x0E, 0x38, 0x00, 0x38, 0xE0, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x1C, + 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0xE0, 0x00, 0xFE, 0x3F, + 0x00, 0x07, 0x0E, 0x38, 0xEE, 0x71, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, + 0x00, 0x1C, 0xCE, 0x01, 0x0E, 0x00, 0xEE, 0x77, 0x3E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, + 0x1C, 0x1C, 0x0E, 0x70, 0x70, 0x07, 0x38, 0x0E, 0x00, 0x0E, 0x70, 0x00, + 0xE0, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, + 0xFE, 0x0F, 0xF8, 0x0F, 0xF8, 0x3F, 0xF8, 0x0F, 0xFC, 0x1F, 0xF8, 0x3F, + 0xFE, 0x0F, 0xF0, 0x01, 0x00, 0x1F, 0x1C, 0x38, 0xC0, 0x01, 0xFE, 0x0F, + 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x3F, 0xCE, 0x3F, 0xF8, 0x0F, + 0xFE, 0x0F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0xFE, 0x3F, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x38, 0x0E, 0xCE, 0x01, 0x00, 0x07, 0x38, 0x07, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x07, 0xE0, 0x03, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x0E, 0x3F, 0xC0, 0x01, 0x00, 0x38, 0x00, 0x38, 0x70, 0x38, + 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, + 0xC0, 0x01, 0x70, 0x00, 0xFE, 0x3F, 0x00, 0x0E, 0x00, 0x1C, 0xEE, 0x70, + 0x0E, 0x38, 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, + 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xEE, 0x00, 0x0E, 0x00, + 0xCE, 0x73, 0x7E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0x70, 0x07, + 0x70, 0x07, 0x00, 0x07, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFC, 0x3F, + 0xFC, 0x1F, 0xFC, 0x1F, 0xFC, 0x3F, 0xFE, 0x1F, 0xF0, 0x01, 0x00, 0x1F, + 0x1C, 0x1C, 0xC0, 0x01, 0xFE, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x1F, + 0xFC, 0x3F, 0xEE, 0x3F, 0xFC, 0x1F, 0xFE, 0x0F, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xFE, 0x3F, 0xE0, 0x00, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xDE, 0x01, 0x80, 0x03, + 0xF0, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xC0, 0x01, 0xC0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x8E, 0x3B, 0xC0, 0x01, + 0x00, 0x1C, 0x00, 0x3C, 0x38, 0x38, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x0E, + 0x1E, 0x3C, 0x0E, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x1C, 0x00, 0x0E, 0xEE, 0x70, 0x0E, 0x38, 0xFE, 0x0F, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, + 0x00, 0x1C, 0x7E, 0x00, 0x0E, 0x00, 0xCE, 0x73, 0xEE, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1E, 0x00, 0xC0, 0x01, 0x0E, 0x38, + 0x1C, 0x1C, 0x0E, 0x70, 0xE0, 0x03, 0x70, 0x07, 0x80, 0x03, 0x70, 0x00, + 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, + 0x0E, 0x3C, 0x1E, 0x3C, 0x1E, 0x38, 0x1E, 0x3C, 0xC0, 0x01, 0x1E, 0x38, + 0x0E, 0x3C, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x0E, 0xC0, 0x01, 0xCE, 0x3D, + 0x0E, 0x3C, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x38, 0x7E, 0x00, 0x1E, 0x3C, + 0xE0, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x00, 0x1C, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x38, 0x0E, 0xFC, 0x0F, 0x80, 0x03, 0xF0, 0x01, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x07, 0xFE, 0x3F, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, + 0x80, 0x03, 0xCE, 0x39, 0xC0, 0x01, 0x00, 0x0E, 0xF0, 0x1F, 0x1C, 0x38, + 0xFE, 0x1F, 0xFE, 0x1F, 0x00, 0x07, 0xFC, 0x1F, 0x1E, 0x38, 0xC0, 0x01, + 0xC0, 0x01, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0xEE, 0x70, + 0x0E, 0x38, 0xFE, 0x0F, 0x0E, 0x00, 0x0E, 0x38, 0xFE, 0x07, 0xFE, 0x07, + 0x8E, 0x3F, 0xFE, 0x3F, 0xC0, 0x01, 0x00, 0x1C, 0x3E, 0x00, 0x0E, 0x00, + 0x8E, 0x71, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x3C, 0x0E, 0x38, 0x0E, 0x3C, + 0xFC, 0x0F, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0xE0, 0x03, + 0xE0, 0x03, 0xC0, 0x01, 0x70, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, + 0x1C, 0x07, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x3E, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0x0E, 0x38, 0x1C, 0x1C, + 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x38, 0x00, 0x0E, 0x7C, 0x00, 0xC0, 0x01, + 0x80, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xF8, 0x1F, 0xC0, 0x01, + 0xF8, 0x73, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xFE, 0x3F, 0xFE, 0x3F, + 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xC0, 0x01, 0xEE, 0x38, 0xC0, 0x01, + 0x00, 0x07, 0xF0, 0x1F, 0x0E, 0x38, 0x00, 0x3C, 0x0E, 0x3C, 0x00, 0x07, + 0xFC, 0x1F, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, + 0x00, 0x38, 0x80, 0x03, 0xEE, 0x70, 0xFE, 0x3F, 0x0E, 0x1C, 0x0E, 0x00, + 0x0E, 0x38, 0xFE, 0x07, 0xFE, 0x07, 0x8E, 0x3F, 0xFE, 0x3F, 0xC0, 0x01, + 0x00, 0x1C, 0x3E, 0x00, 0x0E, 0x00, 0x0E, 0x70, 0x8E, 0x3B, 0x0E, 0x38, + 0xFE, 0x1F, 0x0E, 0x38, 0xFE, 0x1F, 0xF8, 0x1F, 0xC0, 0x01, 0x0E, 0x38, + 0x38, 0x0E, 0x8E, 0x71, 0xE0, 0x03, 0xE0, 0x03, 0xE0, 0x00, 0x70, 0x00, + 0x80, 0x03, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, + 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x9C, 0x03, 0xC0, 0x01, 0xCE, 0x39, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1E, 0x00, 0x0E, 0x00, + 0xE0, 0x00, 0x0E, 0x38, 0x1C, 0x1C, 0xCE, 0x39, 0x38, 0x0E, 0x0E, 0x38, + 0x00, 0x07, 0x7C, 0x00, 0xC0, 0x01, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x38, 0x0E, 0xC0, 0x3D, 0xC0, 0x01, 0x1C, 0x77, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x07, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x01, 0x7E, 0x38, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x3C, 0x0E, 0x38, + 0x00, 0x38, 0x0E, 0x38, 0x80, 0x03, 0x1E, 0x3C, 0xF8, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xC0, 0x01, 0xEE, 0x70, + 0xFE, 0x3F, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x7E, 0x00, 0x0E, 0x00, + 0x0E, 0x70, 0x0E, 0x3F, 0x0E, 0x38, 0xFE, 0x0F, 0x0E, 0x38, 0xFE, 0x0F, + 0x00, 0x3C, 0xC0, 0x01, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x73, 0xE0, 0x03, + 0xC0, 0x01, 0x70, 0x00, 0x70, 0x00, 0x80, 0x03, 0x00, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, + 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, + 0xDC, 0x01, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x00, 0x1E, 0x00, 0xE0, 0x00, 0x0E, 0x38, 0x1C, 0x1C, + 0xCE, 0x39, 0x70, 0x07, 0x0E, 0x38, 0x80, 0x03, 0xE0, 0x00, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xC0, 0x39, 0xE0, 0x00, + 0x0E, 0x3E, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xE0, 0x03, 0xC0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x3E, 0x38, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x38, 0x0E, 0x38, 0x00, 0x38, 0x0E, 0x38, 0x80, 0x03, + 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xFE, 0x3F, + 0x00, 0x0E, 0xC0, 0x01, 0xEE, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, + 0x00, 0x1C, 0xEE, 0x00, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x3E, 0x0E, 0x38, + 0x0E, 0x00, 0x0E, 0x38, 0x7E, 0x00, 0x00, 0x38, 0xC0, 0x01, 0x0E, 0x38, + 0x38, 0x0E, 0xCE, 0x73, 0x70, 0x07, 0xC0, 0x01, 0x38, 0x00, 0x70, 0x00, + 0x00, 0x07, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0xFE, 0x3F, 0xC0, 0x01, 0x0E, 0x38, + 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xFC, 0x00, 0xC0, 0x01, 0xCE, 0x39, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xFC, 0x0F, + 0xE0, 0x00, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x39, 0xE0, 0x03, 0x0E, 0x38, + 0xC0, 0x01, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFE, 0x3F, 0xC0, 0x39, 0xE0, 0x00, 0x0E, 0x1C, 0x00, 0x00, 0x70, 0x00, + 0x00, 0x07, 0x70, 0x07, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0x00, 0x1E, 0x38, 0xC0, 0x01, 0xE0, 0x00, 0x00, 0x38, 0xFE, 0x3F, + 0x00, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x00, 0xFE, 0x3F, 0x00, 0x07, 0xC0, 0x01, 0xEE, 0x79, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xCE, 0x01, 0x0E, 0x00, + 0x0E, 0x70, 0x0E, 0x3C, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0xEE, 0x00, + 0x00, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x38, 0x0E, 0xEE, 0x77, 0x70, 0x07, + 0xC0, 0x01, 0x1C, 0x00, 0x70, 0x00, 0x00, 0x07, 0x00, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, + 0xFE, 0x3F, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, + 0xFC, 0x00, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x00, 0xF8, 0x1F, 0xE0, 0x00, 0x0E, 0x38, 0x38, 0x0E, + 0xCE, 0x39, 0xE0, 0x03, 0x0E, 0x38, 0xE0, 0x00, 0xE0, 0x00, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0xC0, 0x39, 0x70, 0x1F, + 0x0E, 0x1C, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0x38, 0x0E, 0xC0, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x38, 0xC0, 0x01, + 0x70, 0x00, 0x00, 0x38, 0xFE, 0x3F, 0x00, 0x38, 0x0E, 0x38, 0xC0, 0x01, + 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x80, 0x03, 0x00, 0x00, 0xCE, 0x7F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, + 0x0E, 0x1C, 0x8E, 0x03, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x00, 0x0E, 0x38, 0xCE, 0x01, 0x00, 0x38, 0xC0, 0x01, 0x0E, 0x38, + 0x70, 0x07, 0x7E, 0x7E, 0x38, 0x0E, 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, + 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, + 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xDC, 0x01, 0xC0, 0x01, 0xCE, 0x39, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x00, 0x3C, + 0xE0, 0x00, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x39, 0x70, 0x07, 0x0E, 0x38, + 0x70, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x38, 0x0E, 0xCE, 0x39, 0xF0, 0x3F, 0x0E, 0x1C, 0x00, 0x00, 0xE0, 0x00, + 0x80, 0x03, 0x1C, 0x1C, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x38, 0x00, 0x0E, 0x38, 0x00, 0x38, + 0x00, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x8E, 0x6F, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, + 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x1C, 0x0E, 0x07, 0x0E, 0x00, + 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x8E, 0x03, + 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x70, 0x07, 0x7E, 0x7E, 0x38, 0x0E, + 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, + 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, + 0x9C, 0x03, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x0E, 0x38, 0x70, 0x07, + 0xCE, 0x39, 0x38, 0x0E, 0x0E, 0x38, 0x38, 0x00, 0xE0, 0x00, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xDE, 0x3D, 0xB8, 0x3B, + 0x0E, 0x1C, 0x00, 0x00, 0xE0, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x00, 0x0E, 0x38, 0xC0, 0x01, + 0x1C, 0x00, 0x0E, 0x38, 0x00, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, + 0x0E, 0x38, 0x00, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x07, 0x00, 0x00, + 0xE0, 0x00, 0xC0, 0x01, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, + 0x0E, 0x1C, 0x0E, 0x0E, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, + 0x0E, 0x00, 0xCE, 0x39, 0x0E, 0x07, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, + 0x70, 0x07, 0x3E, 0x7C, 0x1C, 0x1C, 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, + 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, + 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x07, 0xC0, 0x01, 0xCE, 0x39, + 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x00, 0x38, + 0xE0, 0x00, 0x0E, 0x38, 0x70, 0x07, 0xCE, 0x39, 0x1C, 0x1C, 0x0E, 0x38, + 0x1C, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x38, 0x0E, 0xFC, 0x1F, 0xB8, 0x3B, 0x1E, 0x3E, 0x00, 0x00, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, + 0x38, 0x00, 0x1E, 0x3C, 0xC0, 0x01, 0x0E, 0x00, 0x1E, 0x3C, 0x00, 0x38, + 0x1E, 0x38, 0x1E, 0x3C, 0xC0, 0x01, 0x1E, 0x3C, 0x00, 0x3C, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0xC0, 0x01, 0x1E, 0x00, + 0x0E, 0x38, 0x0E, 0x3C, 0x1E, 0x3C, 0x0E, 0x1E, 0x0E, 0x00, 0x0E, 0x00, + 0x1E, 0x3C, 0x0E, 0x38, 0xC0, 0x01, 0x1E, 0x1E, 0x0E, 0x1C, 0x0E, 0x00, + 0x0E, 0x70, 0x0E, 0x38, 0x1E, 0x3C, 0x0E, 0x00, 0x9E, 0x3F, 0x0E, 0x0E, + 0x1E, 0x3C, 0xC0, 0x01, 0x1E, 0x3C, 0xE0, 0x03, 0x1E, 0x78, 0x1C, 0x1C, + 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1E, 0x38, 0x0E, 0x3C, 0x1E, 0x3C, 0x1E, 0x38, + 0x1E, 0x38, 0xC0, 0x01, 0x1E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, + 0x1C, 0x0E, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x1E, 0x3C, 0x0E, 0x3C, + 0x1E, 0x38, 0x0E, 0x00, 0x1E, 0x3C, 0xE0, 0x01, 0x1E, 0x38, 0xE0, 0x03, + 0xDE, 0x3D, 0x0E, 0x38, 0x1E, 0x38, 0x0E, 0x00, 0xE0, 0x01, 0xC0, 0x01, + 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xF8, 0x0F, 0x9C, 0x3F, + 0xFC, 0x77, 0x00, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xFC, 0x1F, 0xF8, 0x0F, + 0xFE, 0x3F, 0xFC, 0x1F, 0x00, 0x38, 0xFC, 0x1F, 0xFC, 0x1F, 0xC0, 0x01, + 0xFC, 0x1F, 0xFC, 0x1F, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x1C, 0x00, 0x00, + 0x38, 0x00, 0xC0, 0x01, 0xFC, 0x7F, 0x0E, 0x38, 0xFE, 0x1F, 0xFC, 0x1F, + 0xFE, 0x0F, 0xFE, 0x3F, 0x0E, 0x00, 0xFC, 0x1F, 0x0E, 0x38, 0xF0, 0x07, + 0xFC, 0x0F, 0x0E, 0x38, 0xFE, 0x3F, 0x0E, 0x70, 0x0E, 0x38, 0xFC, 0x1F, + 0x0E, 0x00, 0xFC, 0x1F, 0x0E, 0x1C, 0xFC, 0x1F, 0xC0, 0x01, 0xFC, 0x1F, + 0xE0, 0x03, 0x0E, 0x70, 0x0E, 0x38, 0xC0, 0x01, 0xFE, 0x3F, 0xF0, 0x0F, + 0x00, 0x38, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, + 0xFE, 0x1F, 0xFC, 0x1F, 0xFC, 0x3F, 0xFC, 0x3F, 0xC0, 0x01, 0xFC, 0x3F, + 0x0E, 0x38, 0xF0, 0x07, 0x00, 0x1C, 0x1C, 0x1C, 0xF0, 0x07, 0xCE, 0x39, + 0x0E, 0x38, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x3F, 0x0E, 0x00, 0xFC, 0x1F, + 0xC0, 0x3F, 0xFC, 0x3F, 0xE0, 0x03, 0xFC, 0x1F, 0x0E, 0x38, 0xFC, 0x3F, + 0xFE, 0x3F, 0xC0, 0x0F, 0xC0, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x38, 0x0E, 0xC0, 0x01, 0x1C, 0x1F, 0xF8, 0x73, 0x00, 0x00, 0x00, 0x07, + 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, + 0x1C, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xFE, 0x3F, 0xF8, 0x0F, 0x00, 0x38, + 0xF8, 0x0F, 0xF8, 0x0F, 0xC0, 0x01, 0xF8, 0x0F, 0xFC, 0x0F, 0xC0, 0x01, + 0xC0, 0x01, 0x00, 0x38, 0x00, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0xF8, 0x7F, + 0x0E, 0x38, 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x03, 0xFE, 0x3F, 0x0E, 0x00, + 0xF8, 0x0F, 0x0E, 0x38, 0xF0, 0x07, 0xF8, 0x07, 0x0E, 0x30, 0xFE, 0x3F, + 0x0E, 0x70, 0x0E, 0x38, 0xF8, 0x0F, 0x0E, 0x00, 0xF8, 0x0F, 0x0E, 0x38, + 0xF8, 0x0F, 0xC0, 0x01, 0xF8, 0x0F, 0xE0, 0x03, 0x0E, 0x70, 0x0E, 0x38, + 0xC0, 0x01, 0xFE, 0x3F, 0xF0, 0x0F, 0x00, 0x38, 0xF0, 0x0F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0xFE, 0x0F, 0xF8, 0x0F, 0xF8, 0x3F, + 0xF8, 0x1F, 0xC0, 0x01, 0xF8, 0x3F, 0x0E, 0x38, 0xF0, 0x07, 0x00, 0x1C, + 0x1C, 0x38, 0xF0, 0x07, 0xCE, 0x39, 0x0E, 0x38, 0xF8, 0x0F, 0xFE, 0x0F, + 0xF8, 0x3F, 0x0E, 0x00, 0xF8, 0x0F, 0x80, 0x3F, 0xF8, 0x3F, 0xE0, 0x03, + 0xF8, 0x0F, 0x0E, 0x38, 0xF8, 0x3F, 0xFE, 0x3F, 0x80, 0x0F, 0xC0, 0x01, + 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFE, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, + 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, + 0x00, 0x00, 0x00, 0x00, 0x3C, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, + 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, + 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + +namespace netgen { + class Font { + // opengl display list index (-1 if not initialized) + int list_base; + + // width and height of font in pixels + int w; + int h; + + // raw data to draw for opengl + unsigned char *char_bitmaps; + + // size of one character in bitmap (in bytes) + int char_length; + int char_w; + int char_h; + + // first and last+1 character in bitmap font + static constexpr char char_first = ' '; + static constexpr char char_next = '~'+1; + + void setBit( char c, int x, int y) { + unsigned char *cbits = getCharBitmap(c); + int offset = x/8+(h-1-y)*char_w; + int bit_nr = 7-x%8; + cbits[offset] |= 1UL<-1) + glDeleteLists(list_base, char_next-char_first); + delete[] char_bitmaps; + } + + unsigned char *getCharBitmap(char c) { + return char_bitmaps + (c-char_first)*char_length; + } + + int getDisplayListsBase() { + // already initialized + if(list_base>-1) return list_base; + + list_base = glGenLists(char_next-char_first) - char_first; + + for (char c=char_first; c GenerateMesh (hmesh, mparam, perfstepsstart, perfstepsend); - mesh = shared_ptr (hmesh); - */ mesh = make_shared (); // vsmesh.SetMesh (mesh); SetGlobalMesh (mesh); mesh -> SetGeometry(ng_geometry); + int res = ng_geometry -> GenerateMesh (mesh, mparam, perfstepsstart, perfstepsend); - // int res = ng_geometry -> GenerateMesh (mesh.Ptr(), mparam, perfstepsstart, perfstepsend); if (res != MESHING3_OK) { multithread.task = savetask; @@ -1347,6 +1338,14 @@ namespace netgen return 0; } } + else // no ng_geometry + { + multithread.task = savetask; + multithread.running = 0; + return 0; + } + + if (mparam.autozrefine) { @@ -1928,7 +1927,12 @@ namespace netgen glCallLists (GLsizei(strlen(text)), GL_UNSIGNED_BYTE, text); } - + static int + Ng_ToglVersion(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) + { + Tcl_SetResult (interp, (char*)"1", TCL_STATIC); + return TCL_OK; + } static void init( struct Togl *togl ) { @@ -2047,30 +2051,33 @@ namespace netgen // Sorry, Togl 2.0 not supported - Tcl_Obj * togl_font; + Font * font = nullptr; Togl * togl = NULL; - void MyOpenGLText (const char * text) + void MyOpenGLText_GUI (const char * text) { - // cout << "togl - text: " << text << endl; - Togl_WriteChars (togl, togl_font, text, strlen(text)); + glListBase (font->getDisplayListsBase()); + glCallLists (GLsizei(strlen(text)), GL_UNSIGNED_BYTE, text); + } + + static int + Ng_ToglVersion(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) + { + Tcl_SetResult (interp, (char*)"2", TCL_STATIC); + return TCL_OK; } static int init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { - cout << "call init" << endl; + // cout << "call init" << endl; if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) return TCL_ERROR; - cout << "call Togl - load font (crashes on my OpenSuse Linux64)" << endl; - // togl_font = Togl_LoadBitmapFont( togl, "Helvetica"); - // togl_font = Togl_LoadBitmapFont( togl, "Times"); - // togl_font = Togl_LoadBitmapFont( togl, TOGL_BITMAP_8_BY_13 ); - togl_font = Togl_LoadBitmapFont( togl, NULL ); - cout << "success" << endl; + // possible values: 12,14,16,18,20,22,24,28,32 + font = selectFont(18); glMatrixMode(GL_PROJECTION); glLoadIdentity(); @@ -2078,6 +2085,7 @@ namespace netgen SetVisualScene (Togl_Interp(togl)); vs->DrawScene(); + Set_OpenGLText_Callback (&MyOpenGLText_GUI); return TCL_OK; } @@ -2110,7 +2118,21 @@ namespace netgen int w = Togl_Width (togl); int h = Togl_Height (togl); - glViewport(0, 0, w, h); + // glViewport(0, 0, w, h); + int res[4]; + glGetIntegerv(GL_VIEWPORT, res); + // cout << "w = " << w << " h = " << h << endl; + w = res[2]; + h = res[3]; + /* + cout << "viewport: " + << res[0] << " " + << res[1] << " " + << res[2] << " " + << res[3] << endl; + */ + // change font size according to window width + font = selectFont(w/80); glMatrixMode(GL_PROJECTION); glLoadIdentity(); @@ -3453,6 +3475,8 @@ void PlayAnimFile(const char* name, int speed, int maxcnt) * Specify the C callback functions for widget creation, display, * and reshape. */ + Tcl_CreateObjCommand(interp, "Ng_GetToglVersion", Ng_ToglVersion, NULL, NULL); + #if TOGL_MAJOR_VERSION==1 if (!nodisplay) { diff --git a/ng/ngvisual.tcl b/ng/ngvisual.tcl index 4be14e1c..620c7324 100644 --- a/ng/ngvisual.tcl +++ b/ng/ngvisual.tcl @@ -345,12 +345,12 @@ proc lineplotdialog { } { pack $w.filesettings -fill x -ipady 3 - frame $w.settings -relief groove -borderwidth 3 - label $w.settings.title -text "\nSettings\n" + ttk::frame $w.settings -relief groove -borderwidth 3 + ttk::label $w.settings.title -text "\nSettings\n" pack $w.settings.title - frame $w.settings.minmax - checkbutton $w.settings.minmax.autoscale -text "Autoscale" -variable visoptions.lineplotautoscale + ttk::frame $w.settings.minmax + ttk::checkbutton $w.settings.minmax.autoscale -text "Autoscale" -variable visoptions.lineplotautoscale tixControl $w.settings.minmax.xmin -label "Min. x: " \ -integer false -variable visoptions.lineplotxmin \ -options { @@ -981,7 +981,6 @@ proc visual_dialog { } { set w .visoptions_dlg - global visual_dialog_pop1 global visual_dialog_pop2 global visual_dialog_pop3 @@ -1003,10 +1002,7 @@ proc visual_dialog { } { focus $w } { - toplevel $w - - - + toplevel $w frame $w.grid -relief groove -borderwidth 3 @@ -1016,7 +1012,7 @@ proc visual_dialog { } { -resolution 1 \ -variable visoptions.gridsize \ -command { popupcheckredraw visual_dialog_pop2 } - + # x- and y- offset scale $w.grid.xoffset -orient horizontal -length 80 -from 0 -to 1 \ @@ -1042,27 +1038,32 @@ proc visual_dialog { } { - frame $w.deform -relief groove -borderwidth 3 - checkbutton $w.deform.cb -text "Deformation" \ + ttk::frame $w.deform -relief groove -borderwidth 3 + ttk::checkbutton $w.deform.cb -text "Deformation" \ -variable visoptions.deformation \ -command { Ng_Vis_Set parameters; redraw } - tixControl $w.deform.sc1 -label "Scale: " -integer false \ - -variable visoptions.scaledeform1 \ - -command { Ng_Vis_Set parameters; redraw } \ - -options { - entry.width 6 - label.width 7 - label.anchor e - } + ttk::label $w.deform.l -text "Scale: " + ttk::spinbox $w.deform.sc1 -from 0 -to 1e99 -textvariable visoptions.scaledeform1 -width 5 \ + -command { Ng_Vis_Set parameters; redraw } \ + -validate focusout -validatecommand { Ng_Vis_Set parameters; redraw; string is double %P } \ + -invalidcommand { puts "invalid value, %P %s"; set visoptions.scaledeform1 1; } + + # tixControl $w.deform.sc1 -label "Scale: " -integer false \ + # -variable visoptions.scaledeform1 \ + # -command { Ng_Vis_Set parameters; redraw } \ + # -options { + # entry.width 6 + # label.width 7 + # label.anchor e + # } - scale $w.deform.sc2 -orient horizontal -length 100 -from 0 -to 1 \ - -resolution 0.01 \ + ttk::scale $w.deform.sc2 -orient horizontal -length 100 -from 0 -to 1 \ -variable visoptions.scaledeform2 \ -command { popupcheckredraw visual_dialog_pop5 } pack $w.deform -fill x -ipady 2 - pack $w.deform.cb $w.deform.sc1 $w.deform.sc2 -side left -expand yes + pack $w.deform.cb $w.deform.l $w.deform.sc1 $w.deform.sc2 -side left -expand yes frame $w.as -relief groove -borderwidth 3 @@ -1093,31 +1094,30 @@ proc visual_dialog { } { - frame $w.iso -relief groove -borderwidth 3 + ttk::frame $w.iso -relief groove -borderwidth 3 pack $w.iso -fill x -ipady 3 - frame $w.iso.cb + ttk::frame $w.iso.cb pack $w.iso.cb -side left - checkbutton $w.iso.cb.isolines -text "Iso-lines" \ + ttk::checkbutton $w.iso.cb.isolines -text "Iso-lines" \ -variable visoptions.isolines \ -command { Ng_Vis_Set parameters; redraw } - pack $w.iso.cb.isolines -side top + pack $w.iso.cb.isolines -side top -anchor w - checkbutton $w.iso.cb.isosurf -text "Iso-Surface" \ + ttk::checkbutton $w.iso.cb.isosurf -text "Iso-Surface" \ -variable visoptions.isosurf \ -command { Ng_Vis_Set parameters; redraw } - pack $w.iso.cb.isosurf -side top + pack $w.iso.cb.isosurf -side top -anchor w - - scale $w.iso.numiso -orient horizontal -length 100 -from 2 -to 50 \ - -label "" \ - -resolution 1 \ + ttk::scale $w.iso.numiso -orient horizontal -length 100 -from 2 -to 50 \ -variable visoptions.numiso \ -command { popupcheckredraw visual_dialog_pop6 } + # -resolution 1 \ + # -label "" \ - pack $w.iso.numiso -side left + pack $w.iso.numiso -side left -anchor n # scale $w.iso.subdiv -orient horizontal -length 100 -from 0 -to 5 \ @@ -1127,39 +1127,39 @@ proc visual_dialog { } { # -command { popupcheckredraw visual_dialog_pop7 } # # -command { puts "subdiv-vis"; Ng_Vis_Set parameters; puts "cal redraw"; redraw } - frame $w.iso.subdiv - radiobutton $w.iso.subdiv.zero -text "0" -variable visoptions.subdivisions -value 0 \ + ttk::frame $w.iso.subdiv + ttk::radiobutton $w.iso.subdiv.zero -text "0" -variable visoptions.subdivisions -value 0 \ -command { #set visoptions.subdivisions 1; Ng_Vis_Set parameters; redraw; } - radiobutton $w.iso.subdiv.one -text "1" -variable visoptions.subdivisions -value 1 \ + ttk::radiobutton $w.iso.subdiv.one -text "1" -variable visoptions.subdivisions -value 1 \ -command { #set visoptions.subdivisions 1; Ng_Vis_Set parameters; redraw; } - radiobutton $w.iso.subdiv.two -text "2" -variable visoptions.subdivisions -value 2 \ + ttk::radiobutton $w.iso.subdiv.two -text "2" -variable visoptions.subdivisions -value 2 \ -command { #set visoptions.subdivisions 2; Ng_Vis_Set parameters; redraw; } - radiobutton $w.iso.subdiv.three -text "3" -variable visoptions.subdivisions -value 3 \ + ttk::radiobutton $w.iso.subdiv.three -text "3" -variable visoptions.subdivisions -value 3 \ -command { #set visoptions.subdivisions 3; Ng_Vis_Set parameters; redraw; } - radiobutton $w.iso.subdiv.four -text "4" -variable visoptions.subdivisions -value 4 \ + ttk::radiobutton $w.iso.subdiv.four -text "4" -variable visoptions.subdivisions -value 4 \ -command { #set visoptions.subdivisions 4; Ng_Vis_Set parameters; redraw; } - radiobutton $w.iso.subdiv.five -text "5" -variable visoptions.subdivisions -value 5 \ + ttk::radiobutton $w.iso.subdiv.five -text "5" -variable visoptions.subdivisions -value 5 \ -command { #set visoptions.subdivisions 5; Ng_Vis_Set parameters; redraw; } - label $w.iso.subdiv.text -text "subdivision" + ttk::label $w.iso.subdiv.text -text "subdivision" pack $w.iso.subdiv -side right -ipadx 10 @@ -1184,18 +1184,18 @@ proc visual_dialog { } { - frame $w.redraw -relief groove -borderwidth 3 - checkbutton $w.redraw.auto -text "Auto-redraw" \ + ttk::frame $w.redraw -relief groove -borderwidth 3 + ttk::checkbutton $w.redraw.auto -text "Auto-redraw after (sec)" \ -variable visoptions.autoredraw - tixControl $w.redraw.val -label " after (sec) " -integer false \ - -variable visoptions.autoredrawtime \ - -options { - entry.width 6 - label.width 0 - label.anchor w - } - + # tixControl $w.redraw.val -integer false \ + # -variable visoptions.autoredrawtime \ + # -options { + # entry.width 6 + # label.width 0 + # label.anchor w + # } + ttk::spinbox $w.redraw.val -textvariable visoptions.autoredrawtime -from 0 -to 100 -width 3 pack $w.redraw -fill x -ipady 3 pack $w.redraw.auto $w.redraw.val -side left @@ -1212,19 +1212,129 @@ proc visual_dialog { } { label.width 0 label.anchor w } - pack $w.redraw.simtime -side left - + # pack $w.redraw.simtime -side left + + pack [ttk::frame $w.f] -fill x + pack [ttk::frame $w.f.f1] -expand yes + set f [ttk::frame $w.f.f1.clipsol] + pack $f -anchor e + menu $f.m + ttk::menubutton $f.b -menu $f.m -width 12 + ttk::label $f.l -text "Clipping Plane Sol: " + + global visoptions.clipsolution + set clipsollabs(none) "None" + set clipsollabs(scal) "Scalar Function" + set clipsollabs(vec) "Vector Function" + foreach i { none scal vec } { + set textval $clipsollabs($i) + $f.m add command -label "$textval" -command \ + "$f.b configure -text \"$textval\" ; set visoptions.clipsolution $i ; " + } + + pack $f.b $f.l -side right + $f.m invoke $clipsollabs(${visoptions.clipsolution}) + + + # pack [ttk::frame $w.f1.scalfun] -anchor e + set f [ttk::frame $w.f.f1.scalfun] + pack $f -anchor e + menu $f.m + ttk::menubutton $f.b -menu $f.m -width 12 + ttk::label $f.l -text "Scalar Function: " + set scalentries [list none None] + + for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { + set fname [Ng_Vis_Field getfieldname $i] + set fcomp [Ng_Vis_Field getfieldcomponents $i] + if { $fcomp == 1 } { + lappend scalentries $fname:1 $fname + } { + for { set j 1 } { $j <= $fcomp } { incr j } { + lappend scalentries $fname:$j "$fname ($j)" + } + lappend scalentries $fname:0 "func ($fname)" + } + } + global visoptions.scalfunction + foreach { name textval } $scalentries { + $f.m add command -label "$textval" -command \ + "$f.b configure -text \"$textval\" ; set visoptions.scalfunction $name ; Ng_Vis_Set parameters ; redraw ; " + } + + pack $f.b $f.l -side right + foreach { name textval } $scalentries { + if { ${visoptions.scalfunction} == $name } { + $f.m invoke $textval + } + } + + set f [ttk::frame $w.f.f1.vecfun] + pack $f -anchor e + menu $f.m + ttk::menubutton $f.b -menu $f.m -width 12 + ttk::label $f.l -text "Vector Function: " + set vecentries [list none None] + + for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { + set fname [Ng_Vis_Field getfieldname $i] + set fcomp [Ng_Vis_Field getfieldcomponents $i] + set iscomplex [Ng_Vis_Field iscomplex $i] + set sdim [Ng_Vis_Field getdimension] + if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] } + if { ($fcomp == $sdim) || ($fcomp == 3) } { + lappend vecentries $fname $fname + } + } + global visoptions.vecfunction + foreach { name textval } $vecentries { + $f.m add command -label "$textval" -command \ + "$f.b configure -text \"$textval\" ; set visoptions.vecfunction $name ; Ng_Vis_Set parameters ; redraw ; " + } + + pack $f.b $f.l -side right + foreach { name textval } $vecentries { + if { ${visoptions.vecfunction} == $name } { + $f.m invoke $textval + } + } + + + + set f [ttk::frame $w.f.f1.evaluate] + pack $f -anchor e + + menu $f.m + ttk::menubutton $f.b -menu $f.m -width 12 + ttk::label $f.l -text "Evaluate: " + + global visoptions.evaluate + set evallabs(abs) "| |" + set evallabs(abstens) "|tensor|" + set evallabs(mises) "Mises" + set evallabs(main) "Main" + foreach i { abs abstens mises main } { + set textval $evallabs($i) + $f.m add command -label "$textval" -command \ + "$f.b configure -text \"$textval\" ; set visoptions.evaluate $i ; " + } + pack $f.b $f.l -side right + $f.m invoke $evallabs(${visoptions.evaluate}) + + + + + tixOptionMenu $w.clipsol -label "Clipping Plane Sol: " \ -options { label.width 18 label.anchor e menubutton.width 12 } - - set none 1 + $w.clipsol add command none -label None $w.clipsol add command scal -label "Scalar Function" $w.clipsol add command vec -label "Vector Function" @@ -1232,8 +1342,7 @@ proc visual_dialog { } { $w.clipsol configure -variable visoptions.clipsolution $w.clipsol configure -command { Ng_Vis_Set parameters; redraw } - pack $w.clipsol - + # pack $w.clipsol @@ -1300,8 +1409,18 @@ proc visual_dialog { } { redraw } - pack $w.scalfun $w.vecfun $w.evaluate + # pack $w.scalfun $w.vecfun $w.evaluate + pack [ttk::frame $w.multidim] -fill x + set f [ttk::frame $w.multidim.f] + pack $f + ttk::label $f.l1 -text "multidim-component: " + ttk::spinbox $f.sb1 -from 0 -to 1e99 -textvariable visoptions.multidimcomponent -width 3 \ + -command { Ng_Vis_Set parameters; redraw } + pack $f.l1 $f.sb1 -side left + + + tixControl $w.multidimcomp -label "multidim-component: " -integer true \ -variable visoptions.multidimcomponent -min 0 \ -command { Ng_Vis_Set parameters; redraw } \ @@ -1310,44 +1429,44 @@ proc visual_dialog { } { label.width 18 label.anchor e } + # pack $w.multidimcomp - pack $w.multidimcomp - - - checkbutton $w.showsurfsolution -text "Draw Surface Vectors" \ + pack [ttk::frame $w.fcb] -fill x + ttk::frame $w.fcb.cb + pack $w.fcb.cb + + ttk::checkbutton $w.fcb.cb.showsurfsolution -text "Draw Surface Vectors" \ -variable visoptions.showsurfacesolution \ -command { Ng_Vis_Set parameters; redraw } - checkbutton $w.showcurves -text "Show Curves" \ + ttk::checkbutton $w.fcb.cb.showcurves -text "Show Curves" \ -variable visoptions.drawpointcurves \ -command { Ng_Vis_Set parameters; redraw } - checkbutton $w.imaginary -text "Imaginary Part" \ + ttk::checkbutton $w.fcb.cb.imaginary -text "Imaginary Part" \ -variable visoptions.imaginary \ -command { Ng_Vis_Set parameters; redraw } - checkbutton $w.logscale -text "Log Scale" \ + ttk::checkbutton $w.fcb.cb.logscale -text "Log Scale" \ -variable visoptions.logscale \ -command { Ng_Vis_Set parameters; redraw } - checkbutton $w.invcolor -text "Inverse Color" \ + ttk::checkbutton $w.fcb.cb.invcolor -text "Inverse Color" \ -variable visoptions.invcolor \ -command { Ng_Vis_Set parametersrange; redraw } - frame $w.texframe + ttk::frame $w.fcb.cb.texframe - checkbutton $w.texframe.usetexture -text "Use Textures (" \ + ttk::checkbutton $w.fcb.cb.texframe.usetexture -text "Use Textures (" \ -variable visoptions.usetexture \ -command { Ng_Vis_Set parameters; redraw } - checkbutton $w.texframe.lintexture -text "Linear )" \ + ttk::checkbutton $w.fcb.cb.texframe.lintexture -text "Linear )" \ -variable visoptions.lineartexture \ -command { Ng_Vis_Set parametersrange; redraw } - - - checkbutton $w.lineartexture -text "Use Linear Texture" \ + ttk::checkbutton $w.fcb.cb.lineartexture -text "Use Linear Texture" \ -variable visoptions.lineartexture \ -command { Ng_Vis_Set parameters; redraw } @@ -1356,12 +1475,12 @@ proc visual_dialog { } { -variable visoptions.numtexturecols \ -command { popupcheckredraw visual_dialog_pop1 } - checkbutton $w.showclipsolution -text "Draw Clipping Plane Solution" \ + ttk::checkbutton $w.fcb.cb.showclipsolution -text "Draw Clipping Plane Solution" \ -variable visoptions.showclipsolution \ -command { Ng_Vis_Set parameters; redraw } - checkbutton $w.redrawperiodic -text "Animate periodic" \ + ttk::checkbutton $w.fcb.cb.redrawperiodic -text "Animate periodic" \ -variable visoptions.redrawperiodic \ -command { redrawperiodic @@ -1369,38 +1488,38 @@ proc visual_dialog { } { redraw } - - pack $w.showsurfsolution $w.showcurves - pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic - pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes + pack $w.fcb.cb.showsurfsolution $w.fcb.cb.showcurves -anchor w + pack $w.fcb.cb.imaginary $w.fcb.cb.logscale $w.fcb.cb.texframe $w.fcb.cb.invcolor $w.fcb.cb.redrawperiodic -side top -anchor w + pack $w.fcb.cb.texframe.usetexture $w.fcb.cb.texframe.lintexture -side left -expand yes - frame $w.bu - pack $w.bu -pady 5 + frame $w.fcb.bu -relief groove -borderwidth 3 + pack $w.fcb.bu -pady 5 - button $w.bu.showsol -text "Show Solution" -command { + ttk::button $w.fcb.bu.showsol -text "Show Solution" -command { set selectvisual solution Ng_SetVisParameters redraw } - button $w.bu.clipping -text "Clipping" -command { + ttk::button $w.fcb.bu.clipping -text "Clipping" -command { clippingdialog; } - button $w.bu.fieldlines -text "Fieldlines" -command { + ttk::button $w.fcb.bu.fieldlines -text "Fieldlines" -command { fieldlinesdialog; } - button $w.bu.lineplot -text "2D Lineplot" -command { + ttk::button $w.fcb.bu.lineplot -text "2D Lineplot" -command { lineplotdialog; } - button $w.bu.done -text "Close" -command { + ttk::button $w.fcb.bu.done -text "Close" -command { destroy .visoptions_dlg } - pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes + pack $w.fcb.bu.showsol $w.fcb.bu.clipping $w.fcb.bu.fieldlines $w.fcb.bu.lineplot $w.fcb.bu.done -side left -expand yes + wm withdraw $w wm geom $w +100+100 diff --git a/ng/variables.tcl b/ng/variables.tcl index d28f912a..f6159a2f 100644 --- a/ng/variables.tcl +++ b/ng/variables.tcl @@ -642,7 +642,7 @@ proc saveinifile { } { if {[catch { set datei [open $inifilename w] } result ]} { puts "cannot write file $inifilename" } { - for { set i [.ngmenu.file.recent index last] } { $i >= 1 } { incr i -1 } { + for { set i [.ngmenu.file.recent index last] } { $i >= 0 } { incr i -1 } { puts $datei "recentfile \"[.ngmenu.file.recent entrycget $i -label]\"" } close $datei diff --git a/nglib/CMakeLists.txt b/nglib/CMakeLists.txt index 3f3890e7..c1c0834f 100644 --- a/nglib/CMakeLists.txt +++ b/nglib/CMakeLists.txt @@ -24,7 +24,7 @@ if(NOT WIN32) target_link_libraries( nglib mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis ) endif(NOT WIN32) -target_link_libraries( nglib ${LIBPTHREAD} ${OCC_LIBRARIES} ${LIBTOGL} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ) +target_link_libraries( nglib ${LIBPTHREAD} ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ) if(USE_PYTHON) target_link_libraries(nglib ${PYTHON_LIBS}) diff --git a/python/__init__.py b/python/__init__.py index 910e9147..1db01972 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1,12 +1,14 @@ from os import environ from sys import path from sys import platform as __platform -if __platform.startswith('linux') or __platform.startswith('darwin'): +if __platform.startswith('linux'): path.append(environ['NETGENDIR']+'/../lib') if __platform.startswith('win'): path.append(environ['NETGENDIR']) +if __platform.startswith('darwin'): + path.append(environ['NETGENDIR']) - + # from libngpy import * import libngpy